Hi R experts :) I'm trying to carry out a survival model on my data, but I am unsure of whether it's appropriate or if I should do something specific in regards to hazard. My data is time to death by predator where I have 8 prey and one predator in the setting. This means that two prey can't possibly die at the same time and I can't quite get my head around how to include this in the model. I have repeats, so I have 15 replicates of the 8 prey one predator setting. What I have done so far is include replicate as a random factor in a coxme (as it is a different predator each time, so the time of death may vary depending on predator), but that doesn't really address the issue of prey having to die in a sequential manner. I was thinking I could make the time to death the time until first prey eaten for prey one and then the time from prey one to prey two the time to death for prey two, but I'm not sure if that's appropriate. Also, encounter rates will decrease as there are fewer prey available and the predator will become less hungry the more prey it eats. All the examples (and examples are the way I learn best) have survival analysis based on completely independent deaths such as dying from cancer, time to flowering etc where the event could happen at the same time for all the individuals. Can anyone help me get my head around this or maybe point me to some good information in a book or online? Just realised this sounds a bit gruesome, but the prey are frozen bloodworms and the predator a small fish. Thank you ever so much, Freya -- View this message in context: http://r.789695.n4.nabble.com/Not-sure-how-to-handle-hazard-in-my-survival-model-tp3345615p3345615.html Sent from the R help mailing list archive at Nabble.com.
Rainer M Krug
2011-Mar-10 11:57 UTC
[R] Not sure how to handle hazard in my survival model
Dear Freya On Thu, Mar 10, 2011 at 12:10 PM, bsaj <bsaj at leeds.ac.uk> wrote:> Hi R experts :) > > I'm trying to carry out a survival model on my data, but I am unsure of > whether it's appropriate or if I should do something specific in regards to > hazard. > > My data is time to death by predator where I have 8 prey and one predator in > the setting. This means that two prey can't possibly die at the same time > and I can't quite get my head around how to include this in the model. I > have repeats, so I have 15 replicates of the 8 prey one predator setting. > What I have done so far is include replicate as a random factor in a coxme > (as it is a different predator each time, so the time of death may vary > depending on predator), but that doesn't really address the issue of prey > having to die in a sequential manner. I was thinking I could make the time > to death the time until first prey eaten for prey one and then the time from > prey one to prey two the time to death for prey two, but I'm not sure if > that's appropriate. Also, encounter rates will decrease as there are fewer > prey available and the predator will become less hungry the more prey it > eats. All the examples (and examples are the way I learn best) have survival > analysis based on completely independent deaths such as dying from cancer, > time to flowering etc where the event could happen at the same time for all > the individuals.this sounds to me like a rather complicated scenario to model analytically. Depending on which question you want to answer, I would be using a simulation model, in which you can weasily put all the rules you specified. This model can be deterministic or stochastic, depending on your requirements. if you have the simulation model, you can then analyse it numerically. Hope this helps, Rainer> > Can anyone help me get my head around this or maybe point me to some good > information in a book or online? > > Just realised this sounds a bit gruesome, but the prey are frozen bloodworms > and the predator a small fish. > > Thank you ever so much, > > Freya > > -- > View this message in context: http://r.789695.n4.nabble.com/Not-sure-how-to-handle-hazard-in-my-survival-model-tp3345615p3345615.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell:? ? ? ? ?? +27 - (0)83 9479 042 Fax:? ? ? ? ? ? +27 - (0)86 516 2782 Fax:? ? ? ? ? ? +49 - (0)321 2125 2244 email:? ? ? ? ? Rainer at krugs.de Skype:? ? ? ? ? RMkrug Google:? ? ? ?? R.M.Krug at gmail.com
Rainer M Krug
2011-Mar-10 12:17 UTC
[R] Not sure how to handle hazard in my survival model
On Thu, Mar 10, 2011 at 1:11 PM, Asa Johannesen <bsaj at leeds.ac.uk> wrote:> Dear Rainer, > > Thank you very much for the suggestion. I had no idea that was even an option! > > I've never run any simulations so that may be a bit more than I could get in to right now. If I wanted to run a simulation model, where should I start? Maybe there's a good book on it I might get from the library?That depends on what you want to simulate and how - but look into the package simecol which includes some simulation models which will get you started. Just google for ecological modelling, and you will find lots of good starting points.> > Someone else suggested multiple event AG or WLW cox models where the analysis would focus on the fish having multiple ordered events happening to them (worm 1 to 8 depending on censoring). > > The question I'm trying to answer is: do the factors change how long it takes the fish to find the worms? The factors are environmental and I want to know how each environment affects the time to death for each worm or in the case of AG/WLW the time to each event for the fish. Either way could work for me I think.That definitely sounds like a good example for a (rule based) simulation model, as analytical models can gett mathematically quite complex. Cheers, Rainer> > Does that make sense? > > Thank you again. > > Regards, > > Freya > > -----Original Message----- > From: Rainer M Krug [mailto:r.m.krug at gmail.com] > Sent: 10 March 2011 11:57 > To: Asa Johannesen > Cc: r-help at r-project.org > Subject: Re: [R] Not sure how to handle hazard in my survival model > > Dear Freya > > > On Thu, Mar 10, 2011 at 12:10 PM, bsaj <bsaj at leeds.ac.uk> wrote: >> Hi R experts :) >> >> I'm trying to carry out a survival model on my data, but I am unsure of >> whether it's appropriate or if I should do something specific in regards to >> hazard. >> >> My data is time to death by predator where I have 8 prey and one predator in >> the setting. This means that two prey can't possibly die at the same time >> and I can't quite get my head around how to include this in the model. I >> have repeats, so I have 15 replicates of the 8 prey one predator setting. >> What I have done so far is include replicate as a random factor in a coxme >> (as it is a different predator each time, so the time of death may vary >> depending on predator), but that doesn't really address the issue of prey >> having to die in a sequential manner. I was thinking I could make the time >> to death the time until first prey eaten for prey one and then the time from >> prey one to prey two the time to death for prey two, but I'm not sure if >> that's appropriate. Also, encounter rates will decrease as there are fewer >> prey available and the predator will become less hungry the more prey it >> eats. All the examples (and examples are the way I learn best) have survival >> analysis based on completely independent deaths such as dying from cancer, >> time to flowering etc where the event could happen at the same time for all >> the individuals. > > this sounds to me like a rather complicated scenario to model > analytically. Depending on which question you want to answer, I would > be using a simulation model, in which you can weasily put all the > rules you specified. This model can be deterministic or stochastic, > depending on your requirements. > > if you have the simulation model, you can then analyse it numerically. > > Hope this helps, > > Rainer > >> >> Can anyone help me get my head around this or maybe point me to some good >> information in a book or online? >> >> Just realised this sounds a bit gruesome, but the prey are frozen bloodworms >> and the predator a small fish. >> >> Thank you ever so much, >> >> Freya >> >> -- >> View this message in context: http://r.789695.n4.nabble.com/Not-sure-how-to-handle-hazard-in-my-survival-model-tp3345615p3345615.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > > > -- > NEW GERMAN FAX NUMBER!!! > > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Natural Sciences Building > Office Suite 2039 > Stellenbosch University > Main Campus, Merriman Avenue > Stellenbosch > South Africa > > Cell:? ? ? ? ?? +27 - (0)83 9479 042 > Fax:? ? ? ? ? ? +27 - (0)86 516 2782 > Fax:? ? ? ? ? ? +49 - (0)321 2125 2244 > email:? ? ? ? ? Rainer at krugs.de > > Skype:? ? ? ? ? RMkrug > Google:? ? ? ?? R.M.Krug at gmail.com >-- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell:? ? ? ? ?? +27 - (0)83 9479 042 Fax:? ? ? ? ? ? +27 - (0)86 516 2782 Fax:? ? ? ? ? ? +49 - (0)321 2125 2244 email:? ? ? ? ? Rainer at krugs.de Skype:? ? ? ? ? RMkrug Google:? ? ? ?? R.M.Krug at gmail.com