本章思维导图:
前言
笔者之前介绍了限制性立方样条(RCS)的高分套路,主要为理论和简单代码为主。但是很多小伙伴对HR=1如何选点,以及RCS美图,仍然需求强烈。本章节笔者为了把问题解释的更清晰,更新了大量图表,请小伙伴们耐心看完。
Harrell推荐K=3-7,测试AIC最小,结合解释性选择K值。从图1图2可见,K从3-5,曲线变复杂了,蓝色RCS线条拟合后变更弯曲。不同的K,harrell推荐了经典的prob位置(百分位数),例如k=3,位置参数为P10,P50,P90。P10=0.1=10%,P50=0.5=50%,P90=0.9=90%。同K下,P改变,仅仅改变最窄处位置与CI阴影。
图1 Harrell推荐RCS节点
图2 RCS形态与节点knot
为了更好的展示K与P对RCS曲线和阴影区间的互动关系,笔者制作了下图。图3中,K对蓝色RCS线条影响,而P无影响,K对置信区间(CI)阴影部分影响也远远大于P的影响,但是P对HR=1处的影响是决定性的。
图3 RCS形态与节点k和位置参数P
默认HR=1处为P50,中位数处。如果设置P10为参考值,HR=1处即为P10。可以观察蓝色RCS线条图形,肉眼选择曲线最低处,再手动赋值为HR=1。总结就是refvalue = HR(1) 。
笔者推荐文献1、2中论述了RCS方法,当K=3-7测试时候,一般选K=3或4,剂量呈现有规律递增或递减,则选P10即可很好的展示趋势,此时P10或P5 等对应的切点值并不重要。RCS描述:“Possible nonlinear relationships between the change in ambient air pollutants and cognitive decline were examined with restricted cubic splines (RCS). The knots between 3 and 7 were selected as the lowest value for the Akaike information criterion. The reference value (OR = 1) was set at the 10th percentile. The knots were set at the 10th, 50th, and 90th percentiles of the ln-transformed concentrations. Values were excluded for those outside the 5th and 95th percentiles.”
文献3中,当剂量效应为U形,则可以按照P50或者最低蓝色RCS点手动赋值refvalue,此时U形最低值可能十分具有临床意义。本例,采用了P50和手动refvalue,考虑U形最低点与P50接近,就直接用了中位数来解释。RCS描述:“We also used restricted cubic splines with five knots at the 5th, 35th, 50th, 65th, and 95th centiles to flexibly model the association of lean body mass, fat mass, and BMI with mortality.(案例knot=4) In the spline models, lean body mass and fat mass were mutually adjusted. We tested for potential non-linearity by using a likelihood ratio test comparing the model with only a linear term against the model with linear and cubic spline terms. …Given our a priori hypothesis that people with low lean body mass in the lower BMI range cause the J or U shaped relation between BMI and mortality, we examined how the shape of BMI-mortality association changes after we excluded participants with low lean body mass (defined as those below the 2.5th, 5th, and 10th centiles of total participants).”
RCS美图,将于系列3更新,包括等比例双坐标轴,双变量双坐标,平滑曲线与密度函数,密度函数与直方图。需要看懂前2期文章哦。
1.Huang S, Zhong D, Lv Z, Cheng J, Zou X, Wang T, Wen Y, Wang C, Yu S, Huang H, Li L, Nie Z. Associations of multiple plasma metals with the risk of metabolic syndrome: A cross-sectional study in the mid-aged and older population of China. Ecotoxicol Environ Saf. 2022 Feb;231:113183. doi: 10.1016/j.ecoenv.2022.113183. Epub 2022 Jan 13. PMID: 35032729. 2.Hu X, Nie Z, Ou Y, Qian Z, McMillin SE, Aaron HE, Zhou Y, Dong G, Dong H. Air quality improvement and cognitive function benefit: Insight from clean air action in China. Environ Res. 2022 Aug 27;214(Pt 4):114200. doi: 10.1016/j.envres.2022.114200. Epub ahead of print. PMID: 36030909. 3. https://www.ncbi.nlm.nih.gov/pmc/articles/pmid/29970408
原创不易,转载请说明来自本公众号。