topic Re: Survival Statistics: Cage mortality in Discussions
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41892#M24435
<P>Select Analyze > Fit Model. Then click the button next to Personality and select Generalized Linear Models near the bottom of the drop down menu. You should see the choice for distribution and link function appear after that</P>
<P>I still think that your biggest hurdle is the layout of your data table. It isn't difficult, but if you don't set up the data correctly you will have trouble with most of the procedures. Did you try the layout I suggested?</P>
<P>A different layout is necessary for the GLM approach...</P>Wed, 12 Jul 2017 20:57:29 GMTmarkbailey2017-07-12T20:57:29ZSurvival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41802#M24380
<P>Hello, </P><P><BR />Firstly I would like to thank the community for being here to help with newbe questions. Ever since moving to this institution I have loved JMP!</P><P> </P><P>I am trying to do survival statistics for a study where I tracked cage mortality for 18 cages containing 50 flies each across 20 days. The cages each have variable number of dead per day. After reading and watching the "Advanced Mastering JMP: Analyzing Survival Data<SPAN> " I am still at a loss and wondering if this survival analysis is not suited for my type of stats. Maybe I would be better suited with a regression or something.</SPAN></P><P> </P><P><SPAN>Any suggestions or tips on better sources for troubleshooting would be greatly apreciated. </SPAN></P><P> </P><P><SPAN>Joe</SPAN></P><P> </P><P><SPAN> </SPAN></P>Tue, 11 Jul 2017 18:31:56 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41802#M24380joemama9852017-07-11T18:31:56ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41811#M24385
<P>Survival analysis is suitable here (but it does not exclude other methods - it depends on your aims). So, in the data table you have the colums:<BR />1. number of fly (1, 2, 3 etc)<BR />2. died (1), alive (0, this is censor cod). (Note, in JMP by default censor code is 1, so you need to change it)<BR />3. time to death (if the fly died) or 20 days (if the fly is alive)<BR />4. cage code (if it matters to you)</P><P>P.S. If you turn curve ie. that the curve goes from bottom to top (the survival platform gives you this possibility), you will get a cumulative probability of death</P>Tue, 11 Jul 2017 19:33:29 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41811#M24385Ted2017-07-11T19:33:29ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41813#M24387
Thank you for your response.<BR />Right now I have the data recorded as mortality per day per cage. The cages are the replicates and I am not concerned with individual flies, but rather the overall survival of each cage population. The method you mention above would have me catalog the survival of 900 individual flies. This would take a tremendous amount of time! Not to mention I have data from a repeat study with the same amount of replicates.<BR /><BR />My data is merely the tracking of loss over 20 days for each cage. I was hoping there would be an easier way to do this in JMP.Tue, 11 Jul 2017 21:10:07 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41813#M24387joemama9852017-07-11T21:10:07ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41816#M24390
<P>And if some fly flies before 20 days you will need to put her not 20 days, but the day of her flight (these are the rules of censoring). P.S. With flies you need to be careful, especially if consider, who is called the prince of flies ... :)</P>Tue, 11 Jul 2017 21:15:45 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41816#M24390Ted2017-07-11T21:15:45ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41819#M24393
<P>OK. 1. On the 20th day, open the cage and see how many flies are alive (a), and how many died (d). Such for each cell.<BR />2. You will get a series of numbers<BR />a1, d1 (for first cage)<BR />a2, d2 (for second)<BR />a3, d3 (for third)</P><P>etc.</P><P>3) Then do a pair comparison with <SPAN>contingency tables 2x2 ("Fit Y by X" platform)</SPAN></P><P>Compare:</P><P>a1, d1<BR />a2, d2<BR />then сompare:<BR />a1, d1<BR />a3, d3<BR />then сompare<BR />a2, d2<BR />a3, d3<BR />etc.<BR />4) As a result, you can select the <SPAN>cage </SPAN>pairs that are statistically significantly different (exact Fisher test). I don't think there will be many of them.<BR />P.S. If the <SPAN>cage</SPAN> are independent, then the effect of multiple comparisons will not be.</P>Tue, 11 Jul 2017 21:56:18 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41819#M24393Ted2017-07-11T21:56:18ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41828#M24398
<P>I think that there are at least three ways to analyze the mortality in JMP: Life Distribution, Survival, and Probit (using GLM in Fit Model). Let's start with the first two. You data is fine but it should be organized like this:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.jpeg" style="width: 830px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/6736i208302FDA4D85BD7/image-size/large?v=1.0&px=999" title="Capture.jpeg" alt="Capture.jpeg" /></span></P>
<P>You have 20 cages running for 20 days. Enter the <STRONG>number of new dead flies</STRONG> in the Count column for a given day and cage. Enter the number of surviving flies at the end of the table, in the rows with Censor = 1:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.jpeg" style="width: 830px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/6737iC32C22EF9C1EF730/image-size/large?v=1.0&px=999" title="Capture.jpeg" alt="Capture.jpeg" /></span></P>
<P>Then use the two saved table scripts to start the analyses.</P>
<P>I attached this template data table for you so you have to do is enter the Count data.</P>Wed, 12 Jul 2017 00:12:28 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41828#M24398markbailey2017-07-12T00:12:28ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41878#M24424
<P>It seems to me that in this research there is no interest in the dynamics of the process, but are interested in comparing the types of replications by final (on the 20th day) results (ratio of dead and live in percent), i.e. want to find a statistically significant difference in the proportions of live and dead depending on replication (cages)</P>Wed, 12 Jul 2017 18:30:24 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41878#M24424Ted2017-07-12T18:30:24ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41887#M24431
<P style="margin: 0in; margin-bottom: .0001pt;"><SPAN style="font-family: 'Arial',sans-serif; color: #333333;">I wanted to introduce a so-called “Complementary Log-Log model” for binomial response data as you have (i.e., # of dead files per cage population). This model is often applied to discrete survival time data. </SPAN></P>
<P style="margin: 0in; margin-bottom: .0001pt; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"><SPAN style="font-family: 'Arial',sans-serif; color: #333333;">The model is available in Fit Model’s <STRONG style="box-sizing: border-box;"><SPAN style="font-family: 'Arial',sans-serif;">Generalized Linear Model</SPAN></STRONG> personality by choosing <STRONG style="box-sizing: border-box;"><SPAN style="font-family: 'Arial',sans-serif;">Distribution: Binomial</SPAN></STRONG> and <STRONG style="box-sizing: border-box;"><SPAN style="font-family: 'Arial',sans-serif;">Link Function: Comp LogLog</SPAN></STRONG>.</SPAN></P>
<P style="margin: 0in; margin-bottom: .0001pt; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"><SPAN style="font-family: 'Arial',sans-serif; color: #333333;">Suppose you have recorded mortality (# of failures) for each cage at the end of Day 20. Let N be the cage population (i.e., trials). You will add both the mortality count and N columns as Y, and add Cage and any other covariates as model effects. The results allow you to test if the overall <SPAN style="box-sizing: border-box;">mortality</SPAN> rates differ significantly by cage and to predict the <SPAN style="box-sizing: border-box;">mortality</SPAN>.</SPAN></P>
<P style="margin: 0in; margin-bottom: .0001pt; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"><SPAN style="font-family: 'Arial',sans-serif; color: #333333;">If you want to estimate the baseline survival function then you would need to create a series of indicator variables that identify # of dead flies for each day and add them as model effects.</SPAN></P>Wed, 12 Jul 2017 20:42:23 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41887#M24431jiancao2017-07-12T20:42:23ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41889#M24433
<P>Please, specify for JMP 10. </P><P>Analyze=>Fit model=>?</P><P>I don't see "Generalized Linear Model" here. Thanks!</P>Wed, 12 Jul 2017 20:42:08 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41889#M24433Ted2017-07-12T20:42:08ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41891#M24434
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7-12-2017 4-53-49 PM.png" style="width: 584px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/6758i1BB3F1305741B000/image-size/large?v=1.0&px=999" title="7-12-2017 4-53-49 PM.png" alt="7-12-2017 4-53-49 PM.png" /></span></P>
<P> </P>
<P>Please also check out this JMP blog post <A href="https://community.jmp.com/t5/JMP-Blog/Reliability-regression-with-binary-response-data-probit-analysis/ba-p/30464" target="_blank">https://community.jmp.com/t5/JMP-Blog/Reliability-regression-with-binary-response-data-probit-analysis/ba-p/30464</A></P>Wed, 12 Jul 2017 20:58:01 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41891#M24434jiancao2017-07-12T20:58:01ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41892#M24435
<P>Select Analyze > Fit Model. Then click the button next to Personality and select Generalized Linear Models near the bottom of the drop down menu. You should see the choice for distribution and link function appear after that</P>
<P>I still think that your biggest hurdle is the layout of your data table. It isn't difficult, but if you don't set up the data correctly you will have trouble with most of the procedures. Did you try the layout I suggested?</P>
<P>A different layout is necessary for the GLM approach...</P>Wed, 12 Jul 2017 20:57:29 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41892#M24435markbailey2017-07-12T20:57:29ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41894#M24437
<P>Thank you kindly</P>Wed, 12 Jul 2017 21:46:31 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/41894#M24437joemama9852017-07-12T21:46:31ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193060#M41300
<P>Hi markbailey: Could you please provide added info on how to cast selected columns into roles? I've transformed my dataset as recomended, but also have 2 treatments and wonder if I'm entering the data right. So I have "phase" as Y, Time to Event; "Censor" column as Censor; "Count" column as Freq; and wonder if "Treatment" should be entered as By. The problem with this structure is that i fdont get a comparison between treatments. Can you please help?</P>Mon, 15 Apr 2019 19:13:27 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193060#M41300perezvic2019-04-15T19:13:27ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193063#M41301
<P>I have not looked at this problem in a long time. Let's start over and make sure that the solution suits your situation. Does this brief description capture your case?</P>
<P> </P>
<UL>
<LI>You divide cages over two treatments A and B.</LI>
<LI>You have c cages and half of them go to each treatment.</LI>
<LI>You have n subjects in each each cage at the start.</LI>
<LI>You observe the number of subjects alive/dead each day for d days.</LI>
</UL>
<P> </P>
<P>I do not know your standard analysis for such a case but there are three general approaches that I can think of, which seem suitable. You could perform a probit analysis using a Generalized Linear Model with a Poisson distribution and a probit link function. Treatment would be the only fixed effect. You could also perform a parametric survival analysis if you have a distribution model in mind. You could also perform a proportional hazards analysis without specifying the hazard function if the assumption is valid.</P>
<P> </P>
<P>If this description seems appropriate, then I can help you with the layout of your data table and the set up of the analysis.</P>Mon, 15 Apr 2019 20:01:16 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193063#M41301markbailey2019-04-15T20:01:16ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193064#M41302
<P>Yes, your description fits my dataset, just that I have phases (4) rather than days. Mortality is low (~5% of the entire dataset), and so it does not have normal distribution. I transformed the dataset to mimic the Fly Mortality example and ran Fit Life by X analysis. It confuses me that it shows a Wilcoxon Group Homogeneity Test (Chi-Square), as well as “No Effect vs. Location” (effect different from zero?), and a “Location vs. Location and Scale”. So I’m not sure whether one of those reflects the 2 treatment comparison.</P>Mon, 15 Apr 2019 20:18:47 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193064#M41302perezvic2019-04-15T20:18:47ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193295#M41359
<P>I mocked up your study:</P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 318px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/16910iFAD7C8118BA0E503/image-size/large?v=1.0&px=999" title="Capture.PNG" alt="Capture.PNG" /></span></P>
<P>Treatment is A or B. Phase is 1 to 4. Cage is 1 to 20. Flies is the count of dead flies. Censor is set to 0 for dead. The rows for Phase = 4 are duplicated to record the number of flies still alive and Censor is set to 1 for those rows.</P>
<P> </P>
<P>Note that Flies is a random number from a Weibull distribution so I could continue my reply.</P>
<P> </P>
<P>The homogeneity test assumes a null hypothesis that the distribution of all the groups (Treatment in this case) are the same. The alternative hypothesis is that the distributions are not all the same. This is the test for <EM>any Treatment effect</EM>.</P>
<P> </P>
<P>The Nested Models Tests are also for a Treatment effect, but they address the <EM>nature of the Treatment effect</EM>. These tests also start with the assumption of no effect. The first test compares the location parameter. The second compares the location and the scale parameter.</P>Wed, 17 Apr 2019 11:58:58 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193295#M41359markbailey2019-04-17T11:58:58ZRe: Survival Statistics: Cage mortality
https://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193694#M41417
<P>Thank you so much!</P>Thu, 18 Apr 2019 20:41:33 GMThttps://community.jmp.com/t5/Discussions/Survival-Statistics-Cage-mortality/m-p/193694#M41417perezvic2019-04-18T20:41:33Z