pearl.multimorbidity
Functions pertraining to multimorbidity calculations.
Functions
|
Create and return the population matrix as a numpy array for calculating the probability of incidence of any of the 9 comorbidities. |
Count the number of people with each unique set of comorbidities. |
- pearl.multimorbidity.create_mm_detail_stats(pop: pandas.DataFrame) pandas.DataFrame[source]
Count the number of people with each unique set of comorbidities.
- Parameters:
pop (pd.DataFrame) – Population Dataframe.
- Returns:
Count of the number of people with each unique set of comorbidities.
- Return type:
pd.DataFrame
- pearl.multimorbidity.create_comorbidity_pop_matrix(pop: pandas.DataFrame, condition: str, parameters: Parameters) Any[source]
Create and return the population matrix as a numpy array for calculating the probability of incidence of any of the 9 comorbidities. Each comorbidity has a unique set of variables as listed below.
- Parameters:
pop (pd.DataFrame) – Population for use in preparation for Pearl.calculate_prob.
condition (str) – Morbidity as a string value.
parameters (Parameters) – Parameters object that contains spline knots for interpolation calculations for select morbidities.
- Returns:
numpy array representing the population for use in Pearl.calculate_prob.
- Return type:
NDArray[Any]