[R] STEP
Öhagen Patrik
Patrik.Ohagen at mpa.se
Thu May 24 12:41:57 CEST 2007
Dear All,
I get a strange error message from the STEP Function:
> summary(MODELL1<-lm(HEP-HBP~START+ REGION:MH +DUR+AB+ASS+TAS+PRK+OPNEW,na.action=na.exclude))
Call:
lm(formula = HEP - HBP ~ START + REGION:MH + DUR + AB + ASS +
TAS + PRK + OPNEW, na.action = na.exclude)
Residuals:
Min 1Q Median 3Q Max
-4.55426 -1.38241 0.09107 1.15272 4.08577
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 54.89083 143.18319 0.383 0.7028
START -0.02710 0.07362 -0.368 0.7141
DUR -0.09959 0.28788 -0.346 0.7306
AB -0.20425 0.34256 -0.596 0.5533
ASS -0.08205 0.36365 -0.226 0.8223
TAS -0.02371 0.04320 -0.549 0.5853
PRKX -0.11876 0.76580 -0.155 0.8773
OPNEWmixed 1.34347 1.65475 0.812 0.4201
OPNEW100% OP -0.06336 1.08484 -0.058 0.9536
REGION:MH -0.44912 0.20855 -2.154 0.0354 *
REGIONEuropa:MH -0.28121 0.17509 -1.606 0.1136
REGIONUSA:MH -0.20092 0.15425 -1.303 0.1978
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.111 on 59 degrees of freedom
Multiple R-Squared: 0.1753, Adjusted R-squared: 0.02152
F-statistic: 1.14 on 11 and 59 DF, p-value: 0.3482
>
>
> step(MODELL1, direction=c("both"))
Start: AIC= 116.97
HEP - HBP ~ START + REGION:MH + DUR + AB + ASS + TAS + PRK +
OPNEW
Error in lm.fit(x[, jj, drop = FALSE], y, offset = offset) :
incompatible dimensions
In addition: Warning message:
longer object length
is not a multiple of shorter object length in: object$residuals + predict(object)
>
What could be the cure?
TIA
Patrik
More information about the R-help
mailing list