Hi Bill,
Tell me more about the Obs object. The "subset" of an lm should be a vector
telling the lm which observations to use...if Obs[197,396] is a single
number, only one observation will be used, and chances are your model is not
what you intended.
Also, predict(result1,newdata=Obs[397,339])
I am an R beginner and trying to run a market model using event study in
R framework.
First, I run a market model, that is lm(stock security~SP500 index,
subset=Obs[197, 396]) ->result1
Then I get predict results for a new dataset using predict (result1,
newdata=Obs[397,399]) ->pred1
Pred1 s
2 matches
Mail list logo