Re: Latent variable estimation
Posted: 26 Oct 2021, 02:18
Hi Stephane,
Thank you for your continuous enlightenment. Assuming that I still want to obtain allocation probabilities based on the estimates for latent variables without the choice component (for exploratory purposes). How can I code that in apollo? I tried adding to apollo_probabilities this:
And also this as another alternative:
But in both cases I got: "Error in f(init, x[]) : non-numeric argument to binary operator". Thank you in advance.
Thank you for your continuous enlightenment. Assuming that I still want to obtain allocation probabilities based on the estimates for latent variables without the choice component (for exploratory purposes). How can I code that in apollo? I tried adding to apollo_probabilities this:
Code: Select all
V=list()
V[["class_a"]] = delta_a
V[["class_b"]] = delta_b + piLV1*LV1
mnl_settings = list(
alternatives = c(class_a=1, class_b=2),
avail = 1,
choiceVar = NA,
V = V
)
P[["pi_values"]] = apollo_mnl(mnl_settings, functionality="raw")Code: Select all
classAlloc_settings = list(
V = list(A = 0,
B = delta_b + piLV1*LV1)
)
P[["pi_values"]] = apollo_classAlloc(classAlloc_settings)