Dear all,
I'm running an analysis assessing the association between a continuous variable and a clinical characteristic (categorical variable). Since I've found discrepancies between a linear regression model and a logistic one (i.e. if I categorised my continuous variable it prompts a positive association --> increased odds for pts with a clinical characteristic of having high variable // but if I keep it continuous the coefficient is no more significant ) I was wondering if the association couldn't be linear. Thereafter I've started thinking about using a spline model, displaying coefficient of a linear model (adjusted for covariates) across each single values of my continuous variable. Nonetheless i'm having problems. Anyone can help me out?
Here's the code
Variable dependent: ntprobnp
Categorical variable: clinPH
Code used:
mkspline ntprobnpspl = ntprobnp, cubic nknots(5) displayknots
mat knots = r(knots) //crea spline variable con knots
stset sos_outtime_hosphf, failure(sos_out_deathcvhosphf=2) scale(30.44) exit(time 30.44*12)
regress ntprobnpspl* i.clinPH i.agec i.sexc i.NYHAdic i.diur i.FA i.egfrc i.SV i.agec i.bmic I.LAarea i.MAP
tabstat ntprobnp, statistics(p1 p5 p10 p25 p50 p75 p90 p95 p99) /
levelsof ntprobnp
xbrcspline ntprobnpspl, values(35 85 191 459 1588 4070 7701 14737 3500) ref(35) matknots(knots) eform gen(Ntprobnp coeff_ntprobnp lb_events ub_events)
and here I got a message from STATA [ntprobnpspl1] not found
I'm running an analysis assessing the association between a continuous variable and a clinical characteristic (categorical variable). Since I've found discrepancies between a linear regression model and a logistic one (i.e. if I categorised my continuous variable it prompts a positive association --> increased odds for pts with a clinical characteristic of having high variable // but if I keep it continuous the coefficient is no more significant ) I was wondering if the association couldn't be linear. Thereafter I've started thinking about using a spline model, displaying coefficient of a linear model (adjusted for covariates) across each single values of my continuous variable. Nonetheless i'm having problems. Anyone can help me out?
Here's the code
Variable dependent: ntprobnp
Categorical variable: clinPH
Code used:
mkspline ntprobnpspl = ntprobnp, cubic nknots(5) displayknots
mat knots = r(knots) //crea spline variable con knots
stset sos_outtime_hosphf, failure(sos_out_deathcvhosphf=2) scale(30.44) exit(time 30.44*12)
regress ntprobnpspl* i.clinPH i.agec i.sexc i.NYHAdic i.diur i.FA i.egfrc i.SV i.agec i.bmic I.LAarea i.MAP
tabstat ntprobnp, statistics(p1 p5 p10 p25 p50 p75 p90 p95 p99) /
levelsof ntprobnp
xbrcspline ntprobnpspl, values(35 85 191 459 1588 4070 7701 14737 3500) ref(35) matknots(knots) eform gen(Ntprobnp coeff_ntprobnp lb_events ub_events)
and here I got a message from STATA [ntprobnpspl1] not found
Comment