prep_data_for_model: Prepare data for analysis with a statistical model

View source: R/prep_data_for_model.R

prep_data_for_modelR Documentation

Prepare data for analysis with a statistical model

Description

Prepare data for analysis with a statistical model

Usage

prep_data_for_model(
  data,
  standardize = c("age_at_admit", "AHRQ_score", "val_hosp_rn2bed_ratio",
    "val_hosp_mcday2inptday_ratio", "val_hosp_rn2inptday_ratio")
)

Arguments

data

The current data.

standardize

Character string of variables to standardize (mean 0, stddev 1)

Details

create binary variables for models, including ses, race, admission status. Standardized continuous variables for easy converging; rename variables that need to be used in models.

Value

A data frame worthy of applying a statistical model to.


UMCSTaR/medicareAnalytics documentation built on July 13, 2022, 11:33 p.m.