this method computes the probability for future disease according to the availablitiy of data
by basically computing a stitched markov model
as score availability is not unbiased (patients with less measurements tend to be healthier),
the probaility will be computed seperately for patients with / without score
we will define the following modes:
0 has required conditions at young age and known score / outcome at older age
1 has required conditions at young age and no restrictions at older age
2 no restrictions at young/older age
Source: 0 has required conditions at young age and known score / outcome at older age
1 has required conditions at young age and no restrictions at older age
2 no restrictions at young/older age
R/disease_markov_model.R
dot-mldpEHR.disease_empirical_prob_for_disease.Rdthis method computes the probability for future disease according to the availablitiy of data by basically computing a stitched markov model as score availability is not unbiased (patients with less measurements tend to be healthier), the probaility will be computed seperately for patients with / without score we will define the following modes:
0 has required conditions at young age and known score / outcome at older age
1 has required conditions at young age and no restrictions at older age
2 no restrictions at young/older age
Usage
.mldpEHR.disease_empirical_prob_for_disease(
population,
step,
required_conditions = "id==id"
)Arguments
- population
list of data.frames of all the patients in the system going back in time. For example the first data.frame represents age 80, next is 75 and so forth. Each patient data.frame contains the following columns:
patient id
sex
target_class (does this patient have a known outcome)
disease age of disease
death age of death
followup
any other columns that can be used in required conditions
- step
time between populations
- required_conditions
conditions that will be applied on patients that will be have a prediction score