search for: pred_temp

Displaying 1 result from an estimated 1 matches for "pred_temp".

2007 Dec 11
1
Using predict()?
...-statistic: 29.97 on 1 and 13 DF, p-value: 0.0001067 > # From the linear model summary output above, the equation for the least squares line is: > # y = -0.3143 + 0.2120*x or chirps = -0.3143 + 0.2120*temp > I can then determine the answer to the prediction, using algebra and R: > pred_temp <- (18+0.3143)/0.2120 > pred_temp [1] 86.3882 However, I'd like to try to use the predict() function. Since 'chirps' and 'temp' are just vectors of numbers, and not dataframes, these failed: predict(chirps.res, newdata=data.frame(chirp=18)) predict(chirps.res, newdata=&qu...