Displaying 20 results from an estimated 74 matches for "selfstarting".
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,
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
2007 Sep 29
1
[Help] Error when using nls
Hi,
I am a student of Earthquake Engineering, and am new to R.
Currently I try to run nonlinear regression analysis by R. My data
has three variables: X, Y, and Z. Z is a function of (X, Y). My R
script is as below.
rm(list=ls())
# read in data
Alldata <- read.table("~/Documents/R/Wu_data.dat", header=TRUE)
# assign variables
Z <- Wu[[1]] # N1,60
X <- Wu[[2]]
2009 Sep 04
1
How should a SelfStart function handle illegal parameter values?
Hi Everyone,
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of parameter values are illegal; the function value
is undefined.
That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; I
return an appropriate non-value such as NA or Inf.
However, when called from nls [e.g. nls(y~SSmodel(x, pars...), ...)] those
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
Hi Everyone,
I posted this a couple of weeks ago with no responses. My interface (via
gmane) seemed a bit flakey at the time, so I'm venturing to repost with some
additional information.
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of parameter values are illegal; the function value
is undefined.
That's OK when calling the
2006 Feb 12
1
lme, nlsList, nlsList.selfStart
Dear listers,
I am trying to fit a model using nlsList() using alternately a SSfol()
selfstart function or its developped equivalent formulae.
This preliminary trial works well
mydata<-groupedData(Conc~Tps|Organ,data=mydata)
mymod1<-nls(Conc~SSfol(Dose,Tps,lKe,lKa,lCl),data=mydata)
as well as a developped form:
mymod2<-nls(Conc~Dose * exp(lKe+lKa-lCl) *
2006 Nov 13
2
notepad selfstart on login
hi all;
I'm starting in PDC and need some help, i'm using samba for pdc but without
ldap, and all time that a user make login, open a notepad with the content:
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21787
or
[DeleteOnCopy]
Owner=cesar
Personalized=5
PersonalizedName=My documents
and all folder have a document Desktop.ini...
someone can say me why
2002 Jul 19
1
selfStart function problem
Hello, list,
I am making a self-starting nonlinear function to model the relation of tree height (H)
and diameter (D) in a forest stand. The function I am trying is
H=a*exp[b*(D+5.8)^(-c)].
To calculate the initial estimates of the parameters, I linearized the formula by taking
logarithms and fixing the parameter c=1. Then I calculated the initial estimates of a
and b using lm() on the
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 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
2007 Feb 13
1
nls: "missing value or an infinity" (Error in numericDeriv) and "singular gradient matrix"Error in nlsModel
Hi,
I am a non-expert user of R. I am essaying the fit of two different functions to my data, but I receive two different error messages. I suppose I have two different problems here... But, of which nature? In the first instance I did try with some different starting values for the parameters, but without success.
If anyone could suggest a sensible way to proceed to solve these I would be
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 <-
2002 Jan 04
0
Re: initial values for non linear models? {was "Info_Request"}
.....
nls in package nls, {i.e. you type library(nls)} has so called
self-starting models for a few classes of non-linear *regression* models.
I don't know if this helps, since nlm() is not only for regression models.
type ?selfStart
and apropos("^SS") to get a list of predefined selfstarting
models, and then, e.g. ?SSlogis
Further you may need to learn more about non-linear regression in general.
E.g.,
Bates, D.M. and Watts, D.G. (1988) Nonlinear Regression Analysis
and Its Applications; Wiley.
and -- for selfstarting (and more general, see help(gls, package="nlme&...
2006 Feb 01
1
Passing additional paramaters to nlsList(nlme) fit function
Hello, nls-users,
is it possible to pass additional parameters to the model function that are
known and groupwise constant with nlsList? I could not find something like a
"keep this fixed" option in the documentation and the code (my fault...?)
The current workaround is to break the problem down into groups and use
globals to pass the constant parameters, but it is ugly code and
2008 Aug 01
0
Unexpected nls behaviour
Hi everyone,
I thought that for a selfStart function, these two should be exactly
equivalent
> nls(Aform, DF)
> nls(Aform, DF, start=getInitial(Aform, DF))
but in this example that is not the case in R (although it is in S-plus
V6.2)
------------------------------
SSbatch<-selfStart(
model=function(Batch, Coeffs)
{
Coeffs[Batch]
}
,initial=function(mCall, data, LHS)
{
# Estimate
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
2012 Jun 13
0
logistic Regression with SSlogis but y == 0 ?!
Hello there!
I got some data with x and y values. there are some y == 0. This is a
problem for the selfstarting regression model SSlogis.
The regression works if I use a non selfstarting model. The formula is the
same. But this needs very detailed information of the starting list. I dont
have this Information all the time.
An easy solution for selfstart model could be to add 1E-100 to the y==0
values. That...
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
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