[R] Box Tidwell / Error Message
John Fox
jfox at mcmaster.ca
Fri Dec 1 15:06:09 CET 2006
Dear Simon,
It's hard to tell without the data and more information about the nature of
the variables, but I suspect that the program is running into numerical
difficulties because of a flat likelihood at the maximum. Is age2 by any
chance age^2? How is year (in either form) related to age?
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 Simon P. Kempf
> Sent: Friday, December 01, 2006 3:30 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Box Tidwell / Error Message
>
> Dear R-Users,
>
>
>
> I used the box.tidwell () function of the car Package.
>
>
>
> When I used the following formula:
>
>
>
> semi.sub.in.mi1.boxtidwell_h<-box.tidwell(RENT_LG ~
> I(age+1)+I(age2+1)+X06A
> + I(X08B+1) + I(X22+1) + I(X24+1) + X31A, ~B_YEAR + C_X01 + C_X14 +
> + C_X19 +
> C_X29A +C_X21 + C_X23 + D_X12 + D_X17 + D_X18 + D_X25 + D_X27
> + D_X30 +
> D_X32 + D_X35, data = semi.sub.in.mi1)
>
>
>
> everything is fine.
>
>
>
> However, when I replaced the time dummy variable:
>
>
>
> semi.sub.in.mi1.boxtidwell_h<-box.tidwell(RENT_LG ~
> I(age+1)+I(age2+1)+X06A
> + I(X08B+1) + I(X22+1) + I(X24+1) + X31A, ~B_HALF + C_X01 + C_X14 +
> + C_X19 +
> C_X29A +C_X21 + C_X23 + D_X12 + D_X17 + D_X18 + D_X25 + D_X27
> + D_X30 +
> D_X32 + D_X35, data = semi.sub.in.mi1)
>
>
>
> I get the following error message:
>
>
>
> Error in lm.fit(x, y, offset = offset, singular.ok =
> singular.ok, ...) :
>
> NA/NaN/Inf in foreign function call (arg 1)
>
>
>
> When I use the following formula (I deleted the I(age2+1) term):
>
>
>
> semi.sub.in.mi1.boxtidwell_h<-box.tidwell(RENT_LG ~ I(age+1)+X06A +
> I(X08B+1) + I(X22+1) + I(X24+1) + X31A, ~B_HALF + C_X01 +
> C_X14 + C_X19 + C_X29A +C_X21 + C_X23 + D_X12 + D_X17 + D_X18
> + D_X25 + D_X27 + D_X30 +
> D_X32 + D_X35, data = semi.sub.in.mi1)
>
>
>
> It works.
>
>
>
> Some background information:
>
>
>
> - The formula with the predictors to be transformed
> contains only
> variables which are >0.
>
> - The data set does not have any missing values
>
> - B_YEAR is a factor with 10 levels
>
> - B_HALF is a factor with 20 levels
>
> - The data set contains more than 19000 observations.
>
>
>
> Now, I am bit confused. Why does the function works when I
> use B_YEAR respecitvely why does it work with B_HALF when I
> delete I(age2+1)
>
>
>
> Thanks in advance,
>
>
>
> Simon
>
>
>
>
>
>
>
>
>
> Simon P. Kempf
>
> Dipl.-Kfm. MScRE Immobilienvkonom (ebs)
>
> Wissenschaftlicher Assistent
>
>
>
> B|ro:
>
> IREBS Immobilienakademie
>
> c/o ebs Immobilienakademie GmbH
>
> Berliner Str. 26a
>
> 13507 Berlin
>
>
>
> Privat:
>
> Dunckerstra_e 60
>
> 10439 Berlin
>
>
>
> Mobil: 0176 7002 6687
>
> Email: <mailto:simon.kempf at web.de> simon.kempf at web.de
>
>
>
>
> [[alternative HTML version deleted]]
>
>
More information about the R-help
mailing list