MNlogitf: 'MNlogitf' or 'MNdogitf' returns log-likelihood(LL)...

Description Usage Arguments Value Functions Examples

Description

MNlogitf or MNdogitf returns log-likelihood(LL) expression for discrete equations of "logit" or "dogit" model.

Usage

1
2
3
4
5
6
7
8
9
MNlogitf(ffor, transform = FALSE, separatenmm = FALSE, weight_disc = FALSE)

MNdogitf(
  ffor,
  transform = FALSE,
  separatenmm = FALSE,
  weight_disc = FALSE,
  ppardogit = NULL
)

Arguments

ffor

Discrete choice equations.

transform

if TRUE, quantile transformation (normal) is applied.

separatenmm

if TRUE, equation specific LL is calculated

weight_disc

if TRUE, equations will include equation specific weights.

ppardogit

"dogit" parameters only used in MNdogitf

Value

formula

simplified LL for each equation or joint

probs

probability expression unsimplified

expr

LL string simplified

formulat

unsimplified log(P), only if transform is TRUE

probt

unsimplified P with quantile transformation qnorm(ifelse(P)), only if transform is TRUE

expreteso

unsimplified pnorm((qnorm(P)-mean)/sd), only if transform is TRUE

probte

qnorm(P)

tval

If quantile transformation is applied

sume

Denominator of logit probability

Functions

Examples

1
2
3
4
5
6
7
8
9
eq_d <- c("ASC1 * 1 + B11_dur * dur_1" , "ASC2 * 1 + B12_dur * dur_2",
"ASC3 * 1 + B13_dur * dur_3 + B20_cost * cost_3 + B53_parkman * PbAvl_3",
"ASC4 * 1 + B14_dur * dur_4 + B20_cost * cost_4 + B34_serv * servIdx_4 + B44_stop * stopUs1R1_4")
parl <- c(paste0("ASC", 1:4), paste0("B1", 1:4, "_dur"), "B20_cost", "B53_parkman", "B34_serv",
"B44_stop")
disc_par <- get_par(parl, eq_d)
ffor <- disc_par$cheqs0
res_l <- MNlogitf(ffor, separatenmm=FALSE, transform=FALSE)
res_d <- MNdogitf(ffor, separatenmm=FALSE, transform=FALSE)

nmm documentation built on Jan. 7, 2021, 5:10 p.m.

Related to MNlogitf in nmm...