search for: asym

Displaying 20 results from an estimated 150 matches for "asym".

Did you mean: asm
2009 Jun 11
1
formula for degrees of freedom for nonlinear mixed model in nlme
...treatments and two types (84 observations in total), but den df for each parameter of the model is 64. Isn’t it too high? Your help is greatly appreciated, Julia Summary of the CO2 example: > summary(fm4CO2.nlme) Nonlinear mixed-effects model fit by maximum likelihood Model: uptake ~ SSasympOff(conc, Asym, lrc, c0) Data: CO2 AIC BIC logLik 388.4185 420.0191 -181.2092 Random effects: Formula: list(Asym ~ 1, lrc ~ 1) Level: Plant Structure: General positive-definite, Log-Cholesky parametrization StdDev Corr Asym.(Intercept) 2.349640 As.(I) l...
2008 May 27
3
How to test significant differences for non-linear relationships for two locations
Hi List, I have to compare a relationship between y and x for two locations. I found logistic regression fits both datasets well, but I am not sure how to test if relationships for both sites are significantly different. I searched the r site, however no answers exactly match the question. I used Tukey's HSD to compare two means, but the relationship in my study was not simply linear. So I
2009 May 04
1
how to change nlme() contrast parametrization?
How to set the nlme() function to return the answer without the intercept parametrization? #========================================================================================= library(nlme) Soybean[1:3, ] (fm1Soy.lis <- nlsList(weight ~ SSlogis(Time, Asym, xmid, scal),                        data = Soybean)) (fm1Soy.nlme <- nlme(fm1Soy.lis)) fm2Soy.nlme <- update(fm1Soy.nlme, weights = varPower()) plot(ranef(fm2Soy.nlme, augFrame = TRUE),      form = ~ Year * Variety, layout = c(3,1)) soyFix <- fixef(fm2Soy.nlme) options(contrasts = c(&...
2013 Mar 15
2
nlrob and robust nonlinear regression with upper and/or lower bounds on parameters
I have a question regarding robust nonlinear regression with nlrob. I would like to place lower bounds on the parameters, but when I call nlrob with limits it returns the following error: "Error in psi(resid/Scale, ...) : unused argument(s) (lower = list(Asym = 1, mid = 1, scal = 1))" After consulting the documentation I noticed that upper and lower are not listed as parameter in the nlrob help documentation. I haven't checked the source to confirm this yet, but I infer that nlrob simply doesn't support upper and lower bounds. For my c...
2011 Nov 17
3
Obtaining a derivative of nls() SSlogis function
Hello, I am wondering if someone can help me. I have the following function that I derived using nls() SSlogis. I would like to find its derivative. I thought I had done this using deriv(), but for some reason this isn't working out for me. Here is the function: asym <- 84.951 xmid <- 66.90742 scal <- -6.3 x.seq <- seq(1, 153,, 153) nls.fn <- asym/((1+exp((xmid-x.seq)/scal))) try #1 deriv(nls.fn) #get an Error in .Internal(deriv.default(expr, namevec, function.arg, tag, hessian)) : 'namevec' is missing try #2 deriv(nls.fn, namevec=c(&q...
2008 Jan 04
3
nls (with SSlogis model and upper limit) never returns (PR#10544)
...mputation never finishes and locks R up: > values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, 0.612, 0.556, 0.4025, 0.173)) > y.max <- max(values$y) > model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port", start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf)) This used to work with R version 2.5.1 patched. The problem does _not_ occur if the parameter "scal=-0.5" in the nls call is changed, e. g. to "scal=-0.6" o...
2006 Apr 10
3
SE estimates for treatment groups from nlme
I am wondering how to obtain SE estimates for fixed effects from a nonlinear mixed effects model? I have fixed effects corresponding to three factors A, B and C with 2, 3 and 3 levels respectively. I have fit a model of the following general form: nlme1<-nlme(y~ SasympOrig(x, Asym, lrc), data=df, fixed=list(Asym~A*B*C, lrc~A*B*C), start=c(fixef(ETR.nlme)[1], rep(0,17), fixef(ETR.nlme)[2], rep(0,17))) I am using the default ("contr.treatment" and "contr.poly"). The summary table (tTable) gives me the baseline coefficients and a list of diff...
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,...
2004 May 18
0
nlme: Initial parameter estimates
...loglikelihood, AIC and also on the significance of some parameter). Below the fit of the same model for different values of initial parameters: 1- Initial parameters = c(3, 20, -3.732865) >summary(fm.nlme) Nonlinear mixed-effects model fit by maximum likelihood Model: MTL ~ SSlogis(age, Asym, xmid, scal) Data: data AIC BIC logLik 7.996858 33.22420 2.001571 Random effects: Formula: list(Asym ~ 1, xmid ~ 1) Level: optid Structure: Diagonal Asym xmid Residual StdDev: 0.2577518 0.004429942 0.1616483 Fixed...
2011 Aug 09
1
nls, how to determine function?
...,NA,0,NA,0,0,0,NA,0.212454212,3.120181406,NA,0.011811024,NA,0,0.120430108,5.928571429,1.75,0.679292929,0.97,NA,0,NA,NA,1,0.38547486,NA,1.460732984,0.007795889,0.05465288,0.004341534) dat.df.1 <- data.frame(dat) dat.df.2 <- data.frame(x=x.seq, dat.df=dat.df.1) fit.dat <-nls(dat ~ SSlogis(x, Asym, xmid,scal), data = dat.df.2, start =list(Asym=90, xmid = 75, scal = -6)) plot(dat.df.2, axes=FALSE, ann=FALSE, ylim=c(0,100)) lines(dat.df.2$x[complete.cases(dat.df.2)], predict(fit.dat), ylim=c(0,100)) summary(fit.dat) ************************************************************************** F...
2000 Oct 14
2
Access to calculations in nls
Hi, I would like to be able to access the calculated results from the nls package. Using the example in R, fm3DNase1 we can reurn certain parts of the calculations: > coef(fm3DNase1) Asym xmid scal 2.345179 1.483089 1.041454 > resid(fm3DNase1) [1] -0.0136806237 -0.0126806237 0.0089488569 0.0119488569 -0.0025803222 [6] 0.0064196778 0.0026723396 -0.0003276604 -0.0187778127 -0.0237778127 [11] 0.0381369952 0.0201369952 -0.0335131004 -0.0035131004 0.0150122651 [16]...
2002 Aug 28
2
sourcing a file with the plot.lme() function
I ran into a problem trying to make a plot from a file that's read using source. Basically, I have the following code in a file "plot.R" : library(nlme) data(Loblolly) fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc), data = Loblolly, fixed = Asym + R0 + lrc ~ 1, random = Asym ~ 1, start = c(Asym = 103, R0 = -8.5, lrc = -3.3)) windows(6,6) plot(fm1) This code is taken from the help page for 'nlme'. If I cut an paste this code into th...
2004 Feb 20
1
nlme and multiple comparisons
This is only partly a question about R, as I am not quite sure about the underlying statistical theory either. I have fitted a non-linear mixed-effects model with nlme. In the fixed part of the model I have a factor with three levels as explanatory variable. I would like to use Tukey HSD or a similar test to test for differences between these three levels. I have two grouping factors:
2009 Nov 09
1
Parameter info from nls object
...k 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 ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) > summary(fm1DNase1) Formula: density ~ SSlogis(log(conc), Asym, xmid, scal) Parameters: Estimate Std. Error t value Pr(>|t|) Asym 2.34518 0.07815 30.01 2.17e-13 *** xmid 1.48309 0.08135 18.23 1.22e-10 *** scal 1.04146 0.03227 32.27 8.51e-14...
2001 Oct 07
1
Bug in Deriv? (PR#1119)
...ession not shown, it is the same for all versions. _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 3.0 year 2001 month 06 day 22 language R ----------------------------------------------------------------- > deriv(~offv+Asym/(1+exp(-(x-xmid)/scal)),"x") expression({ .expr4 <- exp(-x - xmid/scal) #### Wrong !!!! > deriv(~offv+Asym/(1+exp(-x/scal+xmid/scal)),"x") expression({ .expr5 <- exp(-x/scal + xmid/scal) ## Correct > deriv(~offv+Asym/(1+exp((xmid-x)/scal)),"x")...
2001 Aug 08
1
NLME augPred error
...d(area3.pen.nlme, primary=~day) Error in predict.nlme(object, value[1:(nrow(value)/nL), , drop = FALSE], : Levels 1,2,3 not allowed for block > predict.nlme(area3.pen.nlme) does not produce an error. area3.pen.nlme was created with: > area3.pen.nlme <- nlme(area ~ SSlogis(day, Asym, xmid, scal), + data=area.pen.data, + fixed = Asym + xmid + scal ~ dose + block, + random = Asym + xmid + scal ~ 1|seedling, + weights = varPower(), + start = c(2887,0,0,0,10.7,0,0,0,2.29,0,0,0)) > area, day and dose are numeric block and seedling are factors area is the area in mm2 of o...
2001 May 24
0
nlme help please
...)) fixed effect for param a = 10,10, 20,20, random effects= +2, -2, +2, -2 fixed effect for param b=2, fixed effect for c = .5 normal noise with sd=1 was added to all y values. I do: df<-read.table(file="papers/alex/junk.dat",header=TRUE) attach(df) fullfit<-nlsList(y~SSlogis(Time,Asym,xmid,scal)|Subject,data=df) and get the separate fits of the logistic to each subject's data. 4 curves and 4 sets of param values (12 params total for the model). How do I get the fit of the model which is the true one as stated above: Asym for group A (fixed effect) Asym for group B (fixed e...
2010 Apr 12
0
How to derive function for parameters in Self start model in nls
.... there is lost of example, (i.e. SSgompertz, SSmicman, SSweibull, etc). my question is, how to derive the function of parameters. and also which model to use for get the initials values. In the following example's the red color coding requires the explanation?? thanks SSgompertz function (x, Asym, b2, b3) { .expr2 <- b3^x .expr4 <- exp(-b2 * .expr2) .value <- Asym * .expr4 .actualArgs <- as.list(match.call()[c("Asym", "b2", "b3")]) if (all(unlist(lapply(.actualArgs, is.name)))) { .grad <- array(0, c(length(.value), 3L)...
2013 Feb 17
1
xtable nlme
Hola a todos Les consulto por un problema con xtable y nlme, tomando un ejemplo del manual de nlme para obtener los resultados en latex utilizando xtable, se puede utilizar el siguiente código, pero hay un problema y causa error. library(nlme) library(xtable) fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc), data = Loblolly, fixed = Asym + R0 + lrc ~ 1, random = Asym ~ 1, start = c(Asym = 103, R0 = -8.5, lrc = -3.3)) summary(fm1) xtable(summary(fm1)) Por si prefieren no ejecutar el código, el mensaje de error es: Error en UseMethod(...
2009 Oct 02
1
nls not accepting control parameter?
...51074, 152241, 153919, 155580, 157258, 158981, 160591, 162126, 163743, 165213, 166695, 168023, 169522, 170746, 172057, 173287, 173977, 175232, 176308, 177484) ) nls( y ~ SSlogis(x, Asym, xmid, scal), data = dat, trace=TRUE) (newMinFactor <- 1/(4*1024)) nls( y ~ SSlogis(x, Asym, xmid, scal), data = dat, control=nls.control(minFactor=newMinFactor), trace=TRUE) nls( y ~ SSlogis(x, Asym, xmid, scal), data = dat, control=c(minFactor=newMinFactor), trace=TRUE) (newMinFactor <-...