yhoriuchi / projoint

A package for a more general, more straightforward, and more creative conjoint analysis
https://yhoriuchi.github.io/projoint/
Other
10 stars 0 forks source link

a new function to make a javascript #13

Closed yhoriuchi closed 1 year ago

yhoriuchi commented 1 year ago

I actually wrote a function to make a Javascript for the second wave of a conjoint experiment. This function can be improved and added to this package. An important merit of this function is that it can be fully flexible. A user generates ALL possible profile combinations with appropriate (1) cross-attribute constraints (for each profile), (2) cross-profile constraints, and (3) weights. This function should be super helpful for users who want to estimate many QoIs with constraints and weights. I need someone's help!

aaronrkaufman commented 1 year ago

Where is the draft of this function?

yhoriuchi commented 1 year ago

See, for example, at the very end of this script. It makes study8_javascript.txt which we added to the second wave of our study 8. This javascript assigns exactly the same attributes and levels (as those in Wave 1) to each respondent. My idea is to use this function as a start and make a new function. Users should do the following:

  1. Specify each attribute as a character vector: e.g., race <- c("White", "Black", "Asian")
  2. Specify cross-attribute constraints: e.g., a_const_1 <- list(education = "Graduate degree", occupation = "Janitor")
  3. Specify cross-profile constraints: e.g., p_const_1 <- list(race_1 = "White", race_2 = "White" (where _1 and _2 indicate profile numbers)
  4. Specify desirable weights after adding these constraints

With all these input arguments, ideally, this function should generate ALL possible profile pairs (with constraints and weight). Then, the javascript to be generated will assign one of the possible profile pairs to each task for each respondent.

Eventually, we should make a Shiny app to generate this Javascript.

aaronrkaufman commented 1 year ago

This is definitely on my to-do list, but I do not want to do this in R or R Shiny. As you know, I am hiring a team of RAs to design a web interface for this. Can we close this for now?

yhoriuchi commented 1 year ago

Yes. Please close it.

On Thu, Aug 17, 2023 at 10:15 AM Aaron R. Kaufman @.***> wrote:

This is definitely on my to-do list, but I do not want to do this in R or R Shiny. As you know, I am hiring a team of RAs to design a web interface for this. Can we close this for now?

— Reply to this email directly, view it on GitHub https://github.com/yhoriuchi/projoint/issues/13#issuecomment-1682365913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC332BBJV4EYD7HOIJVJGC3XVYROZANCNFSM6AAAAAA3OWLFDA . You are receiving this because you authored the thread.Message ID: @.***>