<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4207.2601" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Courier size=1>I am having problem using the step function for a
linear regression model. I've created an initial model containing only the
intercept. Then using the step function, I've selected three variables to
be considered for the model. </FONT></DIV>
<DIV><FONT face=Courier size=1></FONT> </DIV>
<DIV><FONT face=Courier size=1></FONT> </DIV>
<DIV><FONT face=Courier size=1>> x0.lm<- lm(MEDV~1, data = x)<BR>>
<BR>> anova(x0.lm)<BR>Analysis of Variance Table</FONT></DIV>
<DIV><FONT face=Courier size=1></FONT> </DIV>
<DIV><FONT face=Courier size=1>Response:
MEDV<BR> Df Sum Sq
Mean Sq F value Pr(>F)<BR>Residuals 505
42716
85
<BR>> <BR>> step(x0.lm, ~ CRIM + ZN + RM)<BR>Start: AIC= 2246.51
<BR> MEDV ~ 1 </FONT></DIV>
<DIV><FONT face=Courier size=1></FONT> </DIV>
<DIV><FONT face=Courier size=1>Error in eval(expr, envir, enclos) : Object
"MEDV" not found<BR>></FONT></DIV>
<DIV><FONT face=Courier size=1></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am not clear as to why the MEDV object (
the variable I am trying to predict) is not found. I receive an
identical message using the command > step(x0.lm). </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am using R version 1.1.1. I can
run all the examples successfully. Also, I realize that there are
differences in the algorithms, but I can run the code above on Splus
version 5. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Matt Pocernich</FONT> </DIV></BODY></HTML>