predMultinomial: Predict probabilities from the coefficients of a multinomial...

View source: R/Models.R

predMultinomialR Documentation

Predict probabilities from the coefficients of a multinomial regression (currently only works if output catgegories are 1,2,3 etc with 1 being the reference)

Description

Predict probabilities from the coefficients of a multinomial regression (currently only works if output catgegories are 1,2,3 etc with 1 being the reference)

Usage

predMultinomial(model.glm.list, envir = parent.frame(), set = NULL)

Arguments

model.glm.list

List of logit models specifying variables to evaluate and coefficients to multiple by - each logit model referring to an output category from the multinomial model. IMPORTANT NOTE - only models for the non-reference output catgegories must be listed, with the logit for the reference group- i.e log(1/1)=0 - being taken care of in the function itself. Logit models must be listed in order of their output category value - e.g the first model refers to output category=2, second model refers to output category=3, and so on. (Output category=1 has to be the reference category).

envir

environment in which to evaluate model variables. if unspecified, uses caller's environment

set

logical vector indicating elements or rows to simulate, or NULL to simulate using all values in envir

Value

a matrix of predicted probabilities


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.