Last active
November 9, 2022 16:06
-
-
Save MJacobs1985/1e183107fc151693821116c95d07452a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NV_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_9_"), | |
q9 = mean(value)) %>% | |
dplyr::mutate(nv = case_when( | |
q9 == 1 ~ 0, | |
q9 == 2 ~ 100/6, | |
q9 == 3 ~ 50, | |
q9 == 4 ~ 100, | |
TRUE ~ -1));head(NV_QOL) | |
NV_QOL$nv<-ifelse(NV_QOL$nv==-1, NA, NV_QOL$nv) | |
PA_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_5_", "QOL_12"), | |
mean = mean(value), | |
pa=((mean-1)/3)*100) | |
DY_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_4_"), | |
mean = mean(value), | |
dy=((mean-1)/3)*100) | |
SL_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_6_"), | |
mean = mean(value), | |
sl =((mean-1)/3)*100) | |
AP_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_8_"), | |
mean = mean(value), | |
ap =((mean-1)/3)*100) | |
CO_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_10"), | |
mean = mean(value), | |
co =((mean-1)/3)*100) | |
Q12_QOL<-try%>% | |
dplyr::summarise(variable = c("QOL_15"), | |
mean = mean(value), | |
q15 = ((mean-1)/6)*100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment