[Basta-users] Negative senescence when enforced!

Colchero, Fernando Colchero at demogr.mpg.de
Thu Nov 10 20:52:59 CET 2011


Hi Cliff,

   Thanks for the update! You can simulate a dataset of ages at death from a Gompertz mortality (mu(x) = a * exp(b * x)) with the following code:

rgomp     = function(n, theta) {
  u      = runif(n)
  rx     = log(1 - log(1 - u) * theta[2] / exp(theta[1])) / theta[2]
  return(rx)
}

Where n is the number of individuals you want to simulate, and theta are: theta[1] = log(a) and theta[2] = b. You can fix theta[2] at some negative value.

   Best,

   Fernando
______________________________________________
 
Fernando Colchero

Max Planck Institute for Demographic Research
Konrad Zuse Str. 1, 18057, Rostock, Germany
Tel:  +49 (0) 381 2081 113
Fax: +49 (0) 381 2081 529
E-mail: Colchero at demogr.mpg.de
______________________________________________





On Nov 10, 2011, at 6:33 PM, Cliff Cunningham wrote:


	Dear Basta,

	I'm pleased to report that I have -- with an artificial dataset -- been able to recover patterns of declining mortality.  Thanks very much for fixing this!

	Is it possible to enforce declining mortality on a simulation (enforcing negative b1)?  I'd like to see how this affects the pattern of deaths in the life tables, as there are entire years with no deaths.
	
	
	Thanks very much!

	    Cliff Cunningham


	        Professor
	Biology Department
	     Duke University
	        130 Science Drive
	Durham NC 27708
	
	Phone 919-660-7356
	

	http://www.biology.duke.edu/cunningham




	_______________________________________________
	Basta-users mailing list
	Basta-users at lists.r-forge.r-project.org
	https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/basta-users
	



----------
This mail has been sent through the MPI for Demographic Research.  Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/basta-users/attachments/20111110/476c366d/attachment-0001.htm>


More information about the Basta-users mailing list