Hello everyone,
I am totally stuck and hope someone can help.
I am doing a study on vegetable intake and the risk of colorectal. I am specifically interested in how change in intake affects the risk of cancer. I made a variable with change in intake.
When I ran my regressions model (stcox) and margins afterwards to predict scenarios, it seems like the higher the vegetables intake, the higher the risk of cancer. Something must be wrong in the coding of the change variable.
My intention was to create
0= no change in considered if change is between -75 and +75
1= decrease in intake
2= increase in intake
gen diff = (f_nsv-b_nsv)
gen change_in_intake=.
replace change_in_intake=0 if(diff <=-40 & diff<=40)
replace change_in_intake=1 if(diff > -40)
replace change_in_intake=2 if(diff > 40)
label define changelab45 0 "No change in intake" 1"Decrease in intake,-50gr or lower" 2" Increase in intake, +50gr or higher"
label values change_in_intake changelab45
codebook change_in_intake
f_nsv is vegetables intake at followup and b_nsv is intake at baseline.
Hope someone can offer advice
// Anne
Ps. dataex not an option
I am totally stuck and hope someone can help.
I am doing a study on vegetable intake and the risk of colorectal. I am specifically interested in how change in intake affects the risk of cancer. I made a variable with change in intake.
When I ran my regressions model (stcox) and margins afterwards to predict scenarios, it seems like the higher the vegetables intake, the higher the risk of cancer. Something must be wrong in the coding of the change variable.
My intention was to create
0= no change in considered if change is between -75 and +75
1= decrease in intake
2= increase in intake
gen diff = (f_nsv-b_nsv)
gen change_in_intake=.
replace change_in_intake=0 if(diff <=-40 & diff<=40)
replace change_in_intake=1 if(diff > -40)
replace change_in_intake=2 if(diff > 40)
label define changelab45 0 "No change in intake" 1"Decrease in intake,-50gr or lower" 2" Increase in intake, +50gr or higher"
label values change_in_intake changelab45
codebook change_in_intake
f_nsv is vegetables intake at followup and b_nsv is intake at baseline.
Hope someone can offer advice
// Anne
Ps. dataex not an option
Comment