Displaying 20 results from an estimated 4000 matches similar to: "Question about correct syntax to use with nlme / nlmer"
2007 Oct 25
0
Error message from nlmer
Hi,
I have R 2.6.0 with updated lme4 and Matrix packages, and I am trying to
fit a nonlinear multilevel model. I get the following error message:
Error in nlmer(f ~ grModel(x, w, Tmin, Tmax, Topt, kopt, m) ~ kopt |
flat, :
gradient attribute of evaluated model must be a numeric matrix
and I wonder what this may indicate.
The nonlinear model I try to fit is as follows:
> grModel
2007 Sep 14
1
covariates in nlmer function
I am trying to explore nlmer by running some nlme examples from Pinheiro
& Bates (2000). I do not seem to find information how to specify fixed
effects covariates to nlmer models. Specifically, I tried to run the
"Carbon Dioxide Uptake" example from p. 368 onwards in the PB200 book.
The model without fixed effects covariates runs well but how to tell
nlmer to include Type and
2010 Jul 12
1
Custom nonlinear self starting function w/ 2 covariates
Hello,
I'm trying to adjust a non linear model in which the biological response
variable (ratio of germinated fungus spores) is dependent on 2 covariates
(temperature and time). The response to temperature is modeled by a kind of
beta function with 2 parameters (optimal and maximum temperatures) and the
time function is a 2-parameter Weibull. Adjustments with nls or gnls work,
but I need to
2006 Nov 13
0
help with syntax of nlme call.
I am getting an error message in a call to nlme and cannot understand what
is happening. I explain the steps below in the hope that someone can
explain the error and how to correct it.
STEP 1: Data set: name: marouane.data. This is a data frame whose first few
lines are as follows:
> marouane.data[1:13,]
species plant leaf irradiance photosynthesis chlorophyll
1
2004 May 25
0
NLME
Hi everyone,
Does the selfstart function SSlogis of the "nlme" library allows the introduction of time varying covariates ?
For example how can I interpret the xmid parameter (reperesenting the age at which we reach the half of the asymptote) if I want to explain it by a some time varying covariate?
Thanks in adavance,
Abderrahim
Abderrahim Oulhaj, Phd in Statistics
Oxford
2004 Jul 12
3
Smooth monotone estimation on R
Hi all,
I'm looking for smooth monotone estimation packages, preferably using splines.
I downloaded the 'cobs' package and intend to use it, but since it offers only quadratic splines based on L1 minimization, I'd like to compare its performance to that of a more 'mainstream' cubic-spline, L2-norm minimizing spline. Preferably a smoothing spline.
Does anyone know of such
2010 Apr 15
0
nlsList {nlme} - control arguments problem
Hi Rick
Thanks to Dieter Menne I did manage to solve the problem of imposing bounds on
the parameter space duirng an nlsList fit. He suggested using optim to optimize
the parameters prior to each fit. This worked well for me as I had a customized
selfStart function that then optimized the parameters for each individual
separately.
if you rewrote your selfStart function as:
powrDpltInit <-
2009 Jan 06
1
Overlaying several qqnorm curves in same frame
Hi all,
I want to create a rather standard overlaid qqnorm plot on a single
variable, with different subgroups of the same dataset plotted using
different colors/symbols/etc. (I don't want side-by-side, rather
different-colored curves on the same graph)
I managed to do it rather tediously using "lapply" and "split", and wondered
whether there is any single-command
2009 Jun 29
0
nlsList {nlme} - control arguments problem
Hi All.
I'd like to send some control arguments to the nls function when
performing a nlsList analysis.
I'm fitting a power model to some grouped data and would like to
impose lower bounds on the estimates using the "port" algorithm.
Obtaining the lower bound constraint works fine with a direct call to
nls for a single level of the grouping variable. ?However, the bounds
2006 May 24
1
problem-nlme
Hi,
I have great problems with my work in R.
I look for to model the growth of fish.
I have "Longitudinal data", a serie of repeated
measures for each individual.
Using the corresponding packages "nlme" in R.
I treat to fit to the data different growth functions,
wich were entered by me.
Unfortunately for no it was arrived at the
convergence, several error messages appeared.
I
2010 Mar 31
1
nlsList{nlme} control of min and max parameter bounds?
Hi All
I'm analysing growth rates using a gompertz (logistic) curve and am attempting
to fit parameters for all of my study birds using nlsList.
I've been looking for an option in nlsList to set min and max limits for
parameter values during estimation, although I have failed to find any under
'control'. Other users seem to have reported that using control in the port
algorithm
2009 Oct 17
1
custom selfStart model works with getInitial but not nls
Hello,
I'm having problems creating and using a selfStart model with nlme. Briefly,
I've defined the model, a selfStart object, and then combined them to make a
selfStart.default model.
If I apply getInitial to the selfStart model, I get results. However, if I try
usint it with nls or nlsList, these routines complain about a lack of initial
conditions.
If someone could point out
2017 Feb 22
0
Crash in the latest release
I found this by accident yesterday. The program that crashes is the first two lines of
the example from the help page for nlmer. That example hasn't changed in a long time, so I
assumed that it is an R-devel issue. It could also be a long latent nlmer bug. The second
run with valgrind is puzzling.
Terry T.
> library(lmer)
> sessionInfo()
R Under development (unstable)
2017 Feb 22
0
[Lme4-authors] Crash in the latest release
Thanks, posted to https://github.com/lme4/lme4/issues/412 for further
discussion ...
On Wed, Feb 22, 2017 at 10:03 AM, Therneau, Terry M., Ph.D.
<therneau at mayo.edu> wrote:
> I found this by accident yesterday. The program that crashes is the first
> two lines of the example from the help page for nlmer. That example hasn't
> changed in a long time, so I assumed that it is
2004 May 18
0
nlme: Initial parameter estimates
Hello,
I am trying to fit a nlme (non linear mixed effect). I am using the SelfStart function SSlogis. However the data in my hand contains few observations per subject (4 or less), so the nlsList doesn't work... In this case I should fixe initial parameter estimates. I remark that values of initial estimates have a greater effect on the model fit (i.e. loglikelihood, AIC and also on
2009 Nov 12
0
writing selfStart models that can deal with treatment effects
Hello,
I'm trying to do some non-linear regression with 2 cell types and 4 tissue
type treatments using selfStart models
Following Ritz and Streibig (2009), I wrote the following routines:
##Selfstart
expDecayAndConstantInflowModel <- function(Tb0, time, aL, aN, T0){
exp(-time*aL)*(T0*aL+(-1+exp(time * aL))*Tb0 * aN)/aL
}
expDecayAndConstantInflowModelInit <- function(mCall, LHS,
2008 Jul 16
0
Confidence bands for model estimates using ns() spline basis
Hi,
I am using ns() to model the effect of time on some outcome y
[ specifically, I am using polr() in a model of the form
mod1=polr(y~x1+x2*ns(Year,df=3),...) , with x1 and x2 denoting several
covariates each ]
I understand how to use the spline basis as recorded in the model matrix in
order to reproduce the model fit and to generate curves of the point
estimates of the time effect,
2012 Jan 03
0
optim - Self-Start values - growth function
Dear community,
I'm trying to model growth with this function: Yi = A* exp(-k*(1/ti^m)) ; A
asymptote, k rate of decrease of the relative growth rate, m shape
parameter.
I don't have variable time so, finally, following some papers, I try to fit
Yi+a = A*exp(-k* (1/(-k/(log(Yi/A)))^(1/m)+a)^m);
a= 10
I've tried:
a) nls.1 <- nls(Yi+a ~A*exp(-k*
2008 Aug 04
0
Unexpected nls behaviour: Solved
Hi Everyone,
I'd omitted the non-optional 'parameters' argument to selfStart. Making this
change to SSbatch gives the same (successful) result from the two calls to
nls.
SSbatch<-selfStart(
model=function(Batch, Coeffs)
{
Coeffs[Batch]
}
,initial=function(mCall, data, LHS)
{
# Estimate coefficients as mean of each batch
xy <- sortedXyData(mCall[["Batch"]],
2008 Aug 18
1
"nested" getInitial calls; variable scoping problems
Hi All,
Another nls related problem (for background, I'm migrating a complicated
modelling package from S-plus to R).
Below I've reduced this to the minimum necessary to demonstrate my problem
(I think); the real situation is more complicated.
Two similar selfStart functions, ssA and ssB.
The 'initial' function for ssB modifies its arguments a little and then
calls getInital