| plsi.lr.v2 | R Documentation |
Partial linear single index linear regression for scalar outcome, second version
plsi.lr.v2(
data,
Y.name,
X.name,
Z.name,
spline.num,
spline.degree,
initial.random.num,
seed = 2026
)
data |
A data set including all needed variables |
Y.name |
Variable name for scalar outcome |
X.name |
Variable name vector for exposures |
Z.name |
Variable name vector for confounders |
spline.num |
A number representing the degree of freedom of B-spline basis for link function |
spline.degree |
A number representing the degree of the piece-wise polynomial of B-spline basis for link function |
initial.random.num |
A number representing the number of random initials used in the function |
seed |
A single integer used to seed the RNG so results (random initials and downstream optim() convergence) are reproducible. Set to NULL to skip seeding and use whatever RNG state is already active in the calling environment. Default is 2023. |
A list of model estimation and prediction results
Yuyan Wang
## Not run:
data(nhanes.new)
data <- nhanes.new
Y.name <- "log.triglyceride"
X.name <- c("X1_trans.b.carotene", "X2_retinol", "X3_g.tocopherol", "X4_a.tocopherol",
"X5_PCB99", "X6_PCB156", "X7_PCB206",
"X8_3.3.4.4.5.pncb", "X9_1.2.3.4.7.8.hxcdf", "X10_2.3.4.6.7.8.hxcdf")
Z.name <- c("AGE.c", "SEX.Female", "RACE.NH.Black",
"RACE.MexicanAmerican", "RACE.OtherRace", "RACE.Hispanic" )
spline.num <- 5
spline.degree <- 3
initial.random.num <- 1
seed = 2026
model_lr_v2 <- plsi.lr.v2(data = data, Y.name = Y.name, X.name = X.name, Z.name = Z.name,
spline.num, spline.degree, initial.random.num, seed = seed)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.