Greetings all! This problem occurs using R 1.8.1 on Windows XP. I downloaded the binaries for R and all packages, including the VR bundle, in December 2003. The data consists of NZ$ prices and attributes for 643 cars. > summary(price) Min. 1st Qu. Median Mean 3rd Qu. Max. NA's 14290 35800 48990 65400 79000 285000 2 > library(MASS) > boxcox(price ~ doors+CC+KW+KG+LENGTH, lambda=seq(-0.1,0.5,length=30)) > boxcox(price ~ doors+CC+KW+KG+LENGTH, lambda=seq(-0.5,0.1,length=30)) This all works fine, I get a fairly sharp peak near lambda=-0.25, but then: > logtrans(price ~ doors+CC+KW+KG+LENGTH, alpha=seq(-10000,0,length=30)) Error in eval(expr, envir, enclos) : Object "price" not found Comments welcome, Murray -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz Fax 7 838 4155 Phone +64 7 838 4773 wk +64 7 849 6486 home Mobile 021 1395 862
Murray Jorgensen <maj at stats.waikato.ac.nz> writes:> Greetings all! > > This problem occurs using R 1.8.1 on Windows XP. I downloaded the > binaries for R and all packages, including the VR bundle, in December > 2003. > > The data consists of NZ$ prices and attributes for 643 cars. > > > summary(price) > Min. 1st Qu. Median Mean 3rd Qu. Max. NA's > 14290 35800 48990 65400 79000 285000 2 > > library(MASS) > > boxcox(price ~ doors+CC+KW+KG+LENGTH, lambda=seq(-0.1,0.5,length=30)) > > boxcox(price ~ doors+CC+KW+KG+LENGTH, lambda=seq(-0.5,0.1,length=30)) > > This all works fine, I get a fairly sharp peak near lambda=-0.25, but then: > > > logtrans(price ~ doors+CC+KW+KG+LENGTH, alpha=seq(-10000,0,length=30)) > Error in eval(expr, envir, enclos) : Object "price" not found >The issue is that logtrans has a 'data' argument that defaults to NULL (the author(s) may have a reason for having this inconsistent with boxplot?). Adding data=.GlobalEnv seems to work. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907