Clogit function in CEDesign not converge

205 Views Asked by At

I designed a CE Experiment using the package support.CEs. I generated a CE Design with 3 attributes an 4 levels per attribute. The questionnaire had 4 alternatives and 4 blocks

des1 <- rotation.design(attribute.names = list(
    Qualitat = c("Aigua potable", "Cosetes.blanques.flotant", "Aigua.pou", "Aigua.marro"),
    Disponibilitat.acces = c("Aixeta.24h", "Aixeta.10h", "Diposit.comunitari", "Pou.a.20"), 
    Preu = c("No.problemes.€", "Esforç.economic", "No.pagues.acces", "No.pagues.no.acces")),
    nalternatives = 4, nblocks = 4, row.renames = FALSE,
    randomize = TRUE, seed = 987)

The questionnaire was replied by 15 persons (ID 1-15), so 60 outputs (15 persons responding per 4 blocks:

   ID BLOCK q1 q2 q3 q4
1   1     1  1  2  3  3
2   1     2  1  3  3  4
3   1     3  5  1  3  5
4   1     4  5  2  2  5
5   2     1  1  2  4  3
6   2     2  1  4  3  4
7   2     3  3  1  3  2
8   2     4  1  2  2  2
9   3     1  1  2  2  2
10  3     2  1  4  3  4
11  3     3  3  1  3  4
12  3     4  3  2  1  4
13  4     1  1  5  4  3
14  4     2  1  4  5  4
15  4     3  5  5  3  2
16  4     4  5  2  5  5
17  5     1  1  2  4  2
18  5     2  3  2  3  2
19  5     3  3  1  3  4
20  5     4  3  2  1  4
21  6     1  1  5  5  5
22  6     2  1  3  3  4
23  6     3  3  1  3  4
24  6     4  1  2  2  2
25  7     1  1  2  4  3
26  7     2  4  2  3  4
27  7     3  3  1  3  3
28  7     4  3  4  5  5
29  8     1  1  3  2  3
30  8     2  1  4  3  4
31  8     3  3  1  3  4
32  8     4  1  2  2  1
33  9     1  1  2  3  3
34  9     2  1  3  3  4
35  9     3  5  1  3  5
36  9     4  5  2  2  5
37 15     1  1  5  5  5
38 15     2  4  4  5  4
39 15     3  5  5  3  5
40 15     4  4  3  5  5
41 11     1  1  5  5  5
42 11     2  4  4  5  4
43 11     3  5  5  3  5
44 11     4  5  3  5  5
45 12     1  1  2  4  3
46 12     2  4  2  3  4
47 12     3  3  1  3  3
48 12     4  3  4  5  5
49 13     1  1  2  2  2
50 13     2  1  4  3  4
51 13     3  3  1  3  2
52 13     4  1  2  2  2
53 14     1  1  1  3  3
54 14     2  1  4  1  4
55 14     3  4  1  3  2
56 14     4  3  2  1  2
57 15     1  1  1  3  2
58 15     2  5  2  1  4
59 15     3  4  4  3  1
60 15     4  3  4  1  4

The probles is that, when i merge the questions and answers matrix with the formula

dataset1 <- make.dataset(respondent.dataset = res1,
                    choice.indicators = c("q1","q2","q3","q4"),
                    design.matrix = desmat1)

R shows a warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Ran out of iterations and did not converge

I should expect that the matrix desmat1 generated had 4800 observations (80 possible combinations and 60 outputs). Instead of that i have only 1200 obseravations. The matrix dataset1 only shows the combination of 1 set of alternatives instead of the 4.

For example, for ID 1, Block 1, Question 1 only appears alternative 1. It match with the answer selected by the person, but in other cases it does not match, and that information is lost in R, so the results when clogit is applied are wrong.

I do hope thay the problems is understood. Regards,

Edition:

I found my problem. When i make the dataset from the respondent.dataset that i generated in .csv format, r detects only the q1 response instead of q1-q4. dataset1

dataset1 <- make.dataset(respondent.dataset = res1,
                    choice.indicators = c("q1","q2","q3","q4"),
                    design.matrix = desmat1)

detects q1-q4 as new columns. But the key is that q1-q4 has to fill the columns QES in dataset1. I did another CE before with 1 block and the dataset was correctly done one reading the respondant.dataset. So the key point is that now i'm using 4 blocks but i do not know how to make R to interprete that q1-q4 are the columns QUES for each block.

res1 matrix (repondant.dataset) (Complete matriz has 60 rows = 15 respondants (ID 1-15) * 4 Questions (QES column in make.dataset)

enter image description here

Kind reagards,

0

There are 0 best solutions below