similar to: newbie nls question

Displaying 20 results from an estimated 300 matches similar to: "newbie nls question"

2008 Aug 01
1
Confidence intervals with nls()
I have data that looks like O.lengthO.age 176 1 179 1 182 1 ... 493 5 494 5 514 5 606 5 462 6 491 6 537 6 553 6 432 7 522 7 625 8 661 8 687 10 704 10 615 12 (truncated) with a simple VonB growth model from within nls(): plot(O.length~O.age, data=OS) Oto = nls(O.length~Linf*(1-exp(-k*(O.age-t0))), data=OS, start=list(Linf=1000, k=0.1, t0=0.1), trace=TRUE) mod <- seq(0, 12)
2008 Sep 02
2
nls.control()
All - I have data: TL age 388 4 418 4 438 4 428 5 539 10 432 4 444 7 421 4 438 4 419 4 463 6 423 4 ... [truncated] and I'm trying to fit a simple Von Bertalanffy growth curve with program: #Creates a Von Bertalanffy growth model VonB=nls(TL~Linf*(1-exp(-k*(age-t0))), data=box5.4, start=list(Linf=1000, k=0.1, t0=0.1), trace=TRUE) #Scatterplot of the data plot(TL~age, data=box5.4,
2010 Aug 23
2
Quantile Regression and Goodness of Fit
All - Does anyone know if there is a method to calculate a goodness-of-fit statistic for quantile regressions with package quantreg? Specifically, I'm wondering if anyone has implemented the goodness-of-fit process developed by Koenker and Machado (1999) for R? Though I have used package quantreg in the past, I may have overlooked this function, if it is included. Citation: Koenker, R. and
2008 Dec 18
2
Contextstack overlow
All - I have a number of rows that I am assigning length classes to via l.class<-with(wae, ifelse((Length>=120)&(Length<130),"125", ifelse((Length>=130)&(Length<140),"135", ifelse((Length>=140)&(Length<150),"145", ifelse((Length>=150)&(Length<160),"155",
2008 Jun 13
2
Quartile regression question
I have data that looks like lake,loglength,logweight 1,2.369215857,1.929418926 1,2.426511261,2.230448921 1,2.434568904,2.298853076 1,2.437750563,2.298853076 1,2.442479769,2.230448921 1,2.445604203,2.356025857 ... 102,2.722633923,3.310268367 102,2.781755375,3.502153893 102,2.836324116,3.683407299 102,2.802773725,3.583312152 102,2.790285164,3.546419267 102,2.806179974,3.599118565
2008 Jun 12
2
Predicting from an nls model
I keep running up against the same error when I try to plot a line from a nls model. The data is fisheries length/weight data. Code follows: require(graphics) pow = nls(Weight~alpha*Length^beta, data=wae, start=list(alpha=0.0000001, beta=3.0), trace=TRUE) predict(pow) plot(Weight~Length,
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
2008 Aug 22
2
Newbie programming help
All - Not sure if this is a real programming question, but here goes: I have data that looks like Lake Length Weight 1 158 45 1 179 70 1 200 125 1 202 150 1 206 145 1 209 165 1 210 140 1 215 175 1 216 152 1 220 150 1 221 165 ... where lake goes from 1 - 84 and the number of rows for each lake is variable (but > ~20). I'm trying to do two things: 1) build a simple linear model of the
2006 Jan 27
1
how calculation degrees freedom
Hi, I' m having a hard time understanding the computation of degrees of freedom when runing nlme() on the following model: > formula(my data.gd) dLt ~ Lt | ID TasavB<- function(Lt, Linf, K) (K*(Linf-Lt)) my model.nlme <- nlme (dLt ~ TasavB(Lt, Linf, K), data = my data.gd, fixed = list(Linf ~ 1, K ~ 1), start = list(fixed = c(70, 0.4)), na.action= na.include,
2001 Sep 07
3
fitting models with gnls
Dear R-list members, Some months ago I wrote a message on the usage of gnls (nlme library) and here I come again. Let me give an example: I have a 10 year length-at-age data set of 10 fishes (see growth.dat at the end of this message) and I want to fit a von Bertalanffy growth model, Li= Linf*(1-exp(-k*(ti-t0))) where Li = length at age i, Linf= asymptotic length, k= curvature parameter, ti=
2007 Jun 14
1
R programming question
Dear All., I've created R-code for which a user will be asked to choose between 2 analyses. I've written one function for each type of analysis. Within each function, the users is prompted to enter information. An example is: cat("Enter value for lower Linf :\n") L1<-scan(n=1) cat("Enter value for upper Linf :\n") L2<-scan(n=1)
2008 Jul 03
1
lm() question
I have data that looks like YC Age Num 82 11 2 83 10 0 84 9 8 85 8 21 86 7 49 87 6 18 88 5 79 89 4 28 90 3 273 91 2 175 with a program mod1=lm(log(Num+1)~YC, data=box44) plot(log(Num+1)~YC, data=box44, pch=19, xlab="Year Class", ylab="Loge Number at age", ylim=c(0,6), xlim=c(91,82)) abline(lm(log(Num+1)~YC), col="blue", lwd=2) summary(mod1) I need to
2008 Aug 29
1
lm() and dffits
All - My question is a bit involved, so bear with me. I have some data that looks like: Lake LL LW 81 2.176091259 1.342422681 81 2.176091259 1.414973348 81 2.176091259 1.447158031 81 2.181843588 1.414973348 81 2.181843588 1.447158031 81 2.184691431 1.462397998 81 2.187520721 1.447158031 81 2.187520721 1.477121255 81 2.187520721 1.505149978 ... [truncated] I'm trying to: 1) fit a simple
2001 Jun 01
1
nls works but not gnls
This works fine: fit42<-nls(Vfs~SSlogis(Months,Asym.Int+Asym.Group*Groupdum,xmid,scal), data=df, start=c(Asym.Int=22,Asym.Group=5,xmid=2,scal=6), na.action=na.omit) But this, identical except using gnls, doesn't converge: fit43<-gnls(Vfs~SSlogis(Months,Asym.Int+Asym.Group*Groupdum,xmid,scal), data=df, start=c(Asym.Int=22,Asym.Group=5,xmid=2,scal=6), na.action=na.omit) Error in gnls(Vfs
2012 Nov 27
4
Finding values in one column and
All - I have a data frame data.a ID valueA valueB 6 12 12 17 15 14 58 18 16 98 11 12 73 19 20 84 19 14 58 20 14 24 11 12 81 15 16 21 15 14 62 14 12 67 13 14 78 13 17 35 10 13 13 11 15 14 17 18 85 16 15 35 13 9 18 15 16 and a data frame data.b ID valueA valueB 6 84 21 78 14 I'd like to have R find the data.b$ID in data.a$ID and insert the corresponding data.a$valueA and
2012 Dec 11
5
Retain last grouping after a strsplit()
All - I have a column of SiteNames: SiteName OYS-PIA2-FL-1 OYS-PIA2-LA-1 OYS-PI-LA-BB-1 OYS-PIA2-LA-10 ... [truncated] and I want to include only the last few digits into a new column. I tried substr(data$SiteName, 13, 20) but because some SiteName values are of a different length, the final hyphen (i.e., "-") was included: "1" "1" "-1" "10"
2006 Feb 02
1
Significance of degrees of freedom in nlme
Dear Dr. Bates, Thank you very much for your response. I had consulted the algorithm described in Pinheiro and Bates. However, what I don't understand (among other things) is why my two parameters appear to be estimated at different grouping levels (based on the DF values). Affect this different values of DF at the estimates parameters? The estimates fixed effects were get at the same level of
2010 Sep 29
2
fitting model to resampled data
I apologize if this comes across as confusing. I will try to explain my situation as best I can. I have R bootstrapping my growth data for fish. It's resampling my database of age and length data and then produces several new datasets for me. In this case, it's resampling my data to create three new datasets of age and length data. Here is my code with my original data called
2013 Oct 11
3
Create sequential vector for values in another column
Hello all - I have an example column in a dataFrame id.name 123.45 123.45 123.45 123.45 234.56 234.56 234.56 234.56 234.56 234.56 234.56 345.67 345.67 345.67 456.78 456.78 456.78 456.78 456.78 456.78 456.78 456.78 456.78 ... [truncated] And I'd like to create a second vector of sequential values (i.e., 1:N) for each unique id.name value. In other words, I need id.name x 123.45 1 123.45
2011 Mar 24
3
tapply with specific quantile value
All - I have an example data frame x l.c.1 43.38812035 085 47.55710661 085 47.55710661 085 51.99211429 085 51.99211429 095 54.78449958 095 54.78449958 095 56.70201864 095 56.70201864 105 59.66361903 105 61.69573564 105 61.69573564 105 63.77469479 115 64.83191994 115 64.83191994 115 66.98222118 115 66.98222118 125 66.98222118 125 66.98222118 125 66.98222118 125 and I'd like to get the 3rd