Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

Is it okay using apllo_weighting for propensity score weighting?

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
Post Reply
Hyewon
Posts: 11
Joined: 28 Dec 2020, 04:30

Is it okay using apllo_weighting for propensity score weighting?

Post by Hyewon »

Dear Stephane,

I want to use propensity score weighting to control selection biases in experimental groups.
The datasets are Stated Choice survey, and looks like as follows;

Code: Select all

ID	choice	attirbute1		attribute2	 ... 	ipw
1	   1			1			0		0.3478
1	   3			0			1		0.3478
1	   5			1			1		0.3478
2	   3			0			1		3.7865
2 	   4			1			1		3.7865
2	   3			0			1 		3.7865
ipw row is for propensity scores,
I used ordered logit model since the choice part is in Likert scale, and I have two questions as follows;

1. Can I use apollo_weighting in propensity score weighting?
I tried weights = "ipw" in apollo_control and P = apollo_weighting(P, apollo_inputs, functionality) before prepareprob, which follows the manual.
I just add these two in my original basic code for Ordered logit.

2. If it is okay, however, the result is different from other, MASS package, simple ordered logit also.
I will attach the different results.

(1) Result from apollo

Code: Select all

Estimates:
                  Estimate        s.e.   t.rat.(0)    Rob.s.e. Rob.t.rat.(0)
b_auto_tram       -0.05929     0.03786     -1.5658     0.05149       -1.1515
b_auto_vehi        0.04170     0.04618      0.9030     0.16129        0.2585
b_bus             -0.18977     0.04646     -4.0851     0.14342       -1.3232
b_truck_person     0.24773     0.07118      3.4805     0.28958        0.8555
b_truck_guard      0.25147     0.04102      6.1298     0.06824        3.6850
b_video            0.10208     0.03814      2.6766     0.33802        0.3020
b_experi           0.68932     0.19335      3.5651     0.40888        1.6859
b_none             0.00000          NA          NA          NA            NA
tau_choice_1      -1.67527     0.04992    -33.5567     0.31206       -5.3685
tau_choice_2      -0.62904     0.04634    -13.5750     0.27961       -2.2497
tau_choice_3       0.77439     0.04662     16.6089     0.34088        2.2717
tau_choice_4       1.87547     0.05072     36.9775     0.54187        3.4611

(2) Result for MASS package in r

Code: Select all

Call:
polr(formula = ans ~ auto_tram + auto_vehi + bus + truck_person * 
    s21_1 + truck_guard + video1 + exp_group, data = rdata3, 
    weights = ipw)


Coefficients:
                      Value         Std. Error       t value
auto_tram          -0.06321    0.03787  -1.669
auto_vehi           0.04968    0.04620   1.075
bus                -0.18969    0.04646  -4.083
truck_person       -0.28461    0.05187  -5.487
s21_1               0.29061    0.05363   5.419
truck_guard         0.09386    0.04635   2.025
video              0.07793    0.03833   2.033
exp_group           0.55516    0.19438   2.856
truck_person:s21_1  0.16706    0.09305   1.795

Sorry for the differences in the variable name, As you can see, the coefficients are different especially t-values are really different.
For your understanding, there are 3 groups, video, experiment, and none. Therefore, I put none as a baseline.



Thank you for your kind supports for questions, I really want to use this package in my analysis since it is really straightforward to expand what I want to do.
Thank you so much.

With kindest regards,
Hyewon
dpalma
Posts: 190
Joined: 24 Apr 2020, 17:54

Re: Is it okay using apllo_weighting for propensity score weighting?

Post by dpalma »

Hi Hyewon,

You seem to be using two additional explanatory variables in your MASS model: s21_1 and the interaction between s21_1 and truck_person (truck_person:s21_1). Those two variables do not seem to be included in the Apollo model.

Cheers
David
Post Reply