Page 1 of 1

Interactions between categorical attributes

PostPosted: Tue Oct 18, 2022 6:54 pm
by psalazar
Dear all,

I am trying to run the code below, in which I have a partial profile design, I am averaging two models, and I am adding interactions in the second model (M2). However, I am getting an error in Negene suggesting contacting ChoiceMetrics by email ("Something went unexpectedly wrong. You may wish to email ChoiceMetrics at contact@choice-metrics.com for assistance"), and then the software closes unexpectedly. I believe the problem is related to the interactions between dummy variables (when I use interactions between continuous variables or between one continuous and one categorical variable, Ngene works well).

I would appreciate your help very much.

Thanks!

Best wishes,

Pamela.


Code: Select all
Design                                                           ?Bayesian D-efficient design & D-efficient design
;alts(m1)  =  progA*, progB*
;alts(m2)  =  progA*, progB*
;rows   =  26
;block  =  2 
;eff    = M1(mnl,d,mean) + M2(mnl,d)
;alg    = mfederov(candidates = candidate_set_design2.csv)
         
;model(M1):
U(progA) =    b0[(n,-0.11622,0.1198)]
            + byol.dummy[(n,1.52926,0.349)|(n,0.42661,0.3536)]    * yol[2,1,0]      ? # years of life gained (base:0)
            + bqol.dummy[(n,1.71774,0.6043)|(n,1.23595,0.3445)]   * qol[2,1,0]      ? # improvements in HRQoL (base:0)
            + bexp.dummy[(n,1.8846,0.7068)|(n,0.83302,0.4517)]    * exp[2,1,0]      ? patient exp 0 = poor (base), 1 = fair, 2= good
            + bsize.dummy[(n,1.44939,0.5482)|(n,0.87223,0.4073)]  * size[2,1,0]     ? # Size of target population per 100,000 citizens (base:0)
            + bequ.dummy[0.000002|0.000001]                       * equ[2,1,0]      ? % disadvantaged of the target population (base:0)
            /
U(progB) =    byol         * yol
            + bqol         * qol
            + bexp         * exp
            + bsize        * size
            + bequ         * equ

;model(M2):
U(progA) =    b0[0.00000001]
            + byol.dummy[0.000002|0.000001]   * yol[2,1,0]                            ?  # years of life gained (base:0)
            + bqol.dummy[0.000002|0.000001]   * qol[2,1,0]                            ? # improvements in HRQoL (base:0)
            + bexp.dummy[0.000002|0.000001]   * exp[2,1,0]                            ? patient exp 0 = poor (base), 1 = fair, 2= good
            + bsize.dummy[0.000002|0.000001]  * size[2,1,0]                           ? # Size of target population per 100,000 citizens  (base:0)
            + bequ.dummy[0.000002|0.000001]   * equ[2,1,0]                            ? % disadvantaged of the target population  (base:0)
            + i1[0.0000001]                   * exp.dummy[1]*qol.dummy[2]             ? Interaction term, with exp at level 1 and qol at level 1   
            + i2[0.0000001]                   * exp.dummy[2]*qol.dummy[1]             ? Interaction term, with exp at level 2 and qol at level 2
            /
U(progB) =    byol         * yol
            + bqol         * qol
            + bexp         * exp
            + bsize        * size
            + bequ         * equ
            + i1           * exp.dummy[1]*qol.dummy[2]
            + i2           * exp.dummy[2]*qol.dummy[1]
$

Re: Interactions between categorical attributes

PostPosted: Tue Oct 18, 2022 7:30 pm
by Michiel Bliemer
It may be an issue with your CSV file? If I run the script with this syntax then it runs fine:

;alg = mfederov(candidates = 200)

Or does the script run fine with the candidate set if there are no interactions?

Btw, I suggest you add something like:
;bdraws = sobol(500)

Sobol draws are better in case you have so many Bayesian priors like you have, and 200 is not enough, you may need much more than 500 to get accurate Bayesian D-errors.

Re: Interactions between categorical attributes

PostPosted: Wed Oct 19, 2022 3:33 am
by psalazar
Many thanks, Professor.

I was indeed having a problem with my CSV file. It's now solved and I was able to run the models.

Thanks also for the suggestion on the draws!

Best wishes,

Pamela.