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.

Two questions about ICLV model

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
Post Reply
Amy641
Posts: 2
Joined: 24 Sep 2020, 16:26

Two questions about ICLV model

Post by Amy641 »

Hi, :D

thanks a lot for privode this amazing package apollo. I have two questions about ICLV model.

Question 1: I am trying both sequential estimation and simultaneous estimation. sequential estimation is by lavven package and simultaneous estimation is by apollo. The estimated parameters of latent variables are quite different. There are four latent parameters.
Apollo: lambda.TRAIN1 6.3731 lambda.SM1 1.7476 lambda.TRAIN2 8.6003 lambda.SM2 3.4354
Lavven: lambda.TRAIN1-0.503092 lambda.SM1-0.575931 lambda.TRAIN2 0.532848 lambda.SM2 0.341701
The results of apollo looks wired. the attachment is my data and my programming. could you please tell me if I make some mistakes?
I cannot upload any attachment. the system tell me "Invalid file extension: HCM contious2.R" everytime when I try.



Question 2: Apollo takes a long time. lavven needs several minutes. i think maybe it is because lavven doesn't take panel effect into consideration. I also want to decrease the panel effect of apollo. so I change
"randcoeff[["LV1"]] = gamma_AGE1*AGE + gamma_GENDER1*GENDER + gamma_INCOME1*INCOME + eta1"
to
"randcoeff[["LV1"]] = gamma_AGE1*AGE + gamma_GENDER1*GENDER + gamma_INCOME1*INCOME"
and also delete "P = apollo_avgInterDraws(P, apollo_inputs, functionality)"
the results become
gage.TRAIN -0.2121 NaN NaN 163.7251 0.00
ggender.TRAIN -1.3568 NaN NaN 296.4883 0.00
gincome.TRAIN 0.2102 NaN NaN 265.9663 0.00
gage.SM -0.6425 NaN NaN 61.7211 -0.01
ggender.SM -1.0098 NaN NaN 111.6463 -0.01
gincome.SM 0.6646 NaN NaN 100.2392 0.01
lambda.TRAIN1 -0.3786 NaN NaN 453.2218 0.00
lambda.SM1 0.1751 NaN NaN 167.6733 0.00
lambda.TRAIN2 -0.7047 NaN NaN 300.0220 0.00
lambda.SM2 -1.1982 NaN NaN 115.2265 -0.01
What should I do to decrease the panel effect of apollo?
stephanehess
Site Admin
Posts: 1042
Joined: 24 Apr 2020, 16:29

Re: Two questions about ICLV model

Post by stephanehess »

Hi

1. Sequential and simultaneous estimation should not be expected to give the same results. WIth sequential estimation, you are optimising the latent variables only for the indicators, while, with simultaneous, you're optimising it for the indicators and choice at the same time.

2. I don't know Lavven so wouldn't want to compare speed. But a sequential model would for example in general be expected to be quicker. But what you're doing is in fact removing the random component of the latent variable, so it's no longer a latent variable at all.

Best wishes

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Amy641
Posts: 2
Joined: 24 Sep 2020, 16:26

Re: Two questions about ICLV model

Post by Amy641 »

Thanks a lot!

Could I ask how to do sequential estimation in Apollo? I tried but I am not good at programming. I don't know how to calculate the values of the latent variables. Attached is my failed attempt. Thanks again for your patience and support.

Best wishes!
Attachments
HCM sequential estimation.zip
(2.69 KiB) Downloaded 417 times
stephanehess
Site Admin
Posts: 1042
Joined: 24 Apr 2020, 16:29

Re: Two questions about ICLV model

Post by stephanehess »

Hi

what you need to do is to first specify a model that contains only the structural equation for the latent variable and your measurement model. Then estimate the parameters for those two components. And then as a next step, you specify the choice model that also includes the latent variable (i.e. the structural equation) but not the measurement models, and you use the results from the first model as parameters for the structural equation, and keep them fixed, and only estimate the others parts.

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply