Formatting the None Choice

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Formatting the None Choice

Postby agarwalmanoj » Sat Aug 21, 2021 5:41 am

Hello,
I found a good design and am now trying to format the choice cards. I have 4 attributes, 3 alternative rides and a none choice. The context is choosing a Uber type ride.

In order to create a column for the 'None" choice I did the following. (I am providing these details so other readers can follow. Changing the table dimension is not discussed in the manual).
1. In the "Configure Scenario Formatting" i went to the left top and changed the table dimension from 6 rows, 4 columns to 6 rows, 5 columns. This added a new column on the right.
2. I then typed in "None of these rides" in the new column title.
I then added a "choice 1" in the Add choice part on the left.
3. To add the radio button, I then chose "choice 1" in each column of the "Choice question" row on the screen.

Now i have the choice scenario looking ok. But the formatting of the last column is not the same as the first 3. Can you please help in how to change this.
Thanks so much
Manoj Agarwal

Here is the code
Design
; alts = alt1*,alt2*,alt3*,none
; rows=15
; eff=(mnl,d)
;alg=mfederov
;model:
U(alt1) = b2.effects[1.2|.8]*PR[12,16,20]
+ b3.effects[.8 |.2]*WT[2,6,10]
+ b4.effects[-.06|-.03]*DQ[0,1,2]
+ b5.effects[-.04|-.01]*RC[0,1,2]
+ int11[0.001]*PR.effects[12]*WT.effects[2]
+ int12[0.001]*PR.effects[12]*WT.effects[6]
+ int13[0.001]*PR.effects[16]*WT.effects[2]
+ int14[0.001]*PR.effects[16]*WT.effects[6]
+ int21[0.001]*PR.effects[12]*DQ.effects[0]
+ int22[0.001]*PR.effects[12]*DQ.effects[1]
+ int23[0.001]*PR.effects[16]*DQ.effects[0]
+ int24[0.001]*PR.effects[16]*DQ.effects[1]
+ int31[0.001]*PR.effects[12]*RC.effects[0]
+ int32[0.001]*PR.effects[12]*RC.effects[1]
+ int33[0.001]*PR.effects[16]*RC.effects[0]
+ int34[0.001]*PR.effects[16]*RC.effects[1] /

U(alt2) = b2*PR
+b3*WT
+b4*DQ
+b5*RC
+ int11*PR.effects[12]*WT.effects[2]
+ int12*PR.effects[12]*WT.effects[6]
+ int13*PR.effects[16]*WT.effects[2]
+ int14*PR.effects[16]*WT.effects[6]
+ int21*PR.effects[12]*DQ.effects[0]
+ int22*PR.effects[12]*DQ.effects[1]
+ int23*PR.effects[16]*DQ.effects[0]
+ int24*PR.effects[16]*DQ.effects[1]
+ int31*PR.effects[12]*RC.effects[0]
+ int32*PR.effects[12]*RC.effects[1]
+ int33*PR.effects[16]*RC.effects[0]
+ int34*PR.effects[16]*RC.effects[1] /

U(alt3) = b2*PR
+b3*WT
+b4*DQ
+b5*RC
+ int11*PR.effects[12]*WT.effects[2]
+ int12*PR.effects[12]*WT.effects[6]
+ int13*PR.effects[16]*WT.effects[2]
+ int14*PR.effects[16]*WT.effects[6]
+ int21*PR.effects[12]*DQ.effects[0]
+ int22*PR.effects[12]*DQ.effects[1]
+ int23*PR.effects[16]*DQ.effects[0]
+ int24*PR.effects[16]*DQ.effects[1]
+ int31*PR.effects[12]*RC.effects[0]
+ int32*PR.effects[12]*RC.effects[1]
+ int33*PR.effects[16]*RC.effects[0]
+ int34*PR.effects[16]*RC.effects[1] /

