rcs_linear.lshap {rcssci}R Documentation

rcs_linear.lshap

Description

restricted cubic splines (RCS) published in SCI.

Arguments

data

data.frame.Rdata

knot

knot=3-7 or automatic calculate by AIC min

y

outcome=0,1

covs

covariables, univariate analysis without "covs" command, multivariable analysis with "covs" command

prob

position parameter,range from 0-1

x

main exposure and X-axis when plotting

filepath

path of plots output.

Details

linear models with RCS splines were performed to explore the shape linear or nonlinear(U, inverted U,J,S,L,log,-log,temporary plateau shape)

Value

message.print PH assumption and other message

Author(s)

Zhiqiang Nie, niezhiqiang@gdph.org.cn

Examples

library(rcssci)
rcs_linear.lshap(data=sbpdata, y = "sbp",x = "age",
prob=0.1,filepath=tempdir())
# library(rcssci)
# rcs_linear.lshap(knot=4,data=sbpdata, y = "sbp",x = "age",
# covs=c("gender"),prob=0.1,filepath="D:/temp")


[Package rcssci version 0.4.0 Index]