rlogit: Random parameter logit model

Description Usage Arguments Details Value Author(s) References Examples

View source: R/rlogit.R

Description

Estimation by simulated likelihood of the random parameter (or mixed) logit model

Usage

1
2
3
4
5
6
7
8
rlogit(formula, data, rpar = NULL, correlation = FALSE, weights = NULL,
    id = NULL, start = NULL, R = 50, eta = NULL, halton = NULL,
    fixed = FALSE, norm = NULL, ...)
## S3 method for class 'rlogit'
summary(object, ...)
## S3 method for class 'summary.rlogit'
print(x, digits = max(3, getOption("digits") - 2),
    width = getOption("width"), ...)

Arguments

x, object

an object of class rlogit

formula

a symbolic description for the model to be estimated,

data

the data,

rpar

a vector indicating which coefficients are random and which distribution they are assumed to follow,

correlation

a boolean indicating whether random parameters are assumed to be corelated,

weights

a vector of weights,

id

the individual index in case of panel data,

start

a vector of starting values,

R

the number of draws for the random parameters,

eta

a matrix of random numbers,

halton

a boolean indivating whether Halton sequences should be used,

fixed

a vector of boolean indicating which coefficients should be fixed,

norm

the name of the variable used for normalisation,

digits

the number of digits,

width

the width of the printing,

...

further arguments.

Details

rlogit estimate a random parameter logit model using simulations.

Value

An object of class "rlogit", a list with elements coefficients, vcov, X, hessian, gradient, call, model, df.residual, logLik and type.

Author(s)

Yves Croissant

References

Train, K. (2004) Discrete Choice Modelling, whith Simulations, Cambridge University Press.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
data("Mode",package="Ecdat")
Mode <- mlogit.data(Mode,choice="choice",shape="wide",varying=2:9)
za <- rlogit(choice~cost+time,Mode,rpar=c(time="n"))
summary(za)

data("Heating",package="Ecdat")
Hea <- mlogit.data(Heating,choice="depvar",varying=c(3:12,17:21),shape="wide")
tt <- rlogit(depvar~ic+oc+(income+agehed):chdim,data=Hea)



## End(Not run)

rlogit documentation built on May 2, 2019, 4:59 p.m.

Related to rlogit in rlogit...