similar to: How using the weights argument in nls2?

Displaying 20 results from an estimated 200 matches similar to: "How using the weights argument in nls2?"

2010 Nov 24
1
The nls2 function automatically prints the object!
Good morning gentlemen! When I use the function nls2, and store it in an object, that object is automatically printed, without the summary or to draw the object. For example. model <- nls2 (...) Number of iterations to convergence: ... Achieved convergence tolerance: ... Nonlinear regression model model: ... ~ ... Date: NULL The B k ... ... ... residual sum-of-squares: ... Number
2010 May 11
1
nls() and nls2() behavior?
first, apologies for so many posts yesterday and today. I am wrestling with nls() and nls2(). I have tried to whittle it down to a simple example that still has my problem, yet can be cut-and-pasted into R. here it is: library(nls2) options(digits=12); y= c(0.4334,0.3200,0.5848,0.6214,0.3890,0.5233,0.4753,0.2104,0.3240,0.2827,0.3847,0.5571,0.5432,0.1326,0.3481) x=
2004 Jul 22
1
package nls2 for windows
Dear Madam or sir, Does anyone know if there is a pre-compiled version of package nls2 for windows, please? Thank you. Souleymane
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
Dear All, I was trying to call a self-defined function that performs nonlinear regression and gets the corresponding prediction upper limit using nls2 package. However, weird thing happened. When I called the function in the main program, an error message "fitted(nlsmodel): object 'nlsmodel' not found" came up. But when I directly ran the codes inside the function, no error came
2009 Jun 11
1
Error in 1:p : NA/NaN argument when running model comparisons
Hi there, I am trying to compare nonlinear least squares regression with AIC and anova. The simplest model is one nonlinear curve, and in the more complex model I have a categorical variable (producing parameter estimates for four curves). Both models run fine, but when I try to produce an AIC value for the second model I get the error: > AIC(pow.nls1) [1] 114408.3 > AIC(pow.nls2) Error in
2011 Apr 05
1
Names of a data set in a package
For some reason I want to let one data set in a package be known under two different names. Is that possible, and if so, how? I do not want to have two copies of the data set in the package. Thanks, G?ran -- G?ran Brostr?m Department of Statistics Ume? University SE-90187 Ume?, Sweden
2005 Mar 08
4
Non-linear minimization
hello, I have got some trouble with R functions nlm(), nls() or optim() : I would like to fit 3 parameters which must stay in a precise interval. For exemple with nlm() : fn<-function(p) sum((dN-estdata(p[1],p[2],p[3]))^2) out<-nlm(fn, p=c(4, 17, 5), hessian=TRUE,print.level=2) with estdata() a function which returns value to fit with dN (observed data vactor) My problem is that only
2009 Aug 25
3
Covariates in NLS (Multiple nonlinear regression)
Dear R-users, I am trying to create a model using the NLS function, such that: Y = f(X) + q + e Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x is polynomial for example, but is it possible to do this kind of thing when x is a function with unknown
2010 Jul 06
1
nls + quasi-poisson distribution
Hello R-helpers, I would like to fit a non-linear function to data (Discrete X axis, over-dispersed Poisson values on the Y axis). I found the functions gnlr in the gnlm package from Jim Lindsey: this can handle nonlinear regression equations for the parameters of Poisson and negative binomial distributions, among others. I also found the function nls2 in the software package
2012 May 16
2
confidence intervals for nls or nls2 model
Hi all I have fitted a model usinf nls function to these data: > x [1] 1 0 0 4 3 5 12 10 12 100 100 100 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370 The model fitted is: modellogis<-nls(y~SSlogis(x,a,b,c)) It runs OK. Then I calculate
2010 Mar 11
3
Define column names to a series of data.frames
Greets to the list! I am aware that this topic has been discussed several times. And I've read quite some related posts [1]. Yet, can't seem to give a solution to my problem. I have 6 data frames consisting of 6 rows x 7 columns put together from other data.frames. Something like: a b c d e f g v1 # # # # # # # v2 # # # # # # # v3 # # # # # # # v4 # # # # # # # v5 # # # # # # # v6
2011 Oct 21
0
nls making R "not responding"
Here is the code I am running: library(nls2) modeltest<- function(A,mu,l,b,thour){ out<-vector(length=length(thour)) for (i in 1:length(thour)) { out[i]<-b+A/(1+exp(4*mu/A*(l-thour[i])+2)) } return(out) } A=1.3 mu=.22 l = 15 b = .07 thour = 1:25 Yvals<-modeltest(A,mu,l,b,thour)-.125+runif(25)/4 st2 <- expand.grid(A = seq(0.1, 1.6,.5), mu = seq(0.01, .41,.1), l=1, b =seq(0,.6,.3))
2007 Dec 05
1
confidence intervals for y predicted in non linearregression
Hi Thanks for your suggestion, I'm trying to install this package in Ubuntu (7.10) but unsuccessfully. Also tried in MacOSX, and no success too. _____ De: Ndoye Souleymane [mailto:ndoye_p@hotmail.com] Enviado el: miércoles, 05 de diciembre de 2007 13:38 Para: bady@univ-lyon1.fr; Florencio González CC: r-help@stat.math.ethz.ch Asunto: RE: [R] confidence intervals for y predicted in
2010 Apr 30
2
Curve Fitting
I am having troubles in fitting functions of the form y~a*x^b+c to data, for example x<-c(0.1,0.36,0.63,0.90,1.166,1.43, 1.70, 1.96, 2.23) y<-c(8.09,9.0,9.62,10.11,10.53,10.9, 11.25, 11.56, 11.86) I tried for example with nls, which did only work with really good initial guessed values. Any suggestion, what I should use? Thanks a lot Thomas [[alternative HTML version deleted]]
2010 Mar 30
6
Error "singular gradient matrix at initial parameter estimates" in nls
I am using nls to fit a non linear function to some data. The non linear function is: y= 1- exp(-(k0+k1*p1+ .... + kn*pn)) I have chosen algorithm "port", with lower boundary is 0 for all of the ki parameters, and I have tried many start values for the parameters ki (including generating them at random). If I fit the non linear function to the same data using an external
2008 May 09
2
Regarding anova result
  Hi, I fitted tree growth data with Chapman-Richards growth function using nls. summary(fit.nls) Formula: Parameters: Estimate Std. Error t value Pr Signif. codes: 0 ''***'' 0.001 ''**'' 0.01 ''*'' 0.05 ''.'' 0.1 '' '' 1 Residual standard error: 1.879 on 713 degrees of freedom Algorithm
