Description Usage Arguments Value Examples
Performs backwards selection of model parameters. Removes parameter with greatest p-value above "prem" threshold. P-values are calculated using Ordinary Least Squares (no weighting option). Must have at least one non-intercept covariate in the model.
1 | back_select(formula, data, prem = 0.1)
|
formula |
Model formula using specified columns of DataFrame 'data'. Can include interactions and select no intercept with -1. |
data |
Dataframe from which model variables are pulled. |
prem |
Threshold at which a parameter will be removed from the model if it has the highest p-value above the threshold. The default value is .1. |
List containing the following elements
beta estimates
estimate standard errors
test statistics
p-values
residuals
covariates removed from model
1 2 3 4 5 6 | x = rnorm(10)
x2 = rnorm(10)
y = rnorm(10)
df = data.frame(y,x,x2)
back_select(formula = y~x*x2, data = df, prem = .1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.