search for: gompertz

Displaying 20 results from an estimated 41 matches for "gompertz".

2012 Nov 15
2
survreg & gompertz
Hi all, Sorry if this has been answered already, but I couldn't find it in the archives or general internet. Is it possible to implement the gompertz distribution as survreg.distribution to use with survreg of the survival library? I haven't found anything and recent attempts from my side weren't succefull so far. I know that other packages like 'eha' and 'flexsurv' offer functions similar to survreg with gompertz sup...
2005 Aug 03
1
passing variable to formula environment
List gurus, I'm trying to code a Gompertz growth curve function as part of a larger project and have run across a problem due to my ignorance of environments. Some sample data and the function are as follows: growth <- data.frame(age = c(1.92, 3, 5.83, 3.17, 15.5, 1.17, 5.58, 13.33, 14.29, 5.83, 13.79, 6.33, 13.75, 16.83, 13, 11.67,...
2010 Feb 05
1
Using coxph with Gompertz-distributed survival data.
...e survival package must have come across this problem before, so I would like to ask you how you dealt with it. I have set up an illustrative example and included it at the end of this post. I took a sample of 100 data points from each of two populations ('a' and 'b') known to have Gompertz distributions that differ in both their lambda (initial rate, which is higher in population 'a') and gamma (acceleration rate, which is higher in population 'b') parameters. Each data point represents the age at which an experimental animal died. First question: given the way the p...
2012 Jul 01
1
significant difference between Gompertz hazard parameters?
Hello, all. I have co-opted a number of functions that can be used to plot the hazard/survival functions and associated density distribution for a Gompertz mortality model, given known parameters. The Gompertz hazard model has been shown to fit relatively well to the human adult lifespan. For example, if I wanted to plot the hazard (i.e., mortality) functions: pop1 <- function (t) { x=c(0.03286343, 0.04271132) a3<-x[1] b3<-x[2] sh...
2009 Mar 06
1
fitting a gompertz model through the origin using nls
Dear all! I tried to fit Gompertz growth models to describe cummulative germination rates using nls. I used the following code: germ.model<-nls(percent.germ~a*exp(-b*exp(-k*day)),data=tab,start=list(a=100,b=10,k=0.5)) My problem is that I want that the fitted model goes through the origin, since germination cannot start before...
2012 Apr 23
0
summing two probability density functions from Gompertz hazard model
Hi, r-help members. I have a question about summing two density distributions. I have two samples from which I've estimated hazard parameters for a Gompertz mortality model. With those parameters, I can calculate the PDF (survival function times hazard function) of ages-at-death in a birth cohort subject to the hazard function at each age. I'd like to combine these two density functions and recalculate the resultant hazard parameters that describ...
2012 Dec 03
2
Solving a multinomial gompertz partial differential equation in r
I haven't used r in quite a while but would like to get back into it. I have a problem that I would like to solve with r. I have some multinomial data that looks to follow an asymmetric sigmoidal growth pattern. Solving a multinomial gompertz partial differential equation in r is what I’m after. Would anyone be able to provide me the code and packages to do something like this? Regards, [[alternative HTML version deleted]]
2012 Apr 16
0
Gompertz-Makeham hazard models---test for significant difference
...35 43 [3,] 35 50 26 [4,] 50 Inf 14 So above, the first two columns are the lower and upper limits of the age-range categories (typically used by paleodemographers), and the third column is the number of skeletons assigned to each group. I've co-opted some R script for fitting a Gompertz-Makeham hazard model to this data... ############################## GM.naga <- function(x,deaths=naga) { a2=x[1] a3=x[2] b3=x[3] shift<-15 nrow<-NROW(deaths) S.t<-function(t) { return(exp(-a2*(t-shift)+a3/b3*(1-exp(b3*(t-shift))))) } d<-S.t(deaths[1:nr...
2008 Nov 12
3
Fitting data to a sigmoidal curve
...I'm a biologist trying to figure out the growth rate of salamanders in different ponds. I collected individuals from various populations at different dates, and using the size and date collected, I want to figure out the growth curve of each population. My question is: How do I fit my data to a Gompertz function in R? Thank you so much! Sarah -- View this message in context: http://www.nabble.com/Fitting-data-to-a-sigmoidal-curve-tp20466784p20466784.html Sent from the R help mailing list archive at Nabble.com.
2011 Aug 16
1
Fit Gompertz' curve'
Hi, I build a graph taking into account the times: 1, 2,4,6,8,10,12,15,18,21,24,28,32 and 48. Be that the scale of the X axis does not look right. It seems equidistant. (graph attached) What changes have I to do in the following commands so that the scale be correct? interaction.plot(Tempo, Trat, Valor, ylim=c(0, 2), las=1, lty=c(1,2,3,4), lwd=3, bty='l',
2013 Jun 03
0
interpretation of flexsurvreg output from flexsurv package
Dear all, I am fitting a parametric regression model to survival data using the flexsurvreg function from the flexsurv package. I am using a Gompertz distribution (a 2-parameter distribution) to describe the hazard function and I want to compare two groups. The model is very simple: flexsurvreg(formula = Surv(day, censored) ~ group, dist = "gompertz") and the output is also quite simple: Maximum likelihood estimates:...
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam, I'm having trouble de-bugging the following - which works perfectly well with optim or optimx - but not with mle2. I'd be really grateful if someone could show me what is wrong. Many thanks in advance. JSC: gompertz<- function (x,t=data) { a3<-x[1] b3<-x[2] shift<-data[1] h.t<-a3*exp(b3*(t-shift)) S.t<-exp(a3/b3*(1-exp(b3*(t-shift)))) PF<-1-(exp(a3/b3*(1-exp(b3*(data[1]-shift))))) QF<-1-(exp(a3/b3*(1-exp(b3*(data["length"(data)]-shift)...
2008 Jan 23
2
Parametric survival models with left truncated, right censored data
Dear All, I would like to fit some parametric survival models using left truncated, right censored data in R. However I am having problems finding a function to fit parametric survival models which can handle left truncated data. I have tested both the survreg function in package survival: fit1 <- survreg(Surv(start, stop, status) ~ X + Y + Z, data=data1) and the psm function in package
2005 Oct 27
3
outer-question
...uter(a,b) ## A bit more complicated is this: f <- function(a,b,d) { return(a*b+(sum(d))) } additional <- runif(100) outer(X=a, Y=b, FUN=f, d=additional) ## So far so good. But now my real example. I would like to plot the ## log-likelihood surface for two parameters alpha and beta of ## a Gompertz distribution with given data ### I have a function to generate random-numbers from a Gompertz-Distribution ### (using the 'inversion method') random.gomp <- function(n, alpha, beta) { return( (log(1-(beta/alpha*log(1-runif(n)))))/beta) } ## Now I generate some 'lifetim...
2005 Oct 27
3
outer-question
...uter(a,b) ## A bit more complicated is this: f <- function(a,b,d) { return(a*b+(sum(d))) } additional <- runif(100) outer(X=a, Y=b, FUN=f, d=additional) ## So far so good. But now my real example. I would like to plot the ## log-likelihood surface for two parameters alpha and beta of ## a Gompertz distribution with given data ### I have a function to generate random-numbers from a Gompertz-Distribution ### (using the 'inversion method') random.gomp <- function(n, alpha, beta) { return( (log(1-(beta/alpha*log(1-runif(n)))))/beta) } ## Now I generate some 'lifetim...
2011 Jun 17
2
Non-linear Regression best-fit line
...tion of mortalities, and t is the time in hours (see below). Asym. at 0 and 1 > y [1] 0.00000000 0.04853859 0.08303777 0.15201970 0.40995074 0.46444992 0.62862069 0.95885057 1.00000000 [10] 1.00000000 1.00000000 > t [1] 0 13 20 24 37 42 48 61 72 86 90 I tried to find starting values for a Gompertz non-linear regression by converting the equation (y~1*exp(-beta*exp(-gamma*t)) to a linear form per Dalgaard "Introductory Statistics with R" pg.279-280. But got this Error message: > lm(log(0-log(y))~t) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/Na...
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
...e. Although my working setting implies a different parametric model (which cannot be framed in the glm), I guess that what I'll get from the following example it would help for the next steps. Anyway here it is. Firstly I simulated from a series of exposures, a series of deaths (given a model, Gompertz, and a probability distribution, Poisson). Then a multiply both deaths and exposures by a constant. Finally I fitted with glm the simulated data sets and I compared the deviance residuals. They're different by a certain constant, but I could not get a meaningful relationship between the used co...
2012 Feb 18
3
foreach %do% and %dopar%
Hi everyone, I'm working on a script trying to use foreach %dopar% but without success, so I manage to run the code with foreach %do% and looks like this: The code is part of a MCMC model for projects valuation, returning the most important results (VPN, TIR, EVA, etc.) of the simulation. foreach (simx = NsimT, .combine=cbind, .inorder=FALSE, .verbose=TRUE) %do% { MCPVMPA = MCVAMPA[simx]
2003 Nov 11
1
nlme-problem
Hi, I have a problem with fitting a nonlinear mixed-effects model to my data. I was able to fit quite simple exponential model but now I?m trying to fit the following Gompertz model: > gomp<-nlme(paino~b0+b1*exp(-exp(-b2*(daydeg.scale-b3))), data=group1, fixed=b0+b1+b2+b3~1, start=c(b0=150, b1=3000, b2=0.6, b3=2500)) I?m getting the following error: Error in chol((value + t(value))/2) : the leading minor of order 2 is not positive definite Could you give me som...
2005 Aug 18
1
How to put factor variables in an nls formula ?
Hello, I want to fit a Gompertz model for tree diameter growth that depends on a 4 levels edaphic factor (?Drain?) and I don?t manage to introduce the factor variable in the formula. Dinc is the annual diameter increment and D is the Diameter. >treestab > Dinc D Drain [1,] 0.03 26.10 2 [2,] 0.04...