similar to: Help me: nls and try function

Displaying 20 results from an estimated 30000 matches similar to: "Help me: nls and try function"

2009 Aug 10
1
manipulating text to generate different formulas to use in nls()
Hello, In doing a series of non-linear estimations of a function which is a sum of a varying number of sinusoids, I would like to "autogenerate" the arguments needed by nls() depending on that number. For example, when there are two sinusoids: > nls( y ~ mu + A1 * cos(2*pi*f1*x - P1) + A2 * cos(2*pi*f2*x - P2), data = some.xy.data, start = list( mu=some.value0,
2005 Mar 23
1
nl regression with 8 parameters, help!
I'm doing a non linear regression with 8 parameters to be fitted: J.Tl.nls<-nls(Gw~(a1/(1+exp(-a2*Tl+a3))+a4)*(b1/(1+exp(b2*Tl-b3))+b4),data=Enveloppe, start=list(a1=0.88957,a2=0.36298,a3=10.59241,a4=0.26308, b1=0.391268,b2=1.041856,b3=0.391268,b4=0.03439)) First, I fitted my curve on my data by guessing the parameters'
2006 May 21
2
nls & fitting
Dear All, I may look ridiculous, but I am puzzled at the behavior of the nls with a fitting I am currently dealing with. My data are: x N 1 346.4102 145.428256 2 447.2136 169.530634 3 570.0877 144.081627 4 721.1103 106.363316 5 894.4272 130.390552 6 1264.9111 36.727069 7 1788.8544 52.848587 8 2449.4897 25.128742 9 3464.1016 7.531766 10 4472.1360 8.827367 11
2007 Sep 26
2
date
Hello, I have got the following problem: > setwd("C:/temp") > library(xlsReadWrite) > MyData <- read.xls(file="Mappe1.xls", colNames = TRUE,dateTimeAs = "isodatetime") > attach(MyData) > MyData name value times 1 A1 2 2006-05-12 2 A2 3 2006-05-16 3 A3 1 2006-05-12 4 A4 4 2006-05-12 5 A5 2
2003 Jan 17
2
nls
HI, i have some prob when i try to use nls(). my data is 1D vector, I tried to use a polynomial function(order is 3) to fit it. the data series is stored in x. the a0, a1, a2, a3 below is coefficient, which i hope i can get from calls "nls" > z <- nls( ~ a0 + a1 * x + a2 * x * x + a3 * x * x * x, data = x ) Error in match.call(definition, call, expand.dots) : .Primitive... is
2011 Sep 07
1
Reshaping data from wide to tall format for multilevel modeling
Hi, I'm trying to reshape my data set from wide to tall format for multilevel modeling. Unfortunately, the function I typically use (make.univ from the multilevel package) does not appear to work with unbalanced data frames, which is what I'm dealing with. Below is an example of the columns of a data frame similar to what I'm working with: ID a1 a2 a4 b2 b3 b4 b5 b6 Below
2012 Sep 08
2
How to Rename Column Labels?
Hi, How do I rename the column labels in the table? For Instance, if I have a table like this, and I want to have the column labels changed from "A1 A2 A3 A4 A5" to "Mike Kate Michelle Paul Young" A1 A2 A3 A4 A5 1 33 44 55 66 77 2 3 4 5 6 7 7 8 9 and my text file location is: ""/Users/MAC/Desktop/data.txt" When I type in
2004 Mar 10
1
Non-linear regression problem: R vs JMP (long)
Dear R friends, I know that this topic has been mulled over before, and that there is a substantial difference between the convergence criteria for JMP and those for R. I apologize that this is somwehat raking cold coals. Summary: A model/data combination achieves convergence in JMP, and survives a reasonably rigorous examination (sensible parameter estimates, well-behaved surface,
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi, I am running simulations that does multiple comparisons to control. For each simulation, I need to model 7 nls functions. I loop over 7 to do the nls using try if try fails, I break out of that loop, and go to next simulation. I get warnings on nls failures, but the simulation continues to run, except when the internal call (internal to nls) of the chol2inv fails.
2012 Aug 23
1
All possible models with nls()
Hi all, I am trying to make a script that prints all possible models from a model I've created using nls(). It is a logisitc model which in total includes 13 variables. So its >8000 models I need to create, which I don't want to do manually. I've tried modify scripts made for linear models with no results. I've tried these scripts on a two variable model (c,a1 and a2 is what I
2012 Jan 30
1
Problem in Fitting model equation in "nls" function
Dear R users,   I am struggling to fit expo-linear equation to my data using "nls" function. I am always getting error message as i highlighted below in yellow color:     ### Theexpo-linear equation which i am interested to fit my data:       response_variable =  (c/r)*log(1+exp(r*(Day-tt))), where "Day" is time-variable   ## my response variable   rl <-
2012 Jan 31
4
problem in fitting model in NLS function
Dear R users, I am struggling to fit expo-linear equation to my data using "nls" function. I am always getting error message as i highlighted below in yellow color:  Theexpo-linear equation which i am interested to fit my data:       response_variable =  (c/r)*log(1+exp(r*(Day-tt))), where "Day" is time-variable my response variable rl <-
2009 Aug 25
1
Help with nls and error messages singular gradient
Hi All, I'm trying to run nls on the data from the study by Marske (Biochemical Oxygen Demand Interpretation Using Sum of Squares Surface. M.S. thesis, University of Wisconsin, Madison, 1967) and was reported in Bates and Watts (1988). Data is as follows, (stored as mydata) time bod 1 1 0.47 2 2 0.74 3 3 1.17 4 4 1.42 5 5 1.60 6 7 1.84 7 9 2.19 8 11 2.17 I then
2007 May 11
3
A simple question regarding plot of nls objects
Hi, I was trying to run the example of Indomethacin kinetics from the book: ## From Pinheiro/Bates, Mixed-Effects-Models in S and S-Plus, ## Springer, Second Printing 2001, Section 6.2 library(nlme) plot(Indometh) fm1Indom.nls <- nls(conc~SSbiexp(time,A1,lrc1,A2,lrc2), data=Indometh) summary(fm1Indom.nls) plot(fm1Indom.nls,Subject~resid(.),abline=0) ## .... the last plot command gives me the
2003 May 22
1
Plot observed vs. fitted values (weighted nls)
Dear WizaRds, Given the experimental data, csdata<-data.frame( time=c(0,1,3,9,20), conc=c(638.697,395.69,199.00,141.58,112.16) ) weighted nls is applied, wt.MM<- function(resp, time,A1,a1,A2,a2) { pred <- A1*exp(-a1*time)+A2*exp(-a2*time) (resp - pred) / sqrt(pred) } # cs.wt <- nls( ~ wt.MM(conc, time,A1,a1,A2,a2), data=csdata,
2008 Jul 08
2
nls and "plinear" algorithm
hello all i havnt had a chance to read through the references provided for the "nls" function (since the libraries are closed now). can anyone shed some light on how the "plinear" algorithm works? also, how are the fitted values obtained? also, WHAT DOES THE ".lin" below REPRESENT? thanking you in advance ###################################### i have a quick
2008 Nov 18
2
error in function: nls (urgent)
Hi,all: I am running a nonlinear regression and there is a problem. There is a data frame: data p s x t 1 875.0 12392.5 11600 0.06967213 2 615.0 12332.5 12000 0.06967213 3 595.0 12332.5 12000 0.06967213 4 592.5 12337.0 12000 0.06967213 5 650.0 12430.0 12000 0.06967213 6 715.0 12477.5 12000 0.06967213 . . . . str(data): 'data.frame': 234 obs. of 4 variables:
2005 Mar 22
1
nls() and "singular grandient"
Hello, I have a problem with nls() when I want to fit a model with more than two parameters to be fitted which are written as start=list(a1=,a2=,a3=,...). Everytime, it displays:'error... singular gradient' it's a real pain!!! Hope sb knows something about this Thanks GS
2011 Feb 03
1
boostrap an nls regression
Hello there I have the following model based on the hollings disc equation for the type II functional response for 2 data sets: nls(eaten~(a*suppl)/(1+a*h*suppl) where eaten is the number of prey eaten by a predator and suppl is the number of prey initially supplied to the same predator. I have parameter estimates of 'a' and 'h' for the two populations studied and would like
2005 Mar 19
2
simple problem, but not for me
Hello, I'm new in R and I want to do one thing that is very easy in excel, however, I cant do it in R. Suppose we have the data frame: data<- data.frame(A=c("a1","a2","a3","a4","a5")) I need to obtain another column in the same data frame (lets say B=c(b1,b2,b3,b4,b5) in the following way: b1=a1/(a1+a2+a3+a4+a5)