Re: [R] box.Cox.powers() warning

From: John Fox <jfox_at_mcmaster.ca>
Date: Wed, 6 Feb 2008 15:01:15 -0500

Dear Clara,

The warning is nothing to worry about. If start values aren't specified, box.cox.powers() uses optimize() to find start values for each transformation parameter (in this case, there's only one) prior to using optim() to maximize the (possibly multivariate) likelihood. In the course of finding start values, optimize() apparently tried an unreasonable value. In this case, box.cox.powers(income, start=1) gives you the same result minus the warning.

Regards,
 John



John Fox, Professor
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_r-project.org [mailto:r-help-bounces_at_r-
> project.org] On Behalf Of cmhcordei_at_gmail.com
> Sent: February-06-08 1:05 PM
> To: R-help_at_r-project.org
> Subject: [R] box.Cox.powers() warning
>
> Dear Rlist,
>
> Using an example in box.cox.powers() help, I have the following warning
> message.
>
> example:
> library(car)
> >attach(Prestige)
>
> > box.cox.powers(income)
> Box-Cox Transformation to Normality
>
> Est.Power Std.Err. Wald(Power=0) Wald(Power=1)
> 0.1793 0.1108 1.6179 -7.4062
>
> L.R. test, power = 0: 2.7103 df = 1 p = 0.0997
> L.R. test, power = 1: 47.261 df = 1 p = 0
> Warning message:
> In optimize(f = function(lambda) univ.neg.kernel.logL(x = X[, j], :
> NA/Inf replaced by maximum positive value
>
> I do not know the reason for such warning message.
> Can someone help me on this matter?
>
> Best regards,
> Clara Cordeiro
>
> > sessionInfo()
> R version 2.6.1 (2007-11-26)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=Portuguese_Portugal.1252;LC_CTYPE=Portuguese_Portugal.1252;L
> C_MONETARY=Portuguese_Portugal.1252;LC_NUMERIC=C;LC_TIME=Portuguese_Por
> tugal.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] nnet_7.2-38 car_1.2-7 MASS_7.2-38 FitAR_1.0
> leaps_2.7
> [6] lattice_0.17-2
>
> loaded via a namespace (and not attached):
> [1] grid_2.6.1 tools_2.6.1
>
> ______________________________________________
> R-help_at_r-project.org 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.



R-help_at_r-project.org 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. Received on Wed 06 Feb 2008 - 20:05:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 20:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive