scm_reg | R Documentation |
Use to perform Stepwise Covariate Modeling (SCM)
scm_reg(
dataset,
variable,
variable_event = NULL,
weights_ordered = NULL,
covariate.list = NULL,
test_used = "Chisq",
p_forward = 0.01,
p_backward = 0.001,
regression = "lm",
cov_corr = NULL,
search_direction = "full",
base_relation = NULL,
full_relation = NULL,
max_steps = Inf,
...
)
dataset |
name of dataset |
variable |
dependent variable |
variable_event |
event variable for coxph regression only |
weights_ordered |
weight used in the ordered-categorical regression |
covariate.list |
vector of covariate to be tested |
test_used |
test to be applied. Can be 'Chisq' or 'AIC' |
p_forward |
p value for forward selection and interaction phase |
p_backward |
p value for forward step |
regression |
type of regression, can be 'lm', 'logistic', 'coxph' or 'ordered-categorical' |
cov_corr |
list of correlated covariates you don t want to be included simultaneously like eGFR and CRCL. Can be added as a list of vectors in case of multiple vectors of correlated covariates |
search_direction |
step to be performed. Can be 'full', 'forward', 'interaction', 'backward', 'forward-backward', 'forward-interaction' or 'interaction-backward' |
base_relation |
base relation included in the base model. Note those relationships cannot be removed in the backward step. Example "age*bwt + crcl" |
full_relation |
starting model when performing backward step only. |
max_steps |
maximal number of covariates included in the forward step |
... |
Additional arguments |
Object of class scmobject
## Not run:
library(scmreg)
library(MASS)
haha <- scm_reg(dataset=housing,
variable='Sat',
covariate.list = c('Infl','Type','Cont'),
p_forward=0.01,
p_backward=0.001,
test_used = 'AIC',
regression='ordered-categorical',
search_direction='forward-backward',
weights_ordered='Freq',
max_steps=Inf)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.