A categorical model for continous variable

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

A categorical model for continous variable

Postby sukunta » Thu May 13, 2021 2:40 am

Dear Michiel Bliemer,
The model specification of my pilot study suitable for a categorical model for a continuous variable (Time) (pseudo R2 of the continuous model less than categorical model 0.3906, 0.9308, respectively). Should I design the syntax for Time is categorical for the main survey?

Sincerely yours,
Sukunta
sukunta
 
Posts: 80
Joined: Tue Jan 12, 2016 1:28 pm

Re: A categorical model for continous variable

Postby Michiel Bliemer » Thu May 13, 2021 9:13 am

Yes you can. But it depends on what your study objective is. If you want to obtain willingness-to-pay then having dummy/effects coded attributes will not give you single WTP value and you cannot easily use it for forecasting with interpolated values. For example, if you estimate dummy coded coefficients for levels 10 and 20 (relative to 30), then you cannot compute the choice probability if time is 15.

If there are nonlinearities in a quantitative continuous variable, then you can consider applying a nonlinear transformation. For example, you can estimate a model with beta * ln(time), where ln is the natural logarithm. This way you can always interpolate (i.e., compute probabilities for level 15) although your WTP value will now again not be single value but rather a function of time. To estimate a model with a transformation, you simply transform your data to ln(time) and put that in the estimation tool. In Ngene you would to the same, you would put values ln(10), ln(20) and ln(30) as levels of the time attribute.

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

Re: A categorical model for continous variable

Postby sukunta » Thu May 13, 2021 5:03 pm

Dear Michiel Bliemer,
Thank you so much. From your recommendation, then my syntax is
Code: Select all
design
;alts=alt1*,alt2*,alt3
;rows=12
;block=2
;eff =(mnl,d,mean)
;con
;bdraws = gauss(3)
;model:
U(alt1)=b0 [(n, 2.501704, 1.141856)]+b1.dummy[(n,-0.5077506, 0.2668998)]*private[1,0]+b2.dummy[(n,0.4270188, 0.1971011)]*open[1,0]+b3.dummy[(n, 0.2385852, 0.3606243) |(n, 0.2457456, 0.2188252)]*time[1.30103
, 1.477121,1] + b4.dummy[(n, 1.035963, 0.3080124) |(n, 0.740783, 0.2492737)]*channel[1,2,0]/
U(alt2)= b0 [(n, 2.501704, 1.141856)]+b1* private +b2* open +b3* time +b4* channel
$
and in the questionnaire, I should converse to 10,20,30 min.
Sincerely yours,
Sukunta
sukunta
 
Posts: 80
Joined: Tue Jan 12, 2016 1:28 pm

Re: A categorical model for continous variable

Postby Michiel Bliemer » Thu May 13, 2021 5:11 pm

In that syntax you now have both dummy coding and a transformation. You should choose. OR dummy coding, OR a transformation, but not both. In both cases, you replace the dummy variable or the transform with 10, 20 and 30 in the survey.
Michiel Bliemer
 
Posts: 1705
Joined: Tue Mar 31, 2009 4:13 pm

Re: A categorical model for continous variable

Postby sukunta » Thu May 13, 2021 6:04 pm

Dear Michiel Bliemer,
Thank you so much. My syntax was corrected follows your recommendation is
Code: Select all
design
;alts=alt1*,alt2*,alt3
;rows=12
;block=2
;eff =(mnl,d,mean)
;con
;bdraws = gauss(3)
;model:
U(alt1)=b0 [(n, 2.501704, 1.141856)]+b1.dummy[(n,-0.5077506, 0.2668998)]*private[1,0]+b2.dummy[(n,0.4270188, 0.1971011)]*open[1,0]+b3[(n, 0.0121578, 0.0109568)]*time[1,1.477121,1.30103]+ b4.dummy[(n, 1.035963, 0.3080124) |(n, 0.740783, 0.2492737)]*channel[1,2,0]/
U(alt2)= b0 [(n, 2.501704, 1.141856)]+b1* private +b2* open +b3* time +b4* channel
$
Is it correct?
Sincelery yours,
Sukunta
sukunta
 
Posts: 80
Joined: Tue Jan 12, 2016 1:28 pm

Re: A categorical model for continous variable

Postby Michiel Bliemer » Thu May 13, 2021 6:15 pm

If you want to use ln(10), ln(20), and ln(30) then the syntax should be

b3[...] * time[2.30, 2.99, 3.40]

and you will have to estimate the b3 prior in your pilot study by using the same transformation.
Michiel Bliemer
 
Posts: 1705
Joined: Tue Mar 31, 2009 4:13 pm

Re: A categorical model for continous variable

Postby sukunta » Thu May 13, 2021 6:55 pm

Dear Michiel Bliemer,
Thank you so much for your kindness.
Sincerely yours,
sukunta
 
Posts: 80
Joined: Tue Jan 12, 2016 1:28 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 9 guests

cron