print.summary.mixl: Print a model summary

Description Usage Arguments Examples

Description

print() is an S3 method for the summary.mixl class, the output of a model plus goodness of fit metrics

Usage

1
2
## S3 method for class 'summary.mixl'
print(x, ...)

Arguments

x

The summary to print.

...

Options to pass to print.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
	data("Train", package="mlogit")
	Train$ID <- Train$id
	Train$CHOICE <- as.numeric(Train$choice)
	    
	mnl_test <- "
	U_A = @B_price * $price_A / 1000 + @B_time * $time_A / 60;
	U_B = @asc + @B_price * $price_B / 1000 + @B_timeB * $time_B / 60;
	"

	model_spec <- mixl::specify_model(mnl_test, Train, disable_multicore=T)

	#only take starting values that are needed
	est <- stats::setNames(c(1, 1,1,1), c("asc", "B_price", "B_time", "B_timeB"))
	availabilities <- mixl::generate_default_availabilities(
		Train, model_spec$num_utility_functions
	)

	model <- mixl::estimate(model_spec, est, Train, availabilities = availabilities)
	summary(model)

mixl documentation built on Oct. 23, 2020, 7:28 p.m.