opsr_step {OPSR} | R Documentation |
Step Function for OPSR Model Fits
Description
Excludes all coefficients with p-values below pval
and fits again.
Usage
opsr_step(object, pval, log = new.env(), .step = 1, ...)
Arguments
object |
an object of class |
pval |
coefficients with p-values < |
log |
environment to keep track of changes to |
.step |
used to generate identifier in |
... |
Value
An object of class "opsr"
.
Examples
sim_dat <- OPSR::opsr_simulate()
dat <- sim_dat$data
dat$xo3 <- runif(n = nrow(dat))
dat$xo4 <- factor(sample(c("level1", "leve2", "level3"), nrow(dat), replace = TRUE))
f <- ys | yo ~ xs1 + xs2 + log(xo3) | xo1 + xo2 + xo3 + xo4 | xo1 + xo2 + xo3 | xo1 + xo2
fit <- OPSR::opsr(f, dat, printLevel = 0)
fit_step <- opsr_step(fit, pval = 0.1)
texreg::screenreg(list(fit, fit_step))
[Package OPSR version 1.0.0 Index]