I have installed Hmisc and Design. When I use ols, I get the following error message: Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed The model that I am running is: > ecools <- ols(eco$exp ~ eco$age + eco$own + eco$inc + inc2, x=TRUE) I have tried several other combinations of arguments that take TRUE/ FALSE values, but no luck. Ultimately, I am trying to calculate robust standard errors. Any help would be appreciated. Charles Evans Executive Director Free Curricula Center [[alternative HTML version deleted]]
Jason Barnhart
2007-Mar-14 21:20 UTC
[R] ols Error : missing value where TRUE/FALSE needed
I think that inc2 should be eco$inc2 in your call. If not let me know and I will dig deeper. ----- Original Message ----- From: "Charles Evans" <cevans at freecurricula.org> To: <r-help at stat.math.ethz.ch> Sent: Wednesday, March 14, 2007 12:48 PM Subject: [R] ols Error : missing value where TRUE/FALSE needed>I have installed Hmisc and Design. When I use ols, I get the > following error message: > > Error in if (!length(fname) || !any(fname == zname)) { : > missing value where TRUE/FALSE needed > > The model that I am running is: > > > ecools <- ols(eco$exp ~ eco$age + eco$own + eco$inc + inc2, > > x=TRUE) > > I have tried several other combinations of arguments that take TRUE/ > FALSE values, but no luck. > > Ultimately, I am trying to calculate robust standard errors. > > Any help would be appreciated. > > Charles Evans > Executive Director > Free Curricula Center > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Frank E Harrell Jr
2007-Mar-15 00:58 UTC
[R] ols Error : missing value where TRUE/FALSE needed
Charles Evans wrote:> I have installed Hmisc and Design. When I use ols, I get the > following error message: > > Error in if (!length(fname) || !any(fname == zname)) { : > missing value where TRUE/FALSE needed > > The model that I am running is: > > > ecools <- ols(eco$exp ~ eco$age + eco$own + eco$inc + inc2, x=TRUE)ecools <- ols(exp ~ age + own + inc + inc2, data=eco, x=TRUE) Watch out for variables named exp but probably OK. Frank Harrell> > I have tried several other combinations of arguments that take TRUE/ > FALSE values, but no luck. > > Ultimately, I am trying to calculate robust standard errors. > > Any help would be appreciated. > > Charles Evans > Executive Director > Free Curricula Center > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University