分数多项式模型应用:当怀疑连续性自变量与因变量的某些或全部关系可能是非线性的时。
可以基于线性模型、logistic回归、cox回归。
1、基于线性模型:
fp <V1>, scale center: regress OUT1 <V1> Sex Age BMI
#scale center指定自动居中为中心
fp <V1>, dimension(4) center replace: regress OUT1 <V1> Sex Age BMI
#指定最高4次,通过包含替换来覆盖先前生成的分数多项式幂变量,可以通过比较残差等选择合适
的模型。
fp plot, residuals(none)
2、(基于logistic回归):
fp <V1>, zero: logit OUT1 <V1> Sex Age BMI
fp plot, residuals(none)
Reference:
Fractional polynomials | Stata
https://www.stata.com/features/overview/fractional-polynomials/
https://www.researchgate.net/publication/24137442
Multivariable regression model building by using fractional polynomials: Description of SAS, STA TA and R programs.