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.

HCM with Ordered Logit (more than one indicator)

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
Post Reply
Yashin
Posts: 21
Joined: 23 Sep 2021, 01:43

HCM with Ordered Logit (more than one indicator)

Post by Yashin »

Dear Sir,
I have 2 questions regarding the HCM with OL.

For estimating HCM with OL, I have 4 attitudinal factors such as Perceive, Attitude, Subjective Norms(SN) & Environmental Concerns(EC). Each of these attitudinal factors has 4-5 different attitudinal statements (for example the Attitudinal Factor 'Perceive' has 4 different statements such as AQ1PBC_r1 till AQ1PBC_r4 and so on) and each of these has been measured by 5 points Likert Scale (Strongly disagree to Strongly agree).

While using the example from the apollo website, I have found out the apollo drug choice dataset used for the estimation has only 1 attitudinal statement for each of the attitudinal factors.

Q1. What changes do I need to make in my ordered logit settings in this case?

Here is the piece of the code :

### Likelihood of indicators
ol_settings1 = list(outcomeOrdered = AQ1PBC_r1,
V = zeta_perceive*LV,
tau = list(tau_perceive_1, tau_perceive_2, tau_perceive_3, tau_perceive_4),
rows = (Task==1),
componentName = "indic_perceive")
ol_settings2 = list(outcomeOrdered = AQ2ATTITUDE_r1,
V = zeta_attitude*LV,
tau = list(tau_attitude_1, tau_attitude_2,tau_attitude_3,tau_attitude_4),
rows = (Task==1),
componentName = "indic_attitude")
ol_settings3 = list(outcomeOrdered = AQ3SN_r1,
V = zeta_SN*LV,
tau = list(tau_SN_1, tau_SN_2, tau_SN_3, tau_SN_4),
rows = (Task==1),
componentName = "indic_SN")
ol_settings4 = list(outcomeOrdered = AQ5EC_r1,
V = zeta_EC*LV,
tau = list(tau_EC_1, tau_EC_2, tau_EC_3, tau_EC_4),
rows = (Task==1),
componentName = "indic_EC")


Q2. While doing the estimation, the estimates result in Zeta parameters which have +/- signs that indicate the impact of the attitudinal factor on the measurement model, but what do the +/- signs of the tau_quality_1, tau_quality_2, tau_quality_3, tau_quality_4 other tau's indicates?

Your suggestions are highly appreciated.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: HCM with Ordered Logit (more than one indicator)

Post by stephanehess »

Hi

Q1: no, this is not correct. There is a single latent variable in our example, and this is used for 4 attitudinal statements. Note that there are no "attitudinal factors". In your case, you would have 4 latent variables, one for perceive, one for attitude, ..., and each would be used in 4-5 different OL models

Q2: please consult the literature on ordered logit models. The thresholds capture the baseline shares for the different levels for the indicators

Hope this helps.

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Yashin
Posts: 21
Joined: 23 Sep 2021, 01:43

Re: HCM with Ordered Logit (more than one indicator)

Post by Yashin »

Thank you Sir for the reply. If I have understood correctly,

So for each of the latent variables, there would be 4-5 OL settings depending on the number of attitudinal statements asked to the respondents?
For example: Showing one latent variable 'Perceive' with 4 different attitudinal statements:

Should the code looks like below:

### Likelihood of indicators
ol_settings1 = list(outcomeOrdered = AQ1PBC_r1,
V = zeta_perceive*LV,
tau = list(tau_perceive_1, tau_perceive_2, tau_perceive_3, tau_perceive_4),
rows = (Task==1),
componentName = "indic_perceive_1")

ol_settings2 = list(outcomeOrdered = AQ1PBC_r2,
V = zeta_perceive*LV,
tau = list(tau_perceive_1, tau_perceive_2, tau_perceive_3, tau_perceive_4),
rows = (Task==1),
componentName = "indic_perceive_2")

ol_settings3 = list(outcomeOrdered = AQ1PBC_r3,
V = zeta_perceive*LV,
tau = list(tau_perceive_1, tau_perceive_2, tau_perceive_3, tau_perceive_4),
rows = (Task==1),
componentName = "indic_perceive_3")

ol_settings4 = list(outcomeOrdered = AQ1PBC_r4,
V = zeta_perceive*LV,
tau = list(tau_perceive_1, tau_perceive_2, tau_perceive_3, tau_perceive_4),
rows = (Task==1),
componentName = "indic_perceive_4")

P[["indic_perceive_1"]] = apollo_ol(ol_settings1, functionality)
P[["indic_perceive_2"]] = apollo_ol(ol_settings2, functionality)
P[["indic_perceive_3"]] = apollo_ol(ol_settings3, functionality)
P[["indic_perceive_4"]] = apollo_ol(ol_settings4, functionality)

and last not least:

During the apollo_beta = c, , the value of the zeta_perceive = 1 ?
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: HCM with Ordered Logit (more than one indicator)

Post by stephanehess »

yes, and you would use different LVs for each latent variable in the code of course, so LV would only be for these 4 (so maybe call it LV_perceive) and then a different one for others.

But the other thing that is incorrect in your code here is that you have the same taus and the same zetas for the different indicators. Again, please have a look at the online example, which makes clear what you need to do here.
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Yashin
Posts: 21
Joined: 23 Sep 2021, 01:43

Re: HCM with Ordered Logit (more than one indicator)

Post by Yashin »

Thank you sir for your prompt reply.


Yes, surely you are right I did a mistake while defining the taus and zetas which will be different for different indicators and LV.

For this first LV ('Perceive'), LV_perceive will be multiplied with different 'zetas' throughout the 4 indicators. Similarly, the second latent variable ('Subjective Norms') will have different zetas and taus for its indicators along with new (LV_SN)

but in doing so, for LV_peceive the following piece of code will also change for LV_SN, if I am right?

### Create random parameters (this is for LV_perceive)
apollo_randCoeff=function(apollo_beta, apollo_inputs){
randcoeff = list()

randcoeff[["LV_perceive"]] = gamma_Age*Age + gamma_Gender*Gender + gamma_income*income + eta

return(randcoeff)
}

### Create random parameters (this is for LV_SN)
apollo_randCoeff=function(apollo_beta, apollo_inputs){
randcoeff = list()

randcoeff[["LV_SN"]] = gamma_Age*Age + gamma_Gender*Gender + gamma_income*income + eta

return(randcoeff)
}
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: HCM with Ordered Logit (more than one indicator)

Post by stephanehess »

Yes, but you'll do it all in one section, and you'll need separate gammas and etas for each LV, i.e.

Code: Select all

apollo_randCoeff=function(apollo_beta, apollo_inputs){
randcoeff = list()

randcoeff[["LV_perceive"]] = gamma_Age_perceive*Age + gamma_Gender_perceive*Gender + gamma_income*income + eta_perceive
randcoeff[["LV_SN"]] = gamma_Age_perceive*Age + gamma_Gender_perceive*Gender + gamma_income*income + eta_perceive

return(randcoeff)
}
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply