首页 >
> 详细

CEE 6640 Fall 2019

HW3: Conditional Logit

Due: 10/11/2019

Note: For submission please prepare a zip file containing your written report and your R

code. Name your zip file using the following the format: HW3 FamilyName GivenName.zip

(Only zip files will be accepted.)

Part 1: EMPIRICS

I Health Tests for Tay–Sachs (TS) and Cystic Fibrosis (CF).

Problem and Data Description

For this problem you will work with the data set tay_sachs.xlsx. This data set contains

4176 records of 216 subjects, each facing 16 choice situations with 4 alternatives: subjects

were asked whether they would choose to receive diagnostic tests for Tay–Sachs (TS) disease,

Cystic Fibrosis (CF), both, or neither (the 4 alternatives). Covariates include cost of the

test, whether the person’s doctor recommends to take the test, risk factor, and alternative

specific constants (ASCs). Sample members are from the general population. Hint: the data

is in the long shape. Reshape the data set using mlogit.data().

The following table describes the variables in the data set:

Variable Description Type/Level

id Individual ID nominal

cid Choice occasion ID nominal

alt Alternative ID nominal

choice 1 if chosen, 0 otherwise outcome

(binary)

asc_ts ASC for TS test 0, 1

asc_cf ASC for CF test 0, 1

asc_ts_cf ASC for both tests 0, 1

cost_ts Cost to patient of being tested for TS (0,150, 300, 600) /

1000

cost_cf Cost to patient of being tested for CF (0, 375, 750, 1500)

/ 1000

cost_ts_cf Cost to patient of being tested both TS and CF (0, 150, . . . , 1800

, 2100) / 1000

recommended Whether doctor recommends patient to have a test -1(no), 1(yes)

chance The chance that patient is a carrier even if the test

is negative

(15, 30, 45, 60)/10

Variable Description Type/Level

couple Whether patient is told carrier status as an

individual or as a couple

-1(individual),

1(couple)

risk_ts Risk of being a carrier for TS log base 10 of

(.004, .04, .4,4) x

10ˆ3

risk_cf Risk of being a carrier for CF log base 10 of

(.004, .04,. 4,4) x

10ˆ3

Using the health care data set, answer the following questions:

Questions:

EIQ1. (5 pts)

Using 80% of the sample (random subsample), train a conditional logit (MNL) model with

ASCs using the gmnl() package in R. Consider all attributes provided in the data set.

Discuss your results in terms of interpretation of the sign (as marginal utility), magnitude

(as odds ratios), and statistical significance of the estimates. Note: The data set is in panel

structure. So, we need to sample 80% of the subjects. Please use the following seed number:

set.seed(6640).

EIQ2. (10 pts)

First, use the training sample to show that the predicted shares are exactly the same as the

actual shares. Second, repeat the same prediction exercise for the testing data (remaining

20% of the observations). Discuss your results.

EIQ3. (5 pts)

What happens with the estimates and the predicted market shares if you change the reference

alternative. Discuss your results.

EIQ4. (5 pts)

Using the training dataset, estimate a model with only ASCs. What happens with the

predicted market shares for the training and testing datasets? Discuss your results.

II Residential Heating Systems.

Problem and Data Description

For this problem you will work with the file heating_system.xlsx. This data set contains

residential heating choices of 900 households, with a choice set of 5 alternatives. There are

2 alternative-specific attributes (installation and operating costs) and 4 household-specific

variables, as described in the following table.

Variable Description Type/Level

idcase Individual id Nominal

depvar Choice of heating system: one of gc (gas

central), gr (gas room), ec (electric central), er

(electric room), hp (heat pump)

categorical

ic.j Installation cost for heating system j (defined for

the 5 heating systems)

continuous

oc.j Annual operating cost for heating system j (defined

for the 5 heating systems)

continuous

income Annual income of the household continuous

agehed Age of the household head continuous

rooms Number of rooms in the house continuous

region Regional location of the house categorical

Questions:

EIIQ1. (5 pts)

Using the gmnl() function for the full sample, estimate a conditional logit model using as

