[R] Warning Message: In if (deparse(params[[nm]][[3]]) != "1")

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Wed Sep 19 19:10:17 CEST 2012


Usually the source of such errors is the data you provide to the function. Since you have not followed the posting guide and provided a reproducible example, we are under a significant handicap in troubleshooting your problem.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

obuyacharles <csabatia at vt.edu> wrote:

>I am using the gnls procedure in nlme package to fit a nonlinear model
>as:
>nl.fit<-gnls(Y ~ b0*exp(b1/X),
>                  data = data1,
>                  params=list(
>                 b0~p1+I(p1^2)+p2+I(p2^2)+p3+I(p3^2)+p5+p6
>                 b1~p8+p2+I(p2^2)+p3+p9+p10+p11),
>                 start = c(25,0,0,0,0,0,0,0,0,-8.6,0,0,0,0,0,0,0),
>                 weights=varPower(form =~ X)
>                 )
>
>When I run this code, the model getts fitted but there are 2 warning
>messages as
>Warning messages:
>1: In if (deparse(params[[nm]][[3]]) != "1") { :
>  the condition has length > 1 and only the first element will be used
>2: In if (deparse(params[[nm]][[3]]) != "1") { :
>  the condition has length > 1 and only the first element will be used
>
>I have no idea what there messages imply.
>Any idea from somebody?
>
>Charles
>
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Warning-Message-In-if-deparse-params-nm-3-1-tp4643638.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>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.




More information about the R-help mailing list