Dear Professors,
I am trying to design an experiment where one attribute is the degree of self-sufficiency achievable when installing solar panels (5 h, 10 h, 24 h, or 0 h), and I want to code this as a categorical variable.
However, I get the following error message
"Error: An attribute has the wrong number of levels for dummy or effects coding. 'strg' "
after running a code containing the following line of code within an orthogonal design:
"b3.dummy * strg[0, 1, 2, 3]"
Is this because I have an orthogonal design or that I have no priors?
What am I doing wrong? Should I rather code this as a continuous variable?
Thank you in advance and best regards,
Gabrielle Söderberg
Categorical variables
Moderators: Andrew Collins, Michiel Bliemer, johnr
-
- Posts: 2055
- Joined: Tue Mar 31, 2009 4:13 pm
Re: Categorical variables
The error arises because the number of priors is not consistent with the number of attribute levels. The following will work:
b3.dummy[0|0|0] * strg[0, 1, 2, 3]
Michiel
b3.dummy[0|0|0] * strg[0, 1, 2, 3]
Michiel