data_to_mulitnomial: Reformats dataframe to multinomial regression form

Description Usage Arguments Value

View source: R/multinomial_likelihood.R

Description

Given a dataframe and a formula object, will return the necessary dependent variable matrix and the model matrix needed to run the optimization for multinomial regression for a given reference level.

Usage

1
data_to_mulitnomial(data, formula, ref_level = "8", intercept = T)

Arguments

data

a dataframe

formula

a formula object describing the regression to be run

ref_level

a string which specifies the reference level of the factor dependent variable

intercept

logical, whether to include an intercept or not in the regression (default is TRUE)

Value

a list containing:


group-wine/sommelieR documentation built on May 21, 2019, 1:43 p.m.