Displaying 20 results from an estimated 2000 matches similar to: "nls fitting inside a loop in S-Plus"
2003 Aug 20
0
4 parameter logistic model
Hi, I am trying to fit a 4-parameter logistic model to
my gradient data using nls. I tried to specify the
model directly in the nls formula and also tried to
use the self-start function SSfpl. For the following
data, the first method worked, but the second didn't.
I thought both ways were equivalent, can anyone tells
me why?
>
2004 Aug 10
0
Check failed after compilation (PR#7159)
Full_Name: Madeleine Yeh
Version: 1.9.1
OS: AIX 5.2
Submission from: (NULL) (151.121.225.1)
After compiling R-1.9.1 on AIX 5.2 using the IBM cc compiler, I ran the
checks. One of them failed. Here is the output from running the check solo.
root@svweb:/fsapps/test/build/R/1.9.1/R-1.9.1/tests/Examples:
># ../../bin/R --vanilla < stats-Ex.R
R : Copyright 2004, The R
2001 May 01
0
SSfpl self-start sometimes fails... workaround proposed
Hello,
nls library provides 6 self-starting models, among them: SSfp, a four
parameters logistic function. Its self-starting procedure involves several
steps. One of these steps is:
pars <- as.vector(coef(nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))),
data = xydata, start = list(lscal = 0), algorithm = "plinear")))
which assumes an initial value of lscal equal to 0. If lscal
2008 Feb 19
0
nlsList - Error in !unlist(lapply(coefs, is.null))
Howdee,
I am able to fit a 4-parameter logistic growth curve to a dataset which
comprise many individuals (using R v. 2.3.1). Yet, if I want to obtain the
parameters for each individual (i.e., for each 'id') using nlsList, then I
obtain an Error message which I have trouble interpreting. Any advice as to
how I can solve this problem?
Thanks for your time,
Marc
> reg <-nls(mass ~
2018 May 05
0
Bug in profile.nls with algorithm = "plinear"
Dear sirs
It seems like there is a bug in `profile.nls` with `algorithm =
"plinear"` when a matrix is supplied on the right hand side. Here is
the bug and a potential fix
#####
# example where profile.nls does not work with `plinear` but does with
# `default`
require(graphics)
set.seed(1)
DNase1 <- subset(DNase, Run == 1)
x <- rnorm(nrow(DNase1))
f1 <- nls(density ~ b1/(1 +
2004 Aug 16
2
using nls to fit a four parameter logistic model
Shalini Raghavan
3M Pharmaceuticals Research
Building 270-03-A-10, 3M Center
St. Paul, MN 55144
E-mail: sraghavan at mmm.com
Tel: 651-736-2575
Fax: 651-733-5096
----- Forwarded by Shalini Raghavan/US-Corporate/3M/US on 08/16/2004 11:25
AM -----
Shalini
2007 Dec 08
0
help for segmented package
Hi,
I am trying to find m breakpoints of a linear regression model. I
used the segmented package. It works fine for small number of
predicators and breakpoints.(3 r.v. 3 points). However, my model has
14 variables it even would not work even for just one breakpoints!.
The error message is always estimated breakpoints are out of range.
Since my problem is time related problem. So I
2007 Oct 17
2
nmle: gnls freezes on difficult case
Hi,
I am not sure this is a bug but I can repeat it, The functions and data
are below.
I know this is nasty data, and it is very questionable whether a 4pl
model
is appropriate, but it is data fed to an automated tool and I would
have hoped for an error. Does this repeat for anyone else?
My details:
> version
_
platform i686-pc-linux-gnu
2005 May 10
2
predict nlme syntax
Dear all
Please help me with correct syntax of predict.nlme.
I would like to predict from nlme object for new data.
I used predict(fit.nlme6, data=newdata) but I have always got
fitted values, no matter how I changed newdata.
I have
> summary(fit.nlme6)
Nonlinear mixed-effects model fit by maximum likelihood
Model: konverze ~ SSfpl(tepl, A, B, xmid, scal)
Data: limity.gr
AIC
2006 Sep 11
4
syntax of nlme
Hello,
How do I specify the formula and random effects without a startup object
? I thought it would be a mixture of nls and lme.
after trying very hard, I ask for help on using nlme.
Can someone hint me to some examples?
I constructed a try using the example from nls:
#variables are density, conc and Run
#all works fine with nls
DNase1 <- subset(DNase, Run == 1 )
fm2DNase1 <- nls(
2009 Nov 09
1
Parameter info from nls object
Hi!
When checking validity of a model for a large number
of experimental data I thought it to be interesting
to check the information provided by
the summary method programmatically.
Still I could not find out which method to
use to get to those data.
Example (not my real world data, but to show the point):
[BEGIN]
> DNase1 <- subset(DNase, Run == 1)
> fm1DNase1 <- nls(density ~
2003 Feb 22
2
4-parameter logistic model
Dear R users
I'm a new user of R and I have a basic question about the 4-parameter
logistic model. According to the information from Pinheiro & Bates the model
is:
y(x)=theta1+(theta2-theta1)/(1+exp((theta3-x)/theta4)) ==
y(x)=A+(B-A)/(1+exp((xmid-input)/scal))
from the graph in page 518 of the book of the same authors (mixed models in
S) theta 1 corresponds to the horizontal asymptote
2010 Mar 13
1
testing parallelism of does-response curves using nls()
Hi, I am trying to use F test or Chi-square test to test if 2 5-parameter (A, B, xmid, scal and H) logistic curves are parallel based on residual sum of squares.
What's usually done is to first fit the 2 curves using a constraint (or global) model where all parameters are kept the same except for "xmid"; then fit 2 independent curves using unconstraint models where all 5 parameters
2000 Oct 14
2
Access to calculations in nls
Hi,
I would like to be able to access the calculated results from the nls package.
Using the example in R, fm3DNase1 we can reurn certain parts of the
calculations:
> coef(fm3DNase1)
Asym xmid scal
2.345179 1.483089 1.041454
> resid(fm3DNase1)
[1] -0.0136806237 -0.0126806237 0.0089488569 0.0119488569 -0.0025803222
[6] 0.0064196778 0.0026723396 -0.0003276604
2002 Sep 27
2
How to apply SSfpl with binary data
Dear R-help subscribers
Would you tell me how to apply SSfpl with binary data as below?
Unfortunately, there is not the EXAMPLE in help(SSfpl) for binary data but for quantitative data(Chick).
V1: dose
V2: log-transformed dose
V3: response (rate)
V1 V2 V3
1 0.775 -0.2548922 0.1666667
2 5.000 1.6094379 0.8148148
3 10.000 2.3025851 0.5000000
4 20.000 2.9957323
2012 Sep 19
0
Discrepancies in weighted nonlinear least squares
Dear all,
I encounter some discrepancies when comparing the deviance of a weighted and
unweigthed model with the AIC values.
A general example (from 'nls'):
DNase1 <- subset(DNase, Run == 1)
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
This is the unweighted fit, in the code of 'nls' one can see that 'nls'
generates a vector
2013 Feb 12
0
Deviance and AIC in weighted NLS
Dear All,
I encounter some discrepancies when comparing the deviance of a weighted and
unweigthed model with the AIC values. A general example (from 'nls'):
DNase1 <- subset(DNase, Run == 1)
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
Now for a weighted fit:
fm2DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal),
2005 Jun 02
1
nls.control: increasing number of iterations
Hello,
I'm using the nls function and would like to increase the number of
iterations. According to the documentation as well as other postings on
R-help, I've tried to do this using the "control" argument:
nls(y ~ SSfpl(x, A, B, xmid, scal), data=my.data,
control=nls.control(maxiter=200))
but no matter how much I increase "maxiter", I get the following error
2012 Jan 20
1
nobs() and logLik()
Dear all,
I am studying a bit the various support functions that exist for
extracting information from fitted model objects.
From the help files it is not completely clear to me whether the number
returned by nobs() should be the same as the "nobs" attribute of the
object returned by logLik().
If so, then there is a slight inconsistency in the methods for 'nls'
objects with
2008 Feb 18
2
skip non-converging nls() in a list
Howdee,
My question appears at #6 below:
1. I want to model the growth of each of a large number of individuals using
a 4-parameter logistic growth curve.
2. nlme does not converge with the random structure that I want to use.
3. nlsList does not converge for some individuals.
4. I decided to go around nlsList using:
t(sapply(split(data, list(data$id)),
function(subd){coef(nls(mass ~