Dear Rui,
I really thank you a lot for your precious R help. It is exactly what I was
trying to do! Once more, many thanks!
Best,
Sacha
Le vendredi 27 octobre 2023 à 09:36:18 UTC+2, Rui Barradas
a écrit :
Às 19:23 de 26/10/2023, varin sacha via R-help escreveu:
> Dear R-Experts,
>
Às 19:23 de 26/10/2023, varin sacha via R-help escreveu:
Dear R-Experts,
Here below my R code working but I don't know how to complete/finish my R code
to get the final plot with the extrapolation for the10 more years.
Indeed, I try to extrapolate my data with a linear fit over the next 10 yea
Incidentally, if all you wanted to do was plot fitted values, the
predict method is kinda overkill, as it's just the fitted line from
the model. But I assume you wanted to plot CI's/PI's also, as the
example illustrated.
-- Bert
On Thu, Oct 26, 2023 at 1:56 PM Bert Gunter wrote:
>
> from ?predic
from ?predict.lm:
"predict.lm produces a vector of predictions or a matrix of
predictions and bounds with column names fit, lwr, and upr if interval
is set. "
ergo:
predict(model, dfuture, interval = "prediction")[,"fit"] ## or [,1]
as it's the first column in the returned matrix
is your vector
4 matches
Mail list logo