[R] Why predicted values are fewer that the real?

2012-03-02 Thread labbig
Hi i am running a glm model family Gamma(link=log) trying to predict a vector of 1554 (real) values Using predict() i got a vector of 950 predicted values instead of 1554. The predictions are good though The model doesnt take account of negative values and NAs which are only 121 values. Any clu

[R] stepAIC error

2012-02-21 Thread labbig
i am trying to run stepwise regression for two models(lower,upper), family=gamma and i get the same error despite the models i use. Error in UseMethod("extractAIC") : no applicable method for 'extractAIC' applied to an object of class "formula" In addition: Warning message: In nobs.default(obje