Hi
Have three variables
Year (date)
Mean usage (mean)
N (n) (where n is the number of observations within each year)
Want to run regression with the dependent mean usage, would need to weight by N and then estimate usage for each year
The next step would be to extrapolate for 2 years past the final year
I have looked at curvefit in spss which will do this and also allow for different models, eg linear , quadratic and cubic, but I would like to be able to do this in stata
I have looked at the following, but it is not doing exactly as wanted
Could anyone advise how I might be able to achieve the extrapolation
Thanks
Ann
tsset date
tsappend, add(5)
xi: reg mean i.date [fweight=n]
*predict meanhat
ipolate mean date, gen(y2) epolate
reg mean date [fweight=n]
ipolate mean date, gen(y3) epolate
The University of Aberdeen is a charity registered in Scotland, No SC013683.
You may leave the list at any time by sending the command
SIGNOFF allstat
to [log in to unmask], leaving the subject line blank.
|