Following estimations with glst, I discovered that there were non-linearity with the model (p=0.0088). I plotted the graph by using twoway function as follows:
Code:
predictnl lrr_lin=_b[dose]*dose gen rr_lin=exp(lrr_lin) predictnl logrrwithref=_b[doses1]*doses1 + _b[doses2]*doses2 + _b[doses3]*doses3, ci(lo hi) gen rrwithref=exp(logrrwithref) gen lbwithref=exp(lo) gen ubwithref=exp(hi) twoway (line lbwithref ubwithref rrwithref dose, sort lp(longdash longdash l) lc(black black black)) (line rr_lin dose, > sort lp(shortdash) lc(black))
Array
I discovered that the narrowest CI lies within the 17th dose. I would like to predict the model by using dose 17 as the reference. How can I do it? I did not find any help by looking into predictnl or twoway command.
I found that, in [R], you can predict the according to the reference with this command:
Code:
with(predict(spl_bin, dosex_bin, xref_bin, exp=TRUE),{plot(get(“rcs(dose, knots_bin)dose”), pred, type=“l”, ylim=c(0.4, 10), ylab=“cardiovascular disease relative risk”, xlab=“alcohol consumption, grams/day”, log=“y”, bty=“l”, las=1) (get(“rcs(dose, knots_bin)dose”), cbind(ci.ub, ci.lb), col=1, lty=“dashed”)})
Study reference: Shim SR, Lee J. Dose-response meta-analysis: application and practice using the R software. Epidemiol Health. 2019;41:e2019006
Please help, any help will be much appreciated. Thank you very much
Best,
0 Response to How to adjust restricted cubic spline curve for custom references?
Post a Comment