<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/surviving-shelter-analysis-of-time-spent-and-outcome-in-dallas-animal-shelters/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://novyden.blogspot.com/2018/04/surviving-shelter-analysis-of-time.html"> novyden</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><span>In previous <a rel="nofollow" href="https://novyden.blogspot.com/2017/08/dallas-animal-services-shelter-intake.html" target="_blank">post</a> we discovered Dallas Animal Services data sources (</span><span><span>available on </span><span><a rel="nofollow" href="https://www.dallasopendata.com/City-Services/FY-2017-Dallas-Animal-Shelter-Data/sjyj-ydcj" target="_blank">Dallas Open Data</a></span>) and successfully analyzed how animals get admitted to and discharged from the city shelters</span><span>. </span><span>We loaded </span><span><span>actual shelter records</span> and looked at the types of admittance, different outcomes and their relationships. </span><span>In this post we continue this analysis by focusing on the <i>time</i> animals spend and factors that favor or hinder <i>survival</i> of dogs in the shelters. </span><span><span>For consistency and representation on</span>ly types of admission <b>Confiscated</b>, <b>Owner Surrender</b>, and <b>Stray</b> and outcomes <b>Adoption</b>, </span><span><b><span><b>Died, </b></span>Euthanized</b>, <b>Returned to Owner</b>, and <b>Transfer</b> were included. </span><span>Outcome </span><b><span>Dead on Arrival</span></b><span> was excluded from survival analysis because it preempties outcome conditions before stay in shelter begins.</span></p>
<h3><span>Time Spent in Shelters</span></h3>
<div><span>Compare the distributions of time spent in shelter for cats and dogs to note both similarities and differences:</span><br><span><br></span>
<div></div>
<div><a rel="nofollow" href="https://i2.wp.com/3.bp.blogspot.com/-DvjRK1bj0I4/Wb_SU7WjOPI/AAAAAAAA7qM/lF1NQZiQ6_4qm3s6AAt7F1bPfiROaXJHACLcBGAs/s1600/dallas-animal-shelters-cats-dogs-days-in-shelter-hist.png?ssl=1" target="_blank"><img border="0" data-original-height="445" src="https://i2.wp.com/3.bp.blogspot.com/-DvjRK1bj0I4/Wb_SU7WjOPI/AAAAAAAA7qM/lF1NQZiQ6_4qm3s6AAt7F1bPfiROaXJHACLcBGAs/s1600/dallas-animal-shelters-cats-dogs-days-in-shelter-hist.png?resize=450%2C445&ssl=1" data-recalc-dims="1" data-original-width="450"></a></div>
<div></div>
<p><span>Distributions are bimodal with relatively fat tails but they differ in how major modes compare to minor ones. As Wikipedia rightly notices “</span><span><span>a <a rel="nofollow" href="https://en.wikipedia.org/wiki/Multimodal_distribution" target="_blank">bimodal distribution</a> most commonly arises as a mixture of two different </span><a rel="nofollow" href="https://en.wikipedia.org/wiki/Unimodal" title="Unimodal" target="_blank">unimodal</a><span><span> distributions” and dissecting data by admission and outcome types opens the door to further discovery:</span></span></span><br><span><br></span></p>
<div><a rel="nofollow" href="https://i0.wp.com/2.bp.blogspot.com/-8uMT-9yxE1k/Wb_Ul6BZNII/AAAAAAAA7qY/iZMGNzpuFnMFHhmcK-5KN6TdKuDCUjljgCLcBGAs/s1600/dallas-animal-shelters-cats-dogs-days-in-shelter-density.png?ssl=1" target="_blank"><img border="0" src="https://i2.wp.com/2.bp.blogspot.com/-8uMT-9yxE1k/Wb_Ul6BZNII/AAAAAAAA7qY/iZMGNzpuFnMFHhmcK-5KN6TdKuDCUjljgCLcBGAs/s640/dallas-animal-shelters-cats-dogs-days-in-shelter-density.png?resize=450%2C993&ssl=1" data-original-width="450" width="450" data-original-height="993" data-recalc-dims="1"></a></div>
<div></div>
<p><span>If the former histogram used facets for separate plots for cats and dogs, the latter plot switched to dodged bars to pack more information into less space. Some interesting observations:</span></p>
<ul>
<li><span><b>Confiscated</b> admissions have distinctively different profile and peaks presumingly attributed to legal obligations to owners;</span></li>
<li><span><b>Confiscated</b> has distinct bimodal distributions when outcomes are either <b>Returned to Owner</b> or <b>Transfer</b>;</span></li>
<li><span><b>Adoption</b> times are similar for both cats and dogs;</span></li>
<li><span>Most distributions have clear unimodal profiles specific to the types of admission and outcome that vary between dogs and cats in density;</span></li>
<li><span><b>Adoption</b> and to less degree <b>Owner Surrender</b> distributions are almost indistinguishable between cats and dogs.</span></li>
</ul>
<div><span>Rendering the same data using density curve estimates let us validate the differences and similarities observed:</span></div>
<div><span><br></span></div>
<div></div>
<div>
<div><a rel="nofollow" href="https://i2.wp.com/1.bp.blogspot.com/-NH4Q3CEEET0/WrWlxoQqsZI/AAAAAAABDtM/mptrq8MkOOAgOjwIMVAStc0n3sz97DwCgCLcBGAs/s1600/dallas-animal-shelters-cats-dogs-days-in-shelter-density-estimates2.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/1.bp.blogspot.com/-NH4Q3CEEET0/WrWlxoQqsZI/AAAAAAABDtM/mptrq8MkOOAgOjwIMVAStc0n3sz97DwCgCLcBGAs/s640/dallas-animal-shelters-cats-dogs-days-in-shelter-density-estimates2.png?resize=450%2C993&ssl=1" data-original-width="450" width="450" data-original-height="993" data-recalc-dims="1"></a></div>
<p><span><br></span></div>
<div><span>The densities demonstrate striking similarity in <b>Adoption</b> and most differences in <b>Euthanized</b> outcome times. </span></div>
<div><span><br></span></div>
<h3><span>Sankeys With Average Times</span></h3>
<div><span>We already used Sankey diagrams to project flow from admission to discharge by total number of occurrences in each transition. This time we decided on novel approach to Sankeys when thickness reflects average time spent in shelter. First diagram is for cats:</span></div>
<div><span><br></span></div>
<p><span><br></span><iframe allowfullscreen="" src="https://rpubs.com/grigory/IntakeToOutcomeCatsAvgTimeSankey" name="myiFrame" width="800px" height="600px"></iframe><span><br></span><span><br>And then for dogs:</span><br><span><br></span><iframe allowfullscreen="" src="https://rpubs.com/grigory/IntakeToOutcomeDogsAvgTimeSankey" name="myiFrame" width="800px" height="600px"></iframe><span><br></span></p>
<div><span><br></span></div>
<div><span>The thinner the line the shorter average stay between admission and outcome it connects. And the larger vertical panel (</span><span>admission or outcome)</span><span> the longer it indicates an animal spends in shelter after admission or before discharge </span><span>(on average and unweighted)</span><span>.  </span>
<h3><span>Expected Chance of Not Surviving in Shelter</span></h3>
<p><span>For the purpose of this analysis any outcome other than </span><span><span><b>Died</b> or <b>Euthanized</b></span> means animal survived to leave shelter alive (most with outcomes <b>Adoption</b>, <b>Foster</b>, <b>Returned to Owner</b> or <b>Transfer</b>). Remember that we also excluded </span><span>dogs with intake type <b>Dead on Arrival</b> </span><span><span>(see introduction)</span>.</span><br><span><br></span><span>We begin with rather simple calculations – an estimates of chance of dying in shelter given animal satisfies certain condition. Plot below contains conditional probabilities for dogs (unless cats specified) <b>not</b> surviving in shelter given certain factor at the time of admission (intake categories):</span></p>
<div></div>
<div><a rel="nofollow" href="https://i2.wp.com/2.bp.blogspot.com/-RDxpSG6auVc/Wr0hVlRcqlI/AAAAAAABD3E/q0WBO-Oi3A0z24BxJNCMkScoxVyHFfRQQCLcBGAs/s1600/dallas-animal-shelters-by-intake-categories-chances.png?ssl=1" target="_blank"><img border="0" src="https://i1.wp.com/2.bp.blogspot.com/-RDxpSG6auVc/Wr0hVlRcqlI/AAAAAAABD3E/q0WBO-Oi3A0z24BxJNCMkScoxVyHFfRQQCLcBGAs/s640/dallas-animal-shelters-by-intake-categories-chances.png?resize=450%2C842&ssl=1" data-original-width="450" width="450" data-original-height="842" data-recalc-dims="1"></a></div>
<p><span><span>Two health conditions stand out with the highest rates: <i>untreatable</i> and <i>unmanageable</i>, while another health condition <i>contagious</i> is present in 3 out of top 4 factors.</span></span></p>
<p><span>There is one more factor <i>breed</i> which has over 200 values just for dogs. Below we display chances of dying for the dog breeds with at least 100 recorded admissions:</span></p>
<div><a rel="nofollow" href="https://i1.wp.com/1.bp.blogspot.com/-Gi6nHJ4qxo0/Wr0i48gQhQI/AAAAAAABD3U/tRCPcGK0y60JoUchYZ13f0BAPFvLFualQCLcBGAs/s1600/dallas-animal-shelters-dogs-by-breed-survival-chances.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/1.bp.blogspot.com/-Gi6nHJ4qxo0/Wr0i48gQhQI/AAAAAAABD3U/tRCPcGK0y60JoUchYZ13f0BAPFvLFualQCLcBGAs/s640/dallas-animal-shelters-dogs-by-breed-survival-chances.png?resize=450%2C842&ssl=1" data-original-width="450" width="450" data-original-height="842" data-recalc-dims="1"></a></div>
<div></div>
<p><span>Note that probability scale is different between the two plots. Surprisingly, breed <b>Chow Chow</b> took the top spot with Pit Bull Terrier breeds <b>Staffordshire</b>, <b>Pit Bull</b>, <b>Am Pit Bull Ter</b>rier, and <b>American Stafford</b>shire close next. </span><br><span><br></span></div>
</div>
<h3><span>Survival Analysis</span></h3>
<div><span>While applying classic survival analysis to animal shelter data presents certain challenges we apply the approach by ignoring few details. But any suggestions or comments how to improve are welcome. The survival function <i>S(t)</i> gives the probability that the subject (pet admitted to shelter) survives longer than time </span><span><i>t</i><span>. </span></span>
<p><span>In this case pets survived when discharged with any outcome other than <b>Died</b> or <b>Euthanized</b>. The time <i>t</i> is always in days since the day of admission and all animal records included in this analysis are for animals that were discharged (effectively eliminating both left and right censoring cases). </span><span>Survival analysis accounts for censored data – those subjects with last known status alive and no later information available. In our case all animal records contain outcome</span><span> and thus all discharged alive are censored at discharge date.</span></div>
<p><span></span></p>
<h4><span>Kaplan-Meier Estimator</span></h4>
<div><span><a rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3059453/" target="_blank">Kaplan-Meier (KM) estimate</a> </span><span>is a non-parametric maximum likelihood estimate of the survival function, <i>S(t)</i>, given univariate categorical factor. It</span><span> measures the fraction of animals living for a certain number of days <i>t</i> after admission </span><span>and produces a declining step function with drops </span><span><span>(KM curve) </span>that approximates the real survival function from data</span><span>. Applying this technique to various categories of animals we compare their survival curves between multiple factor values. KM curves </span><span><span>estimate and visualize survival chances in time </span>just as survival functions: given time <i>t</i> what is probability that subject survives at least to that time or longer.</span></div>
<div><span><br></span></div>
<h4><span>Cats vs. Dogs KM Curves</span></h4>
<div><span>First we compare survival curves between cats and dogs:</span><br><span><br></span>
<div><a rel="nofollow" href="https://i0.wp.com/2.bp.blogspot.com/-e2NNicTxu4U/Wb_XJL0GDcI/AAAAAAAA7qw/ayLd81UGQ60woHxNdUjmoYAHIy1z9xdQACLcBGAs/s1600/dallas-animal-shelters-km-curves-by-dogscats.png?ssl=1" target="_blank"><img border="0" src="https://i1.wp.com/2.bp.blogspot.com/-e2NNicTxu4U/Wb_XJL0GDcI/AAAAAAAA7qw/ayLd81UGQ60woHxNdUjmoYAHIy1z9xdQACLcBGAs/s640/dallas-animal-shelters-km-curves-by-dogscats.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<div></div>
<p></div>
<div>
<div><span></span></div>
<p><span></span></div>
<div></div>
<div><span>The survival curve plot (top) is augmented with the bar chart of totals by categories and survival outcome (bottom) to give better understanding of underlying data. Survival chances for cats are never better than those and overall cats fare much worse than dogs – see bar chart above. Zooming in into the most critical first days after admission reveals more differences:</span></div>
<div><span><br></span>
<div><a rel="nofollow" href="https://i1.wp.com/2.bp.blogspot.com/-Kv-C8G49Jqo/Wb_YFOLnr2I/AAAAAAAA7q4/1AkfipgloPIKVQUK1oCvqDZ3jhHyfaGzgCLcBGAs/s1600/dallas-animal-shelters-km-curves-by-dogscats-2weeks.png?ssl=1" target="_blank"><img border="0" src="https://i1.wp.com/2.bp.blogspot.com/-Kv-C8G49Jqo/Wb_YFOLnr2I/AAAAAAAA7q4/1AkfipgloPIKVQUK1oCvqDZ3jhHyfaGzgCLcBGAs/s640/dallas-animal-shelters-km-curves-by-dogscats-2weeks.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<div></div>
<p><span><br></span><span>Day of admission is the worst for both but cats fare twice as bad with 25% lost right away. Days 4 and 5 are critical for dogs as their survival plummets on these days. After that survival rates stabilize and trend in similar pattern.</span><br><span><br></span></p>
<h4><span>KM Curves by Dog Intake Types</span></h4>
<p><span>To make further analysis more plausible we include only dog records from this point on. We also exclude pets</span><span> admitted as </span><span><b>Dead on Arrival</b><span> or </span><b>Euthanasia Requested</b><span> since their outcomes are obvious and immediate.</span></span><br><span><br></span></p>
<div><a rel="nofollow" href="https://i2.wp.com/1.bp.blogspot.com/-9i88NnHjk5Y/Wb_Y59PVdqI/AAAAAAAA7rA/M3gHEdAEpIQCfdHFD5UTdXvcBhLoPImmACLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-intake-types.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/1.bp.blogspot.com/-9i88NnHjk5Y/Wb_Y59PVdqI/AAAAAAAA7rA/M3gHEdAEpIQCfdHFD5UTdXvcBhLoPImmACLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-intake-types.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<div></div>
<p><span><br></span></div>
<div><span>Confiscated dogs survival chances are the best in first 10 days or so but then they quickly deteriorate crossing and diving below 2 other types after 2 weeks. The worst chances as expected belong to dogs surrendered by owner. And after 2 weeks all 3 curves cross to become less distinguishable.</span><br><span>  </span></div>
<div>
<h4><span>KM Curves by Dog Origins</span></h4>
<div><span>Dallas Animal Services also maintain origin field assigning it at admission with 3 most prevalent values being <b>Field</b>, <b>Over the Counter</b>, and <b>Sweep</b>. These are how survival curves differ depending on dog origin:</span></div>
<div><span><br></span></div>
<div><a rel="nofollow" href="https://i2.wp.com/3.bp.blogspot.com/-2jJe8O1xM9o/Wb_ZcSEBVSI/AAAAAAAA7rI/zkglqLl7Dh4xlhgf5ZrjDvUGIt2nyXdEgCLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-origin.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/3.bp.blogspot.com/-2jJe8O1xM9o/Wb_ZcSEBVSI/AAAAAAAA7rI/zkglqLl7Dh4xlhgf5ZrjDvUGIt2nyXdEgCLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-origin.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<div></div>
<div><span><br></span></div>
<div><span>Again, significant shifts in survival chances happen after 5 days and then after 2-3 weeks when the fortunes of different origins turn around: after 5 days <b>Over the Counter</b> from the worst becomes 2d worst (or best) and then after 3 weeks the best. Both <b>Field</b> and <b>Sweep</b> drop after 5 days. In absolute numbers (shown in the bar plots) <b>Field </b>dogs survive  the worst.</span></div>
<h4><span>Health Conditions at Admission</span></h4>
</div>
<div><span>Unhealthy animals have little chance to survive shelters as evident from the following:</span>
<div></div>
<div><a rel="nofollow" href="https://i2.wp.com/2.bp.blogspot.com/-SVoOQsIZWZ4/WrWqfUnFXcI/AAAAAAABDtk/xxe5iHGji0g1lSM57xu1JG4owdYcS06WQCLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-unhealthy.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/2.bp.blogspot.com/-SVoOQsIZWZ4/WrWqfUnFXcI/AAAAAAABDtk/xxe5iHGji0g1lSM57xu1JG4owdYcS06WQCLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-unhealthy.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<p><span><span>No surprise that unhealthy animals survival is significntly below healthy ones. Also, dominant majority of dogs accepted are in unhealthy condition, which is both not surprising and unfortunate. </span></span></p>
<p><span><span>There is more information about unhealthy dogs available from shelter records: treatable vs. untreatable and contagious vs. non-contagious. Unfortunately, these values reside inside single field so the survival curves include combinations of the health factors:</span></span><br><span><span><br></span></span></p>
<div><a rel="nofollow" href="https://i2.wp.com/1.bp.blogspot.com/-XrAeoN2HBhg/WrWtNp5ldiI/AAAAAAABDtw/cVTSecXAjqcEoVTsFpLO9cZ7-RDQeNN_ACLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-health-factors.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/1.bp.blogspot.com/-XrAeoN2HBhg/WrWtNp5ldiI/AAAAAAABDtw/cVTSecXAjqcEoVTsFpLO9cZ7-RDQeNN_ACLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-health-factors.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<p><span><span><br></span></span><span><span>It clearly shows how each health factor reduces survival chances: from <b>Healthy</b> to <b>Treatable Rehabilitable</b> to <b>Treatable Manageable</b> to <b>Unhealthy Untreatable</b> to finally </span></span><span><span><b><span><span><b>Unhealthy Untreatable Contagious</b></span></span></b>. </span></span><br><span><span><br></span></span><span><span>If we extract and analyze each health factor (ignoring the rest) then these relationships become more apparent:</span></span></p>
<div><a rel="nofollow" href="https://i0.wp.com/2.bp.blogspot.com/-bmd6Z1niHno/WrWwh-rVeXI/AAAAAAABDt8/vfl88iXYTO0TdZmDvcb0MpxNX8XU5zNhgCLcBGAs/s1600/Rplotdallas-animal-shelters-km-curves-dogs-by-health-contagious.png?ssl=1" target="_blank"><img border="0" src="https://i2.wp.com/2.bp.blogspot.com/-bmd6Z1niHno/WrWwh-rVeXI/AAAAAAABDt8/vfl88iXYTO0TdZmDvcb0MpxNX8XU5zNhgCLcBGAs/s640/Rplotdallas-animal-shelters-km-curves-dogs-by-health-contagious.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<p><span><span><br></span></span></p>
<div><a rel="nofollow" href="https://i1.wp.com/2.bp.blogspot.com/-FQDNbb30IWk/WrWwh6n0H_I/AAAAAAABDuA/2mxw716FVzgbzq0ylWG98Yc8ECr_9sW1gCLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-health-treatable.png?ssl=1" target="_blank"><img border="0" src="https://i2.wp.com/2.bp.blogspot.com/-FQDNbb30IWk/WrWwh6n0H_I/AAAAAAABDuA/2mxw716FVzgbzq0ylWG98Yc8ECr_9sW1gCLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-health-treatable.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<p><span> </span><br><span> </span></p>
<h4><span><span>Survival of Dogs with Chips </span></span></h4>
<p><span><span><span><a rel="nofollow" href="http://dallascityhall.com/departments/dallas-animal-services/Pages/microchipping-FAQ.aspx" target="_blank">As of June 17, 2017, all dogs and cats four months and older in the city of Dallas must be microchipped.</a> This relatively new regulation will likely change both the share of chipped dogs in Dallas and survival curves as observed below from 2015 through October 2017:</span></span></span><br><span><span><span><br></span></span></span></p>
<div><a rel="nofollow" href="https://i1.wp.com/1.bp.blogspot.com/-ykJ_TXbKFzQ/WrWyUpfRdnI/AAAAAAABDuQ/tiKWdkCqwLE-dIpVXbev2ePuaztOB5P6wCLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-chipped.png?ssl=1" target="_blank"><img border="0" src="https://i1.wp.com/1.bp.blogspot.com/-ykJ_TXbKFzQ/WrWyUpfRdnI/AAAAAAABDuQ/tiKWdkCqwLE-dIpVXbev2ePuaztOB5P6wCLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-chipped.png?resize=450%2C794&ssl=1" data-original-width="450" width="450" data-original-height="794" data-recalc-dims="1"></a></div>
<p><span><span><span><br></span></span></span><span><span><span>Still having a dog microchipped will almost certainly keep survival chances higher.</span></span></span><br><span><span><span> </span></span></span></p>
<h4><span><span><span>Dog Breeds</span></span></span></h4>
<p><span><span><span>Dallas shelters admitted dogs of over 200 different breeds from 2015 through 2017. Among them 56 breeds appeared 100 times or more (over 95% of all admissions): </span></span></span></p>
<div><span><span><span><a rel="nofollow" href="https://i1.wp.com/3.bp.blogspot.com/-6L4QUAZuSQw/WrqmL1px4II/AAAAAAABD0k/qgQkN3J1Ng4VTNBYTNixSsDUo7ZPq9dOQCLcBGAs/s1600/dallas-animal-shelters-dogs-by-breed.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/3.bp.blogspot.com/-6L4QUAZuSQw/WrqmL1px4II/AAAAAAABD0k/qgQkN3J1Ng4VTNBYTNixSsDUo7ZPq9dOQCLcBGAs/s640/dallas-animal-shelters-dogs-by-breed.png?resize=450%2C847&ssl=1" data-original-width="450" width="450" data-original-height="847" data-recalc-dims="1"></a></span></span></span></div>
<div></div>
<p><span><span><span>Top 4 breeds – <b>Pit Bull</b>, <b>Labrador Retriever</b>, <b>Chihuahua</b>, and <b>German Shepherd</b> – account for almost 60% of all admissions with next breed – <b>Cairn Terrier</b> – dropping to just under 3%. The survival curves for these 5 breeds contain almost 2/3 of all dogs admitted to Dallas shelters:</span></span></span></p>
<div></div>
<div><a rel="nofollow" href="https://i0.wp.com/4.bp.blogspot.com/-psZSFGr8lfA/WrkQxAlwz2I/AAAAAAABDy0/Ge-SH7u47Fc3BksLDV5TOpJn4IoVlTwzwCLcBGAs/s1600/dallas-animal-shelters-km-curves-dogs-by-top-5-breeds.png?ssl=1" target="_blank"><img border="0" src="https://i2.wp.com/4.bp.blogspot.com/-psZSFGr8lfA/WrkQxAlwz2I/AAAAAAABDy0/Ge-SH7u47Fc3BksLDV5TOpJn4IoVlTwzwCLcBGAs/s640/dallas-animal-shelters-km-curves-dogs-by-top-5-breeds.png?resize=450%2C753&ssl=1" data-original-width="450" width="450" data-original-height="753" data-recalc-dims="1"></a></div>
<div></div>
<p><span><span><span><b>Pit Bull</b></span></span></span><span><span><span><span><span><span>‘s suffer the worst survival rate of the 5</span></span></span> most admitted breeds. It drops to below 50% survival rate after just over a week at shelter. <b>Labrador</b> and <b>German Shepherd</b> get 50% some time  into 3 week period. Smaller breeds last much better as evident from <b>Chihuahua</b> and <b>Cairn Terrier</b> curves.</span></span></span></p>
<p><span><span><span>It turns out there are more breeds closely related to Pit Bull: <b>American Staff</b>, <b>Am Pit Bull Ter</b>, and <b>Staffordshire</b>:</span></span></span><br><span><span><span><br></span></span></span></p>
<div><a rel="nofollow" href="https://i2.wp.com/2.bp.blogspot.com/-_aaaGbCX1iE/Wr0wl2NrDQI/AAAAAAABD38/NxQ6-wwO5Y4_S3hWjkM_WIVeBOViiRhYQCLcBGAs/s1600/Dallas-animal-shelters-km-curves-dogs-by-pit-bull-group.png?ssl=1" target="_blank"><img border="0" src="https://i0.wp.com/2.bp.blogspot.com/-_aaaGbCX1iE/Wr0wl2NrDQI/AAAAAAABD38/NxQ6-wwO5Y4_S3hWjkM_WIVeBOViiRhYQCLcBGAs/s640/Dallas-animal-shelters-km-curves-dogs-by-pit-bull-group.png?resize=450%2C748&ssl=1" data-original-width="450" width="450" data-original-height="748" data-recalc-dims="1"></a></div>
<p><span><span>Similar pattern for three of four breeds from the group sharply differ from the 4th – <b>American Staff</b>ordshire for reason(s) beyond this analysis.</span></span><br><span> </span><span><br></span></p>
<h3><span><span>Next</span></span></h3>
<p><span><span>In the next and final post on Dallas animal shelters we will apply Cox proportional hazard semi-parameters statistical analysis </span><span>to assess simultaneously the effect of several factors on survival time and outcome.</span></span><br><span><span> </span></span></p>
<h3><span><span>Resources</span></span></h3>
<p><span><span><span>The R notebook (source code) with data pipeline and visualizations can be found </span><span><a rel="nofollow" href="https://github.com/grigory93/r-notebooks/commit/8ce1b2ba6f3c710ddd29a712af797648c976d2a6" target="_blank">here</a></span><span> with knitted version on </span><span><a rel="nofollow" href="http://rpubs.com/grigory/DASSurvivalAnalysis" target="_blank">RPubs</a></span><span>.</span></span> </span></div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://novyden.blogspot.com/2018/04/surviving-shelter-analysis-of-time.html"> novyden</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/IC33x1ArPx0" height="1"></a></div>