obuyacharles
2012-Sep-19 16:40 UTC
[R] Warning Message: In if (deparse(params[[nm]][[3]]) != "1")
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.
Jeff Newmiller
2012-Sep-19 17:10 UTC
[R] Warning Message: In if (deparse(params[[nm]][[3]]) != "1")
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.
obuyacharles
2012-Sep-19 17:57 UTC
[R] Warning Message: In if (deparse(params[[nm]][[3]]) != "1")
I am not sure if it is possible to provide a data set sufficient to fit this model and reproduce the error. However, I noticed that the warnings no longer show up when the number of predictors for b0 and b1 in b0~ .... and b1 ~.... is small (3 to 5). Could this be an effect too many "subcoefficients" of b0 and b1? charles -- View this message in context: http://r.789695.n4.nabble.com/Warning-Message-In-if-deparse-params-nm-3-1-tp4643638p4643649.html Sent from the R help mailing list archive at Nabble.com.
Maybe Matching Threads
- nm-bridge & nm-team and no connection.
- Error in formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3)
- Error in formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3)
- Error in formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3)
- [LLVMdev] Object File Library. llvm-nm changed to match binutils-nm for COFF and ELF (32, little endian).