Displaying 20 results from an estimated 400 matches similar to: "Does AIC() applied to a nls() object use the correctnumber of estimated parameters?"
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 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 ~
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),
2017 Apr 01
6
Intervalos de confianza de la varianza de los residuos en un modelo no lineal.-
Hola amigos,
Supongamos que se quiere ejecutar un modelo no lineal con nls. Pensemos en
el ejemplo de la ayuda:
DNase1 <- subset(DNase, Run == 1)
fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
summary(fm1DNase1)
Aquí se está modelando la densidad óptica de un ensayo relacionada de forma
no lineal (logística) con (el logaritmo) de la concentración de una
proteína.
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(
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
2007 May 31
1
predict.nls - gives error but only on some nls objects
Dear list,
I have encountered a problem with predict.nls (Windows XP, R.2.5.0), but I am not sure if it is a bug...
On the nls man page, an example is:
DNase1 <- subset(DNase, Run == 1)
fm2DNase1 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)),
data = DNase1,
start = list(xmid = 0, scal = 1))
alg = "plinear", trace =
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 +
2010 Jun 10
1
nls model fitting errors
What am I failing to understand here?
The script below works fine if the dataset being used is
DNase1 <- DNase[ DNase$Run == 1, ] per the example given in
help(nlrob).
Obviously, I am trying to understand how to use nls and nlrob to fit
curves to data using R.
#package=DAAG
attach(codling)
plot(pobs~dose)
#next command returns 'step factor reduced below min factor
2003 Jun 13
1
Factorial function in R?
Is there a native factorial function in R [my searches have been
fruitless], or do I need to use gamma() function?
*********************************************************************
Dr Peter Caley
CSIRO Entomology
GPO Box 1700, Canberra,
ACT 2601
Email: peter.caley@csiro.au
Ph: +61 (0)2 6246 4076 Fax: +61 (0)2 6246 4000
*********************************************************************
2006 Apr 18
1
Nonlinear Regression model: Diagnostics
Hi,
I am trying to run the following nonlinear regression model.
> nreg <- nls(y ~ exp(-b*x), data = mydf, start = list(b = 0), alg = "default", trace = TRUE)
OUTPUT:
24619327 : 0
24593178 : 0.0001166910
24555219 : 0.0005019005
24521810 : 0.001341571
24500774 : 0.002705402
24490713 : 0.004401078
24486658 : 0.00607728
24485115 : 0.007484372
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
2006 Jul 18
4
How can I extract information from list which class is nls
Hello!
I work with :
R : Copyright 2006, The R Foundation for
Statistical Computing
Version 2.3.1 (2006-06-01)
On Windows XP Professional (Version 2002) SP2.
At this moment I use the function "nls" combined
with a selfStar model (SSmicmen, related to
Michaelis-Menten equation, and provided by the
"stats" package).
When I realise the following operation (cf. p 59
of the
2003 Jun 15
0
Summary: Factorial function in R
Thanks to Martin, Marc, Dennis, Rashid and Bill for comment.
The short answer is there is no factorial function within the base
package, so use the result that gamm(x + 1) = x!. This what the
factorial() function in the package gregmisc does:
factorial <- function (x) gamma(1 + x)
Bill V. also writes:
"Your best move is usually to use the lgamma() function (for log gamma)
and do
2008 Sep 10
3
writing simple function through script
Hi all,
I try to write a simple function in a script. The script is as follows
yo<-function(Xdata)
{
n<-length(Xdata[,1])
Lgm<-nls(formula=LgmFormula,
data=Xdata,
start=list(a=1500,b=0.1),weights=Xdata$Qe)
return(Lgm)
}
After the execution of the script, when I call the function yo on data
called NC60.DATA I get an error.
#yo(NC60.DATA)
Erreur dans eval(expr, envir, enclos)
2012 Nov 01
2
subset a defined row plus the aforegoing
Hello,
my data is sorted by start.ens (see below). And now I would like to extract
all rows (so called* defined row*s) with type==Expression - subset (df,
type==Expression) - and the aforegoing type==DNase HS (which is not
necessarly row n-1 - assumung that the defined row is n). I dont know how
to add this to my subset command.
Is that possible?
Thanks Hermann
> df
start.ens fc.trans
2010 Nov 26
1
How to save a data set as .txt on fly?
Hi folks,
Win7 64bit
I tried to save DNase, a data set on database, as .txt file for future use with
load.
I can't do it on fly;
> save(DNase, file="C:/Users/satimis/Documents/aaa.txt")
> load(file="C:/Users/satimis/Documents/aaa.txt")
> aaa
Error: object 'aaa' not found
> aaa.txt
Error: object 'aaa.txt' not found
I must perform following
2010 Jul 19
1
nls with some coefficients fixed
I'm using nls to fit a variety of different models. Here I use SSgompertz as
an example.
I want the ability to fix one (or more) of the coefficients that would
normally be optimised (e.g. fix b3=0.8).
Examples; based on and using data from example(SSgompertz)
#---------------------
# vanilla call to nls, no coefficients fixed, works fine
nls(density ~ SSgompertz(log(conc), Asym, b2, b3),
2007 May 20
0
optional fields in function declarations; Solved
thank you to both Adaikalavan and Patrick.
on the basis of Adaikalavan example this is an example that point out my problems.
>log_raise=function(num, exp, base){return(log(num^exp,base))}
I would like to have optional fields, so some settings to be default parameters;
if I declare the function as above the operator must of course input all the variables.
Finally I could fix as follow.