R/mice_multilevel_create_formula.R

Defines functions mice_multilevel_create_formula

## File Name: mice_multilevel_create_formula.R
## File Version: 0.04


mice_multilevel_create_formula <- function(
        variables, include_intercept ){
    #---
    intercept_code <- if ( include_intercept ){ 1 } else { 0 }
    fml <- paste0( c( intercept_code, variables ),
            collapse="+" )
    return(fml)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on May 29, 2024, 11:05 a.m.