Description Usage Arguments Value See Also Examples
Runs a univariate logistic regression on each predictor variable of interest.
1 |
df |
data.frame with variables for analysis |
yv |
character string, target variable |
xv |
character vector, predictor variables to test univariately |
file |
character string, filepath to write results out to. txt or csv file. |
sortby |
character string, criteria to sort variables by. Default = 'aic' |
xvlab |
data.frame, lookup table for variable names. First column is codename, second column is the pretty printed name. |
test |
|
data.frame of results
1 2 3 4 5 6 7 | require('Hmisc')
##setting up some data
longnames <- data.frame(long = c('Weight', 'Miles Per Gallon', 'Cylinder', 'D.R.A.T', 'Horsepower', 'A.M.'),
short = c('wt', 'mpg', 'cyl', 'drat', 'hp', 'am'), stringsAsFactors=F)
glm.out <- uniglm(df=mtcars, yv='vs', xv=c('hp','drat','cyl','mpg','wt'), xvlab=longnames)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.