Big-Life-Lab / cchsflow

Variable transformation and harmonization for the Canadian Community Health Survey
https://big-life-lab.github.io/cchsflow/
Other
11 stars 7 forks source link

New variable request: Derived COPD variable #72

Closed DougManuel closed 3 years ago

DougManuel commented 3 years ago

Introduction

We accept requests and PR for new variables. Providing information about your request helps discussion about whether and how to include the variable.

Is the variable an existing CCHS variable, or a derived variable?

There is currently resp_condition_der that is COPD (COPD + emphsema) + asthma.

There is not a harmonized COPD variable and there are quite a few changes to COPD over the CCHS cycles.

2001-2003: COPD & Emphysema are combined (CCC_091) 2005-2007: COPD & Emphysema are separate (CCC_91E & CCC_91F) 2009-2014: COPD & Emphysema combined (CCC_091)

Given COPD and asthma have different disease burdens, suggest creating a new derived COPD variable

Does this variable exist already in CCHS cycles, or is it a newly derived variable?

What is the name of the variable?

What is the most consistent name for this variable (usually the variable name used from 2007-2014). If this is a derived variable, what is the name of the newly derived variable?

Suggestion CCC_091F as the new variable name

Description of variable

See above.

Is it consistent across CCHS cycles? If not, explain changes between cycles

See above.

Which cycles is this variable found?

See above.

Derived variables only. What variables are used to create this variable?

2001-2003: COPD & Emphysema are combined (CCC_091) 2005-2007: COPD & Emphysema are separate (CCC_91E & CCC_91F) 2009-2014: COPD & Emphysema combined (CCC_091)

Additional context

Add any other context or screenshots about the feature request here.

Additional instructions for derived variables

Derived variables use R code for more complex operations and multiple starting variables. Note: cchsflow currently uses only base R to derive variables. More complex derived variables that require dependencies are currently out-of-scope for cchsflow.

If possible, attach an .R file that includes documentation of the derived variable as per roxygen2 standards, along with the code to derive the variable. Include all starting variables.

DougManuel commented 3 years ago

In progress.

wyusuf068 commented 3 years ago

See https://github.com/Big-Life-Lab/cchsflow/pull/83.