[R] understanding predict.lm

Spencer Graves @pencer@gr@ve@ @end|ng |rom e||ect|vede|en@e@org
Tue Nov 7 00:27:46 CET 2023


Doh! Thanks very much. sg


On 11/6/23 5:17 PM, John Fox wrote:
> Dear Spencer,
> 
> You need the t distribution with correct df, not the standard-normal 
> distribution:
> 
>  > pt(-z.confInt/2, df=13)
>      1     2     3     4     5     6     7     8     9    10    11
> 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025
>     12    13
> 0.025 0.025
> 
>  > pt(-z.predInt/2, df=13)
>      1     2     3     4     5     6     7     8     9    10    11
> 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025
>     12    13
> 0.025 0.025
> 
> I hope this helps,
>   John



More information about the R-help mailing list