On Fri, 19 Nov 2021 18:35:23 -0800
Bert Gunter <bgunter.4...@gmail.com> wrote:

> ?predict.lm says:
> 
> "predict.lm produces predicted values, obtained by evaluating the
> regression function in the frame newdata (which defaults to
> model.frame(object)). "
> 
> model.frame(fit) is:
> 1   1.37095845 -0.30663859
> 2  -0.56469817 -1.78130843
> 4   0.63286260  1.21467470
> 6  -0.10612452 -0.43046913
> 7   1.51152200 -0.25726938
> 8  -0.09465904 -1.76316309
> 9   2.01842371  0.46009735
> 10 -0.06271410 -0.63999488
> 11  1.30486965  0.45545012
> 12  2.28664539  0.70483734
> 13 -1.38886070  1.03510352
> 16  0.63595040 -1.71700868
> 17 -0.28425292 -0.78445901
> 18 -2.65645542 -0.85090759
> 19 -2.44046693 -2.41420765
> 20  1.32011335  0.03612261
> 
> i.e. only the rows that are used to fit the model are present.

Thanks Bert.

cheers,

Rolf

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to