covariate_df_to_mat: Take data frame and turn it into matrix for logistic...

Description Usage Arguments Details Value

Description

Take data frame and turn it into matrix for logistic regression

Usage

1
covariate_df_to_mat(mc_trees, cov_names)

Arguments

mc_trees

data frame with cov_names

cov_names

null or string of vector

Details

if cov_names is NA, then we return a matrix of 1 column of 1s. This is the case of having beta_0 only. Otherwise, we return the matrix with 1 column of 1s for the intercept and the rest of the variables.

Value

matrix of dimension n x (p+1)


skgallagher/InfectionTrees documentation built on July 28, 2021, 2:14 p.m.