Skip to content
Prev 370173 / 398503 Next

Predict

Sorry for the confusion, here is the edited question.

The data= Stand_Height (attached) is recorded from 12/1/2009 to
12/31/2015 (25 observations) and the other dataset (leafbiom) is
recorded from 10/7/2009 to 12/29/2016 (daily observations).

I want to use the 25 observations of stand height to predict the daily
stand height from 10/7/2009 to 12/29/2016. The daily stand height will
be multiplied by leaf biomass to produce a new variable.

I agree that a loop is not needed, would the forecast library help or
should I use predict library.

Stand_Height=ts(Stand_Height$height,start=2009,end = 2016,
                frequency =365)

plot(forecast(ets(Stand_Height),10))
a=seq(as.Date("2009-12-01"),by="weeks",length=11)
axis(1, at = a, labels = format(a, "%Y %b %d"), cex.axis=0.6)


#Error :$ operator is invalid for atomic vectors

Thanks


Ahmed Attia, Ph.D.
Agronomist & Soil Scientist
On Fri, Jun 30, 2017 at 10:37 AM, Sarah Goslee <sarah.goslee at gmail.com> wrote: