OHDSI Home | Forums | Wiki | Github

Na on the x-axis of the demographic plot in plpViewer

We have been experiencing Na’s on the x-axis of the Demographic Plot in the PLPViewer. It looks like the Na’s occur for patients above 99 years old.
I checked the source code and i looks like the age categories has been pre-specified to not contain people above 99 years. This is seen in the function called " plotDemographicSummary".

x$age ← factor(" 0-4"," 5-9"," 10-14", " 15-19"," 20-24"," 25-29"," 30-34"," 35-39"," 40-44", " 45-49"," 50-54"," 55-59"," 60-64"," 65-69"," 70-74", " 75-79"," 80-84"," 85-89"," 90-94"," 95-99","-1").

Is it possible to extend the age categories to also consider patients above 99 years @Rijnbeek and @jennareps ?

Thank you

@cssdenmark

Best Julie

1 Like

Hi Julie - sorry for the slow reply (I forget to check the forums). I just released a new version of PatientLevelPrediction with some major changes to the code. In the new version, age/gender are calculated per patient in the cohort rather than relying on the user specifying a covariate with age in 5 year buckets and gender (i.e., plpData$cohorts now has age and gender in the columns). The demographic plot now uses the age/gender in the plpData$cohorts rather than the plpData$covariates, so the problem you highlighted should be solved :). If you have any other issues with the code (especially ones that are urgent) - posting on the GitHub issues will send me an email so I will hopefully answer a lot quicker (for some reason the forum tags don’t notify me).

Sounds great, we will refer to the GitHub in the future. Thanks :slight_smile:

t