![]() The columns are fitted using LsqFit, and the data points are weighted by the square root of the age-specific number of deaths (given in numbdeaths). Juckett and Rosenberg (1993) for a discussion of these different functions and their applications to human mortality and survival data. The function mortsurvfit(lifetable, numbdeaths, func, functype) fits the m column (if functype="rate") or the l column (if functype="surv") against the age column in a DataFrame returned by periodlifetable with a Gompertz function (if func="gompertz") or a two-parameter Weibull function (if func="weibull"). The DataFrame returned by causelife can be used as input to periodlifetable (with intype="rate") to compute a new lifetable for the subpopulation dying of a specific cause. The proportion of the population surviving to a given age that will die of the specific cause. Start of age interval (same as the input life table).Īge-specific death rates normalized to the frequency of the cause of death (the next column). It returns a DataFrame with the following columns: Column The function causelife(lifetable, causefreq) takes a lifetable returned by periodlifetable and a vector of the same length as the number of rows in the life table, with the proportion of deaths at a given age caused by a specific disease (or another cause). Remaining number of years to live at a given age. ColumnĮxpected numbers of years lived at a given age for someone dying at that age. ![]() The function returns a new DataFrame with the life table. ![]() If intype="rate", the second column is assumed to contain age-specific death rates. If intype="count", the second column is assumed to be a vector of age-specific population at risk, and the third column is assumed to be a vector of age-specific death counts. If openend=true (default), the last row is assumed to include data for an open interval at the end of life if openend=false it is assumed to include a closed interval of the same size as the second last row. The first column in inframe is assumed to contain the start of the included age intervals. The function is called like periodlifetable(inframe, sex, openend, intype), where inframe is a DataFrame, sex may be given as 1 or 2 for males or females (the calculation of average numbers lived for those dying as infants differs between the sexes), and intype can be "count" (the default) or "rate". ![]() The LifeTable module contains the function periodlifetable, which can be used to calculate life tables in accordance with the methods used by Human Mortality Database (in particular, see the Methods Protocol 38-39). ![]()
0 Comments
Leave a Reply. |