2011 Mar 02
1
power regression: which package?
Dear R users and R friends, I have a little problem... I don't know anymore which package to use if I want to perform a power regression analysis. To be clear, I want to fit a regression model like this: fit <- ....(y ~ a * x ^ b + c) where a, b and c are coefficients of the model. The R Site does not have the answer I want... Thanks in advance and with kind regards, David
2011 Dec 11
1
nls start values
I'm using nls to fit periodic gene-expression data to sine waves. I need to set the upper and lower boundaries, because I do not want any negative phase and amplitude solutions. This means that I have to use the "port" algorithm. The problem is, that depending on what start value I choose for phase, the fit works for some cases, but not for others. In the example below, the fit works
2008 May 23
3
nls diagnostics?
Hi, All: What tools exist for diagnosing singular gradient problems with 'nls'? Consider the following toy example: DF1 <- data.frame(y=1:9, one=rep(1,9)) nlsToyProblem <- nls(y~(a+2*b)*one, DF1, start=list(a=1, b=1), control=nls.control(warnOnly=TRUE)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial
2012 Nov 03
6
Parámetros iniciales para ajustes no lineales
Hola a todos estoy aplicando la función polinómica de Hossfeld [1], y algunos otros modelos no lineales para tratar de ajustarlos a un grupo de datos forestales,   [1] Y= b*t*exp(c)/(t*exp(c)+a) Al colocar la función en R con parámetros estimados, me devuelve los siguiente: ## model1 <- nls(ho ~ (b*edad*exp(c)/(edad*exp(c)+a)), data=nigra,     start=list(a=0.005,b=0.08,c=-0.00006),