Displaying 20 results from an estimated 1000 matches similar to: "logistic Regression with SSlogis but y == 0 ?!"
2002 Jan 04
0
Re: initial values for non linear models? {was "Info_Request"}
>>>>> "millanti" == millanti <millanti at libero.it> writes:
millanti> Hi, I'm an R user and I have to answer a question
millanti> about a problem I'm not able to solve by R code:
millanti> the command nlm(....) to fit a non linear model
millanti> requires an initial estimation of the model's
millanti> unknown
2001 Apr 29
1
Self-starting nls functions
Hello,
I am doing several self-starting growth functions for using with nls(). When
I list the self-starting functions included in nls library, for instance,
SSlogis, there is:
> SSlogis
function (input, Asym, xmid, scal)
...
<environment: 03476D20>
attr(,"class")
[1] "selfStart"
What is this <environment: 03476D20> instruction?
By using deriv() and then
2005 Jun 27
0
SSlogis problem with min(y)==0
Hi, I think this is a problem solved but I would be interested to know
if there is some good reason why SSlogis() behaves like this (apologies
if this has been noticed before- I'm not confident my archive searches
were effective):
I have been fitting large numbers of regressions using nls with a
self-starting 3 parameter logistic model (SSlogis()). I got a series of
unexpected errors of the
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
2008 Jan 04
3
nls (with SSlogis model and upper limit) never returns (PR#10544)
Full_Name: Hendrik Weisser
Version: 2.6.1
OS: Linux
Submission from: (NULL) (139.19.102.218)
The following computation never finishes and locks R up:
> values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475,
17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255,
0.612, 0.556, 0.4025, 0.173))
> y.max <- max(values$y)
> model <- nls(y ~
2004 Jul 16
1
Does AIC() applied to a nls() object use the correct number of estimated parameters?
I'm wondering whether AIC scores extracted from nls() objects using
AIC() are based on the correct number of estimated parameters.
Using the example under nls() documentation:
> data( DNase )
> DNase1 <- DNase[ DNase$Run == 1, ]
> ## using a selfStart model
> fm1DNase1 <- nls( density ~ SSlogis( log(conc), Asym, xmid, scal ),
DNase1 )
Using AIC() function:
>
2009 Jun 09
1
Non-linear regression/Quantile regression
Hi,
I'm relatively new to R and need to do a quantile regression. Linear
quantile regression works, but for my data I need some quadratic function.
So I guess, I have to use a nonlinear quantile regression. I tried the
example on the help page for nlrq with my data and it worked. But the
example there was with a SSlogis model. Trying to write
dat.nlrq <- nlrq(BM ~ I(Regen100^2),
2011 Nov 17
3
Obtaining a derivative of nls() SSlogis function
Hello, I am wondering if someone can help me. I have the following function
that I derived using nls() SSlogis. I would like to find its derivative. I
thought I had done this using deriv(), but for some reason this isn't
working out for me.
Here is the function:
asym <- 84.951
xmid <- 66.90742
scal <- -6.3
x.seq <- seq(1, 153,, 153)
nls.fn <- asym/((1+exp((xmid-x.seq)/scal)))
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 16
0
Does AIC() applied to a nls() object use the correctnumber of estimated parameters?
Thanks Adaikalavan, however the problem remains.
Considering AIC() as applied to the linear model in AIC() help
documentation:
> data(swiss)
> lm1 <- lm(Fertility ~ . , data = swiss)
> AIC(lm1)
[1] 326.0716
Clearly this includes the estimation of the residual standard error as
an estimated parameter, as this gives the correct score:
> -2*logLik(lm1) + 2*(length(coef(lm1))+1)
2011 Aug 09
1
nls, how to determine function?
Hi R help,
I am trying to determine how nls() generates a function based on the
self-starting SSlogis and what the formula for the function would be.
I've scoured the help site, and other literature to try and figure
this out but I still am unsure if I am correct in what I am coming up
with.
**************************************************************************
dat <-
2008 Jan 04
1
Addendum: nls (with SSlogis model and upper limit) never returns (PR#10548)
Peter Dalgaard reminded me to be more specific about my computing platform; it's Debian 4.1.1-19 on a 32-bit Pentium 4 machine (Dell Optiplex GX620).
The problem I described (nls not returning) also occurs with different data at other values of the scal parameter.
Regards
Hendrik Weisser
--
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
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,
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 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"]],
2004 Jul 28
0
Modelling compound logistic growth curves
Motivated by the discovery of 'loglet analysis'
(http://phe.rockefeller.edu/LogletLab/) that allows one to decompose growth
curves into a series of logistic equations, I attempted to do the same thing
in R.
SIMULATED DATA
Time <- 1:200
pop.size <- SSlogis(Time,10,20,5) + SSlogis(Time,20,100,20) +
rnorm(length(Time))
MY ANALYSIS
results <- nls(size ~ SSlogis(Time, Asym1, xmid1,
2004 Aug 16
0
Multiple logistic curves
Dear list,
Apologies, I have sent this message before but received no replies so I'm
trying again just in case...
Motivated by the discovery of 'loglet analysis'
(http://phe.rockefeller.edu/LogletLab/) that allows decomposition of growth
curves into a series of logistic equations, I attempted to do the same thing
in R.
#SIMULATED DATA
Time <- 1:200
pop.size <-
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
2008 Sep 26
0
The 'data' argument and scoping in nls
Hi Everyone,
I seek guidance to avoid wasting a lot of time and doing things badly.
Several times I've solved my problems, only to find that my solutions were
clumsy and not robust. (see "nested" getInitial calls; variable scoping
problems: Solved??
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/139943.html for one truly
horrible approach). I'm sure that I'm not the