multinom_list {hesim} | R Documentation |
List of multinom
objects
Description
Combine multinom
objects into a list.
Usage
multinom_list(...)
Arguments
... |
Objects of class |
Value
An object of class multinom_list
.
Examples
library("nnet")
library("data.table")
trans_data <- data.table(multinom3_exdata$transitions)
dat_healthy <- trans_data[state_from == "Healthy"]
fit_healthy <- multinom(state_to ~ strategy_name + female + age_cat + year_cat,
data = dat_healthy)
dat_sick <- trans_data[state_from == "Sick"]
dat_sick$state_to <- droplevels(dat_sick$state_to)
fit_sick <- multinom(state_to ~ strategy_name + female + age_cat + year_cat,
data = dat_sick)
fits <- multinom_list(healthy = fit_healthy, sick = fit_sick)
class(fits)
[Package hesim version 0.5.4 Index]