[R] help with box-tidwell

John Fox jfox at mcmaster.ca
Sat Apr 29 17:20:45 CEST 2006


Dear Xuemei Bian,

This is, I guess, the box.tidwell() function in the car package.

To know exactly what happened, it would help to see the data, but I suspect
that you have negative values among the predictors. The log of a negative
number is not defined, producing NaN (which means "not a number").
Box-Tidwell transformations are only sensible for positive predictors. The
curious thing is that you ended up with *no* valid observations. As I said,
it's hard to know why without seeing the data.

More generally, to see the sequence of function calls culminating in an
error, you can use traceback().

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Xuemei Bian
> Sent: Saturday, April 29, 2006 9:51 AM
> To: R-help at stat.math.ethz.ch
> Subject: [R] help with box-tidwell
> 
> Hi everyone
> 
> I am using box.tidwell to transform the explanatory 
> variables.  However, it appears problematic.
> 
> The warning I received as follows.
>  box.tidwell(Newresponse  ~ FAC2_1 + FAC4_1 + FAC5_1 + FAC6_1 
> + FAC7_1 + KXI + RECODINC) Warning in log(x) : NaNs produced 
> Warning in lm.fit(x, y, offset = offset, singular.ok = 
> singular.ok, ...) : 
>          extra arguments na.rm are just disregarded.
> Error in lm.fit(x, y, offset = offset, singular.ok = 
> singular.ok, ...) : 
>         0 (non-NA) cases
> 
> Could anybody tell me what do "MaNS produced" and 
> "offset=offset, singular.ok=singular.ok" mean?  Why the 
> box.tidwell did not work?
> 
> Regards
> Xuemei Bian
> Doctoral Researcher
> Room 607C
> Business and Management School
> Gilbert Scott Building
> University of Glasgow
> G12 8QQ
> Tel: 0141 3302000 ext. 0311
> Fax: 0141 3305669
> 
> ______________________________________________
> 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




More information about the R-help mailing list