Sterilisation rates required to stabilise a population
The following program calculates the rate at which female animals would need to be sterilised in order to keep a population at a constant level indefinitely using a single treatment that is effective for a specified number of years or one that is permanently effective in a specified percentage of animals. In addition to the efficiency of the sterilisation treatment, estimates of the following demographic parameters are required: the age in years at which females are recruited into the breeding population; the number of litters they then produce per year; the average number of female offspring in a litter; the annual survival of a recuited female; and the probability that a female survives from birth to the age of recruitment. The program calculates the untreated populaton growth rate, the percentage of females that would need to be treated per inter-breeding interval to stabilise the population and the percentage of females that would as a result be treated in the stable population. It compares the required number of sterilsations using the specified treatment to the number of surgical sterilsations that would be required, assuming those are permanently 100% effective. The method assumes an excess of males and that females are treated with equal probability at any age and are then permanently marked so that they are not treated again even if the treatment is not permanently effective.
If the age at recruitment times the number of litters per year (i.e. the age at recruitment expressed in inter-breeding intervals) is a whole number the program also simulates growth of an untreated population of initially 100 females over 10 inter-breeding intervals followed by sterilisation treatment at the rate required to stabilise the population eventually. The simulation is purely illustrative, confirming that such a population would be stabilised eventually by the calculated treatment rate. The actual "transient response" is complicated by possible dependence of survival and/or fecundity on population density. Treatment would normally be applied at a higher rate than that calculated, either to prevent excessive growth of the population before it is stabilised or because the initial population is close to carrying capacity with rates of survival and/or fecundity lower than those that would would apply at the desired population density. Population density then has to be monitored so that the treatment rate can be adjusted to converge to that required to stabilse the population at the desired density. The program is designed only to assess what rate of treatment would need to be applied indefinitely to maintain a desired population density.
Demographic parameter estimates could be adjusted to allow for the following: (1) if breeding is seasonal so that a female limits her investment in reproduction by missing a season rather than reducing the number of litters per year the average litter size can be reduced by the percentage of females that fail to breed during the breeding season (2) survival can be reduced to allow for permant emigration to surrounding areas or females adopted from the population and confined (3) to allow for immigration from surrounding untrapped areas or from previously confined owned animals the average litter size can be increased by a factor reflecting the resulting increase in recruitment, for example by 1.2 if 20% of the recruits are immigrants.
The default parameter values are derived from those given as "midpoint" values in Christine M. Budke & Margaret R. Slater (2009), Utilization of Matrix Population Models to Assess a 3-Year Single Treatment Nonsurgical Contraception Program Versus Surgical Sterilization in Feral Cat Populations, Journal of Applied Animal Welfare Science, 12:4, 277-292. The program reports that a population with those parameter values could not be stabilised using a single tratement effective for 3 years or a treatment permanently effective in 75% of females, a minimum of 4 years or 80% efficiency would be required.
The following document derives the rate calculation for treatment providing temporary sterilisation
A regression estimator for a roaming dog population
The following downloads allow roaming dog counts in randomly-selected sample wards to be used to estimate the numbers of roaming dogs in the wards that were not selected. The estimator uses the values of one or more quantitative or qualitative predictor variables available for each ward to generate a spatial distribution of dog numbers over the city and an estimate of the total number of dogs. That estimate is for all the roaming dogs in the city if sight-resight methods were used to estimate the number in each selected ward. If there was just a count of roaming dogs in each selected ward it is for the total number roaming the city at the time of those counts. Please use the estimator with the help of the usage document. The program uses standard estimation techniques under a variety of error models and includes a simulation facility to evaluate the performance of the estimator under different assumptions.
The following download uses a set of simplified sight-resight history frequencies for a sample of dogs in a city block to estimate what fraction of the dogs that roam in that block are seen on any one count. A sample of distinctive dogs is identified during the first count and resights of those dogs on a second and third count recorded. For each identified dog the four possible histories are thus: seen on both the second and third counts; seen on neither the second nor the third count; seen on the third but not the second count; seen on the second but not the third count. The four frequencies are entered on a screen and an estimate of the fraction of dogs seen on any one count returned along with an estimate of the fraction of dogs that remain in the block from one count to the next.
A program for using temporary marking of owned dogs to estimate numbers of owned and unowned dogs
If owned dogs are brought to clinics for veterinary treatment, vaccination or sterilisation a proportion of owners may be willing to have a simple collar fitted to the dog to provide a visible mark, lasting for at least a few days. In that case it may be possible to use subsequent street surveys and a survey of dog-owning households to estimate the number of owned and unowned dogs, as detailed for example by Kayali et al in the Bulletin of the World Health Organisation, 2003, 81 (10). Estimates of the numbers of owned and unowned dogs are required to evaluate the likely effect of the existing intervention effort and suggest required changes in its design.
The following downloads provide a modified version of the published method that can be be used to estimate the number of owned and unowned dogs and to run simulation trials of the estimation method. The basic idea is simple. A known number of owned dogs are marked. Using information from the owners that number is split into the number of "confined" dogs and the number of "unconfined" dogs, i.e. those with access to public areas. Assuming the unconfined marked dogs are as likely to be seen on the street as unmarked dogs (some of which will be unowned, others unmarked unconfined owned dogs) the number of marked dogs seen on the street surveys allows the number of unmarked dogs on the street to be estimated. For example, if about a third of the unconfined marked dogs were seen on a street survey we would estimate that the total number of unmarked dogs on the street is about three times the number of unmarked dogs seen. At the same time a survey of dog-owning households should reveal the total number of owned dogs (for example, if about half of the dogs encountered on the household survey are marked we would estimate the total number of owned dogs is about twice the number that were marked). The household survey will also reveal what fraction of unmarked owned dogs are confined and hence suggest what fraction of our estimate of unmarked dogs on the street are unconfined owned dogs as opposed to unowned dogs.
The "temporary_mark_population" program differs from the published method in that, for simplicity, the data on confinement is incorporated as a term in the likelihood rather then being used to provide Bayesian prior probabilities. It is not necessary to be familiar with either Bayesian statistics or likelihood to use the program. The marking, street survey and household survey data can be typed into a text file using the comma-separated format shown in the "datafile.txt" download. The data required are of three types. During intervention owners who agree to have their dog marked are asked whether or not the dog is confined and the number of confined and unconfined marked dogs recorded. During each of up to four street surveys of the intervention area the numbers of marked and unmarked dogs seen are recorded. And in each of the dog-owning households randomly selected during the household survey the dogs are classified as marked, unmarked confined and unmarked unconfined and the totals recorded. The program can then be run by clicking on the "estimate" command button. The parameter estimates will be shown in the textboxes grouped into the "parameters" section of the form. An initial, default guess at the parameter value appears in each upper box and the final "maximum likelihood" estimate in the textbox below. To the right of that lower textbox a checkbox is checked if the corresponding parameter is to be set "free" during the estimation, otherwise the initial value in the upper textbox will be used. By default all parameters are "free". To obtain confidence limits on any of the parameter estimates (for example on the number of unowned dogs) fix that parameter by unchecking its checkbox and set its value above or below the estimate generated when it was set "free". Run the estimation program again and check by how much the "negLL" value reported near the top of the form changes. 95% confidence limits on a parameter are values at which the negLL value is increased by 1.92. Changing the number of unowned dogs will effect the owned dogs estimate and hence the estimated percentage of dogs that are unowned, an important statistic for planning and evaluating intervention. Thus establishing confidence limits on the number of unowned dogs will, at the same time, establish the confidence limits on the percentage of dogs that are unowned.
If the textbox showing the path to the data file is cleared the program changes to a simulation mode. The parameter values in the upper textboxes are then used to simulate data ,displayed in the "data" section of the form. That data is used in place of data read from the data file to estimate the parameter values. The parameter estimates, expressed as percentages of the values used to drive the simulation, are displayed graphically at the bottom of the form. The textbox to the right of the "Run simulation" command button can be set to the required number of repeat simulations (eg. 100). The graphs then show the parameter estimates averaged over the number of runs completed, to indicate any bias in the estimates - the averaged parameter estimates should converge to 100% of the parameter value used to drive the simulation if the estimator is unbiased.
A critical assumption of the published method is that unconfined owned dogs are as likely to be seen on the street as unowned dogs. In a fully urban environment an unconfined owned dog may well be hidden within the house at the time of the street survey, even though it has the option to roam on the street. A textbox at the top of the form can be used to set the visibility of an unconfined owned dog as a percentage of the visibility of an unowned dog (which has to spend all of its time in public areas). Running a simulation with that value set at less than 100% shows that the visibility of unowned dogs will be underestimated and hence the number of unowned dogs overestimated if unconfined owned dogs are less visible.
In the "temporary_mark_population1" program the data collected during the household survey is extended to allow the assumption to be relaxed. The idea is that the household survey is conducted at the same time of day as the street surveys in order to observe the status of the unconfined owned dogs at that time. The number of categories recorded is increased from three to six: marked dogs are recorded as confined, unconfined and on the street, and unconfined but still within the house; and unmarked dogs are split into the same three catagories. A multinomial distribution for the six recorded frequencies is incorporated into the likelihood to allow unbiased estaimtion of the number of owned and unowned dogs even if unconfined owned dogs are less likely to be seen during the street surveys than unowned dogs.
Experimentation with the simulation will show that it is not essential to run more than one street survey. Successive surveys are not used as a way of detecting dogs marked on earlier surveys (though such marking or identification by natural marks could be incorporated). However repeating the street surveys will increase the total sample sizes of marked and unmarked dogs seen, thus avoiding small-sample bias and reducing the width of the confidence intervals.
Download the following files to the same temporary folder to try out the temporary_mark_population and temporary_mark_population1 programs:
temporary_mark_population.exe temp_mark_pop.dll datafile.txt
temporary_mark_population_1.exe temp_mark_pop_1.dll datafile1.txt
NAGE04.DLL NAGSX.DLL salflibc.dll
A program for using permanent marking of roaming dogs to estimate their survival
Roaming dogs collected for vaccination and/or sterilisation may be permanently marked to distinguish them as having been through the intervention process and hence not be collected in the future. By carrying out a minimum of two counts of marked dogs over the first two years of the intervention their annual survival can be estimated. P, the probability of counting a surviving marked dog on a survey count, which in this case is a "nuisance parameter", is estimated along with annual survival S. Both are assumed to be constant over the period of the counts. One reason for estimating S is that it allows the total number of roaming dogs to be estimated from the fraction of dogs on the street that are marked. P would allow an estimate of total roaming dog population if unmarked dogs are counted along with marked dogs over the entire area, however using an estimate of S is more efficient. This is because the fraction of roaming dogs that are marked can be estimated cost-free over the whole area by equiping people involved in the collection process with event counters. Surveys designed to count numbers of marked dogs and estimate S can be conducted over a smaller area to reduce the effort required (to obtain comparable counts of marked dogs over time the counting surveys have to be carefully conducted to maintain constant survey effort - using event counters to measure the fraction of dogs on the street that are marked does not require any control or measurement of effort).
The "permanent_mark_survival" program that can be downloaded from this page allows for from two to four of such counting surveys. If two surveys are used they should be conducted at the end of the first and second year of intervention/marking, if four surveys are used they should be conducted every six months. The program accepts data from a "datafile.txt" file that expects on the first and second lines the daily rate of mark releases and the number of surveys conducted to count marked dogs. Subsequent lines hold the day number of the survey and the number of marked dogs counted, separated by a comma.
The mark release rate refers to marked dogs released within the area where the surveys are conducted. If this is not the total area (to limit the spatial extent of the required surveys) the rate of release of dogs into the surveyed area may not be constant, even if the total number of dogs marked per day is constant, because collection and release of dogs may focus on different areas over time. In that case if the "constant marking rate" checkbox is cleared the value entered for the daily release rate is ignored and the number of dogs released into the surveyed area each week read from the following lines (thus about 104 lines for weekly releases over two years).
If the textbox holding the path to the data file is cleared the program reverts to a simulation mode to allow the user to observe the performance of the S estimator. The way the simulation is run and the results interpreted is as descibed under the previous section refering to temporary marking of owned dogs. Deriving confidence limits on an estimate of S is also as described in that section.
The stochastic model for the number of surviving marked dogs seen on each survey assumes each has, independently, a probability P of being seen. In practise the fact that some dogs will be counted in groups means that he probabilities may not be independent and hence the width of the confidence interval underestimated. If necessay, the "variance:mean ratio" textbox, which is not used during the estimation if the "-1" default is retained, can be used to enter a value for that ratio derived by replicating the surveys.
Download the following files to the same temporary folder to try out the permanent_mark_survival program:
permanent_mark_survival.exe perm_mark_surv.dll datafile2.txt NAGE04.DLL NAGSX.DLL salflibc.dll
What controls the number of dogs in a city? In a wildlife population we look for "density dependant" factors such as shortage of food or breeding sites to explain why a small population grows and a large population does not. Such factors may affect a dog population too but a less subtle mechanism is likely to be the main controlling factor. A city environment is unlikely to allow dogs to breed and raise many puppies unaided. Thus a population of stray dogs persists indefinitely only as a result of continual addition of puppies raised in a domestic environment and then abandoned. Its size will determined by the rate of survival of those young dogs - it will grow until the number of dogs that die each year equals the number abandoned plus the number that are born and raised on the streets.
The "sterilise.exe" program, which can be downloaded from this page, simulates this process by keeping track of dogs in the "domestic" and the "street" populations (a necessary simplification - some dogs may raise puppies in both the domestic environment and on the streets). It considers only females, on the assumption that there will always be an excess of males available for breeding. It assumes an initial equilibrium state, allows for dogs killed by any existing control programmes and then simulates the affect of starting a sterilisation programme. In particular it considers the number of dogs sterilised, their ages and the how the number of sterilisations is split between the domestic and street populations. It thus attempts to assess the size of programme required to reduce and control the size of the street population and the type of sterilisations that would be most affective.
Download the "sterilise.exe", "sterilise.ini" and "killed.txt" files to the same folder on your PC and double-click the "sterilise.exe" file. Maximise the window and click on the "run" button. The upper part of the screen is divided into boxes dealing with the domestic and street populations, a box for comparing the simulation results to a current survey of the street population and a box for defining the control measures.
Consider the parameters in the "street dogs" box. They set the the probability of survival from birth to age 1, the annual survival of adult females, the (whole number) ages at which a female can have her first and last litters, the probability she will have a litter at each age within that range and the average number of females per litter. The model thus assumes dogs breed once a year, which is again a simplification as dogs can breed more frequently. However the affect of that simplification can be offset by increasing the litter size. Females are assumed not to live more than 10 years. The probability of survival to age 1 should not exceed the indicated limit (which depends on the other parameters), to avoid the street population growing without the addition of abandoned dogs.
The parameters of the domestic population are assumed to be the same except that the probability of survival to age 1 is much larger. In the domestic population that probability is fixed as a function of the other parameters by assuming that the population would remain at constant size if no dogs wrere abandoned and 70% of the females were sterilised. The box to the right of the "street dogs" box displays this balancing level of first year survival and the corresponding doubling time of the population if none were sterilised - thus its intrinsic rate of increase under optimal conditions. It also shows expected lifespan at birth and age 1. Any of the parameters can be adjusted to give desired values for these diagnostics.
In the "owned dogs" box the scrollbar adjusts the number of females abandoned per year - the model assumes they are abandoned at age 1. The percentage of dogs not abandoned that are sterilised is set at the top of the box. These settings determine the constant size of the domestic population and number of female sterilisations per year - the number of sterilisations can be compared with data from vetinary clinics. The number of females abandoned per year combined with the parameters in the street dogs box determine the equilibrium size of the street population, which stays at that size until some control measures are introduced.
The "killed.txt" file contains data from Cairo on the number of female dogs killed per year. To use a different set of data replace the file with another using the same format, that is, "year , number of female dogs killed" (years in which no dogs were killed nead not be entered and the data need not be entered chronologically). These numbers are subtracted from the numbers at each age in the simulated street population in proportion to the number at that age. In the "control" box the range of years over which the subtractions take place is set - the range can be adjusted to investigate the effect of having increased or reduced the amount of control.
The red line on the plot shows the resulting trajectory of street population size and the "survey" box gives its present (year 2005) size, the reduction over the previous five years and the percentage of the population consisting of abandoned dogs (as opposed to dogs born and raised on the street). Those diagnostics can be compared with available survey data (marked variation in size and appearance of street dogs indicates that a high percentage of them are abandoned). Adjust the scrollbar in the "owned dogs" box to give the current estimate of the number of female street dogs. Adjust first year survival to adjust the reduction over the previous five years - decreasiing first year survival will require increasing the number of abandoned dogs in order to get back to the current estimate of the number of street dogs and give less reduction over the previous five years.
The horizontal and vertical scrollbars in the "control" box adjust the sterilsation effort from the specified start year and the relative effort expended in the domestic and street populations. The blue line on the plot shows the annual total number of sterilisations and the output in the "control" box the number of sterilsations of "owned" and "street" dogs in the first year (also shown as the percentage of unsterilised dogs in each population). The red line then shows the affect of the specified levels of sterilisation effort on the street population.
The "sterilise.ini" file holds the parameter settings from the most recent run. The version downloaded will display a possible scenario for the Cairo street dog population, with a roughly equal number of extra sterilisations in the street and domestic populations (about a 30% increase). To preserve current parameter settings save a copy of the "sterilise.ini" file before the next run.
The model simplifications should not invalidate its main conclusions. It shows why even a large cull of street dogs will not lead to a permanent reduction as the continued input of abandoned dogs leads to regrowth of the population. It also shows the benefit of targeting sterilisation effort at the domestic population, particularly if first year survival on the streets is very low - sterilising a female will have little affect on the population if she is in any case unlikely to raise a litter successfully. The eventual aim would be to raise the level of sterilisation in the domestic population to a point (around 70%?) at which the overall surplus is eliminated and a local surplus can be rehoused via temporary shelters. Any remaining street population would then die out within a few years.
A program to assist visual matching of photos taken on different days
From this page you can set up and try out the "straydog" program, designed to help make a census of stray dogs in a defined area using photo-id data. The program facilitates comparison of digital images taken on successive surveys in order to identify matches. Extract the contents of "FOLDERS.ZIP" to your c: drive. Click on "setup.exe" in the "INSTALL.ZIP" to install the program.
In the "straydog" folder that will be created on your c: drive you will find a "download_photo" folder to which the digital images taken on each day of survey should be downloaded. There are also "day1", "day2", "day3" and "day4" folders that contain sample images of some cubist "dogs". The contents of "day1" have already been copied to "download_photo". When you start the "straydog" program (from the "programs" list) you will be able to record these day1 sightings, linking imaginary values for "breed", "colour" etc. with each image. That process will clear the "download_photo" folder so that you can then copy the "day2" folder contents to "download_photo", run the program again to record those sightings and so on. After the sightings from the four days have been recorded you will be able to review the results of that census. Some dogs are seen in different images so, to avoid recording them as "new" dogs, the program helps you to compare each new image with the dogs recorded previously. The images are displayed side by side along with the recorded values of "breed", "colour" etc. and those values are also used to display the most likely matches first. The sample images are of 11 dogs, 9 white dogs with 1 to 9 black spots on them, one black dog and one sandy coloured dog. So comparing these particular dogs should not be too difficult! About half the dogs are photographed each day, usually singly but sometimes in groups of three. The program allows you to crop images of single dogs from photos that show groups.
The recorded data associated with each series of surveys are stored in the "straydog.mdb" Access database file on the root of the "c:\straydog" folder. Double-click that file to open the database. The "straydog" program can also be run from there, as can a simple form showing all the records along with any linked images. The data accumulated in "straydog.mdb" can also be used later to give more efficient and robust census estimates than are available from the results displayed in the "straydog" program itself.