U(none) = b1[0]
;formatTitle = 'Scenario <scenarionumber>'
;formatTableDimensions = 5, 6
;formatChoices = choice 1
;formatTable:
1,1 = '' /
1,2 = 'Ride Price' /
1,3 = 'Wait time' /
1,4 = 'Driver Quality' /
1,5 = 'Ride Comfort' /
1,6 = 'Choice question&:' /
2,1 = 'Ride A' /
2,2 = '<alt1.pr>' /
2,3 = '<alt1.wt>' /
2,4 = '<alt1.dq>' /
2,5 = '<alt1.rc>' /
2,6 = '<choice 1>' /
3,1 = 'Ride B' /
3,2 = '<alt2.pr>' /
3,3 = '<alt2.wt>' /
3,4 = '<alt2.dq>' /
3,5 = '<alt2.rc>' /
3,6 = '<choice 1>' /
4,1 = 'Ride C' /
4,2 = '<alt3.pr>' /
4,3 = '<alt3.wt>' /
4,4 = '<alt3.dq>' /
4,5 = '<alt3.rc>' /
4,6 = '<choice 1>' /
5,1 = 'None of these Rides' /
5,2 = '' /
5,3 = '' /
5,4 = '' /
5,5 = '' /
5,6 = '<choice 1>'
;formatTableStyle:
1,1 = 'default' /
1,2 = 'headingattribute' /
1,3 = 'headingattribute' /
1,4 = 'headingattribute' /
1,5 = 'headingattribute' /
1,6 = 'headingattribute' /
2,1 = 'heading1' /
2,2 = 'body1' /
2,3 = 'body1' /
2,4 = 'body1' /
2,5 = 'body1' /
2,6 = 'choice1' /
3,1 = 'heading2' /
3,2 = 'body2' /
3,3 = 'body2' /
3,4 = 'body2' /
3,5 = 'body2' /
3,6 = 'choice2' /
4,1 = 'heading3' /
4,2 = 'body3' /
4,3 = 'body3' /
4,4 = 'body3' /
4,5 = 'body3' /
4,6 = 'choice3' /
5,1 = '' /
5,2 = '' /
5,3 = '' /
5,4 = '' /
5,5 = '' /
5,6 = ''
;formatStyleSheet = Red hot.css
;formatAttributes:
alt1.pr(12=&$ #, 16=&$ #, 20=&$ #) /
alt1.wt(2=# Minutes, 6=# Minutes, 10=# Minutes) /
alt1.dq(0=#, 1=#, 2=#) /
alt1.rc(0=#, 1=#, 2=#) /
alt2.pr(12=&$ #, 16=&$ #, 20=&$ #) /
alt2.wt(2=# Minutes, 6=# Minutes, 10=# Minutes) /
alt2.dq(0=#, 1=#, 2=#) /
alt2.rc(0=#, 1=#, 2=#) /
alt3.pr(12=&$ #, 16=&$ #, 20=&$ #) /
alt3.wt(2=# Minutes, 6=# Minutes, 10=# Minutes) /
alt3.dq(0=#, 1=#, 2=#) /
alt3.rc(0=#, 1=#, 2=#)
$
agarwalmanoj
 
Posts: 12
Joined: Wed Aug 04, 2021 1:24 am

Re: Formatting the None Choice

Postby Michiel Bliemer » Mon Aug 23, 2021 11:40 am

To make the style of the last columns the same, you need to change the cell style in the scenario formatting window.

To see the current cell styles, you can select the "Cell style" radio button at the bottom, next to the "Cell content" radio button that is selected by default.You will then see that the new column does not yet have a cell style, while the other columns have styles "heading3", "body3" and "choice3". To change the cell style, right-click with the mouse on the cell and select the style that you want, e.g. "heading4", "body4", and "choice4".

With the right-mouse button you can also insert/delete rows or columns to change the look of the table.

Thank you for pointing out that this is not explained in the manual, I will make sure that it is included in the newly written manual for version 2.0. It will likely not end up in the manual yet for version 1.3 that we are working on releasing soon since this manual is maintained in an older system (that will not be used for version 2.0) and only necessary changes will be made to this manual.

Michiel
Michiel Bliemer
 
Posts: 1888
Joined: Tue Mar 31, 2009 4:13 pm

Re: Formatting the None Choice

Postby agarwalmanoj » Tue Aug 24, 2021 12:46 pm

Thanks. Worked like a charm. Manoj
agarwalmanoj
 
Posts: 12
Joined: Wed Aug 04, 2021 1:24 am

Re: Formatting the None Choice

Postby agarwalmanoj » Fri Sep 10, 2021 1:23 am

Hello,
I have a few more questions.
1. I am trying to block the saved design into 3 blocks. I did not do this in the original run. I added the following two lines below the model and removed the alg=line in my syntax.
;block=3
;eval=Rider EFF nonlinear 3 alts 15 sets Final.ngd
However the block column continues to show all zeros.

2. Can i export the design file to EXCEL? Or should i just copy and paste.
3. The HTML syntax does not have the formatting information that is used for say the "Red hot" format in the Syntax window. Do i have to "Export to HTML files to get the formatting added?

Thank you.
Manoj Agarwal
agarwalmanoj
 
Posts: 12
Joined: Wed Aug 04, 2021 1:24 am

Re: Formatting the None Choice

Postby Michiel Bliemer » Fri Sep 10, 2021 11:37 am

1. Can you try:

;block = 3, newblocking

This forces Ngene to create a new blocking column in an existing design (Ngene manual, page 212).

2. Just use copy and paste. The output was designed as a grid so that it can easily be copied to Excel for further analysis and manipulation.

3. Formatting is stored in cascading style sheets (CSS) used by web browsers. In the HTML code you will see at the top something like the following:

<LINK href="C:\Program Files (x86)\ChoiceMetrics\Ngene\Stylesheets\Red hot.css" rel="stylesheet" type="text/css">

It is not necessary to Export to HTML files, instead you need to make sure that the web browser can find this file. If you send it to someone else you would need to send the CSS file as well and adjust the HTML reference for example to

<LINK href="Red hot.css" rel="stylesheet" type="text/css">

assuming that the HTML code and the CSS file are stored in the same folder.

Michiel
Michiel Bliemer
 
Posts: 1888
Joined: Tue Mar 31, 2009 4:13 pm

Re: Formatting the None Choice

Postby agarwalmanoj » Wed Sep 15, 2021 12:24 am

Thanks so much, Michiel.
1. newblocking worked fine, and created the blocks.
2. On the formatting question, I want to use the Redhot style in displaying the Choice Cards. I plan to use Qualtrics to collect the data. In Qualtrics each choice card will become a question, and I can post the HTML code for each of the questions. I will also be able to randomize the order in each of the three blocks. What is the best way to get the HTML code for each choice card so that it includes all the style information for Redhot in HTML as well?
Thanks so much
Manoj
agarwalmanoj
 
Posts: 12
Joined: Wed Aug 04, 2021 1:24 am

Re: Formatting the None Choice

Postby Michiel Bliemer » Wed Sep 15, 2021 10:11 am

I am no expert in HTML coding so I think that you will find the answer in HTML forums. This website for example explains how to include CSS styling in your HTML code:
https://www.w3schools.com/html/html_css.asp

It is currently excluded as external CSS and you seem to be able to put it as internal CSS in your HTML code. I hope that helps.

Michiel
Michiel Bliemer
 
Posts: 1888
Joined: Tue Mar 31, 2009 4:13 pm

Re: Formatting the None Choice

Postby agarwalmanoj » Fri Oct 08, 2021 6:43 am

Hi,
I had another follow up question. I need to export the design to Qualtrics for its conjoint module.
When I look at the design in the Design properties, what i see are the actual levels for the 3 level quantitative variables, and 0,1,2 for the dummy variables.
Any way (besides manually doing it) to get back the original 0,1,2 values for the quantitative variables in the design properties for an already optimized design?
Thanks
Manoj Agarwal
agarwalmanoj
 
Posts: 12
Joined: Wed Aug 04, 2021 1:24 am

Re: Formatting the None Choice

Postby Michiel Bliemer » Fri Oct 08, 2021 9:16 am

Hi Manoj,

Qualtrics (and most other survey instruments) require design coding (0, 1, 2, ...) as input, while for efficient designs estimation coding (using the actual numerical values of levels) is required. This means that once the design has been generated, you need to copy it to Excel and replace the actual numerical values back to design coding. For example, replacing 10, 15, 20 (to represent for example price) with 0, 1, and 2 in that column. SurveyEngine is a survey tool that can read in Ngene formatted designs and can automatically do this conversion for you, but Qualtrics does not and requires manual recoding within Excel.

We are currently working on Ngene 2.0, which will have a new graphical user interface and I think having an option to go back and forth between design coding and estimation coding would be useful and I will put it on the list of desired features for version 2.0.

Best wishes,
Michiel
Michiel Bliemer
 
Posts: 1888
Joined: Tue Mar 31, 2009 4:13 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 7 guests