predictors ASCs, installation cost (ic), operation cost (oc), household income (income), age

of the household head (agehed) and number of rooms in the house (rooms). Discuss sign

and significance of the estimates. Hint: the data is in the wide shape. Reshape the data set

using mlogit.data().

EIIQ2. (10 pts)

Consider a 1% increase in operation cost (oc) of central gas heating (gc). Using your own

code, provide estimates of the direct and cross probability elasticities. Discuss your results.

Hint: for your code, use the the expressions of the elasticities that were reviewed in lectures.

EIIQ3. (10 pts)

Consider now a 10% increase in operation cost (oc) of central gas heating (gc). Use your

elasticity code, as well as your own logit probability code, to determine the percent change

in the choice probabilities of all alternatives for all individuals in the sample. Discuss your

result. Hint: You have to check that the percent change that you obtain from the elasticty

code and that from the probability evaluation code are the same.

EIIQ4. (5 pts)

Take a look at the elasticities you produced, are they linear? Discuss.

EIIQ5. (5 pts)

Is the IIA property reflected in your elasticity calculations?

Part 2: METHODS

MIConsider the following structural model

and its measurement equation

is a latent variable we don’t observe, yi

is what we observe in the data set, and xiis

a K × 1 vector of predictors.MIQ1. (10 pts)

Write the likelihood function which, if maximized, will yield an estimator for the model’s

parameter.

MIQ2. (5 pts)

Suppose now that εi| xi

iid∼ Λ (0, 1) (Logistic). Write the specific log-likelihood function.

MIQ3. (5 pts)

Provide the MLE for β, say bβML, and interpret meaning of the parameters in this model.MII

Suppose that a person is faced with three discrete choices 1, 2, and 3, depending on the value

of a latent variable.

is a utility function (or latent variable), which we don’t observe, but individual i

observe, yi

is the observed choice, and β ⊂ B a K-dimensional parameter space and µ1, µ2

are unknown parameters.

MIIQ1. (10 pts)

Write the likelihood function which, if maximized, will yield estimators for the model’s

parameters, β, µ1, µ2.

MIIQ2. (5 pts)

Suppose now that εi| xi

iid∼ Λ (0, 1) (Logistic). Write the specific log-likelihood function.

MIIQ3. (5 pts)

Provide the MLE for β, say bβML, and interpret meaning of the parameters in this model.

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp

- 代写econ426留学生作业、代做monetary Economics作业、 2020-02-28
- Anlt 207作业代写、代写python实验作业、代做analysis课程 2020-02-28
- Csci 4152作业代做、代写computer Science作业、Pyt 2020-02-28
- 代写comp 4200/5430作业、代做data课程作业、代写python 2020-02-28
- 代做se 3314B留学生作业、代做java编程语言作业、代写python， 2020-02-28
- Iy2840留学生作业代做、代写threat Detection作业、代写r 2020-02-28
- Q-Learning作业代做、代写python课程作业、代做network作 2020-02-28
- 代写mixed Models作业、Python编程语言作业调试、Java，C 2020-02-28
- 代写comp 250作业、代做java编程设计作业、代写java语言作业、代 2020-02-28
- Algorithm留学生作业代做、代写python语言作业、代做data课程 2020-02-28
- Comp 2406作业代做、Java编程语言作业调试、代写java实验作业、 2020-02-26
- 代写data留学生作业、代做program课程作业、代写java，C/C++ 2020-02-26
- 代做ubgmw9-15-3作业、代写matlab实验作业、代做civil E 2020-02-25
- 代做comp 2406作业、代写java语言作业、代做programming 2020-02-25
- 代做openmp留学生作业、代写system课程作业、代做c/C++实验作业 2020-02-24
- Cs 5100作业代写、Prolog Program作业代做、代写pytho 2020-02-24
- 代做programming作业、代写c++语言作业、C++编程设计作业调试、 2020-02-24
- Program 1 Ics-33: Intermediate Program... 2020-02-23
- Masters Programmes In Communicationsso... 2020-02-23
- Mech 203 Week 4 2020-02-23