4
$\begingroup$

I am reposting the same question that I made on Stack Overflow. I am new with Bayesian analysis methods and I am still struggling understanding some concepts regarding priors. I am running a model with two categorical non-ordinate predictors:

  • TOV, which has three levels (TYPEWORD1, TYPEWORD2,TYPEWORD3).
  • Group, which has two levels (GroupSPE and GroupCONT).

Every level is "nominal", i.e. doesn't contain values but only specifies a variant of the same object and they are encoded with numbers (e.g. GroupSPE is 0, GroupCONT is 1). Regarding the variable "Group", having two levels means centering it, if I understand correctly (e.g. $\text{Normal}(-0.5,0.5)$. However, the two groups differ in the fact that both speak three languages, but one of the three is different between the groups). Does it means I have to code it in a different way with priors?

What is concerning me mostly is TOV, which has three levels. In which way I have to choose priors in this case? All I know from references is that usually TYPEWORD3 is read slower than TYPEWORD2 and TYPEWORD1, and that TYPEWORD 2 is read slower than TYPEWORD1 but faster than TYPEWORD3. However, from previous analyses I saw that my model goes again these results, given the fact that in my model TYPEWORD1 is read slower than TYPEWORD 2 and 3.

As I said before, I am new with Bayesian methods. Thus, if you could show how to code properly priors with practical dummy examples with the same features, would be really appreciated.

$\endgroup$
8
  • $\begingroup$ Sorry I think I missed something here. What is your outcome variable? Or are you regressing one categorical variable on another? Based on the wording, I'm guessing that you are referring to a DV like reaction time (RT). $\endgroup$ Commented Feb 18 at 4:12
  • 1
    $\begingroup$ Hi Schawn, thank you for the answer. Yes, I will study RT for now. Then I will study some count and binomial outcomes, but I’d prefer stick to RT for now. From vasishth.github.io/bayescogsci/book/ch-priors.html for intercept priors: RT usually are between 0 and 3000ms. Also, in this book these data are considered: Subject intercept SDs: estimated mean, estimated standard deviation (sd), Item intercept SDs: mean, Slope SDs: mean, sd, Residual SDs: mean, sd. $\endgroup$
    – Dea
    Commented Feb 18 at 4:37
  • $\begingroup$ I hope the information that I am giving are clear $\endgroup$
    – Dea
    Commented Feb 18 at 4:52
  • $\begingroup$ It seems you also posted this on the Stan forum? Help with bayesian regression modeling (beginner). The Stan forum gets extra details about your problem, I notice. $\endgroup$
    – dipetkov
    Commented Feb 18 at 12:01
  • $\begingroup$ Yes I posted it. May I ask you to which details do you refer please? $\endgroup$
    – Dea
    Commented Feb 18 at 12:23

1 Answer 1

4
$\begingroup$

As far as I know, if you are just considering the priors for the slope values, then I believe that is fairly straightforward for categorical variables like yours. Since categorical variable coefficients simply represent conditional mean shifts in RT, then the values can be positive or negative, and thus represented essentially as a normally distributed prior with a given mean and SD. How much the mean and SD are supposed to be for this prior depends solely on your own field of work and the typical group changes in RT you see. If for example L2 groups have slower RT ($-200$ ms) and this varies little by study (maybe $+/- 10$ ms), then you can represent this simply with a prior as:

$$ \beta \sim \text{Normal}(-200,10) $$

The code for achieving that is essentially the same as what they show in the link you provided. Note that because the intercept represents the conditional mean of your reference groups, you will need to consider what that should look like for the intercepts as well as the slopes. Chapter 5 of McElreath's book Statistical Rethinking discusses the prior specification of categorical variables if you are interested in further reading there.

$\endgroup$
5
  • 1
    $\begingroup$ It's a considerable weakness that the OP doesn't mention what assumption they make about the response. Response time (RT) is positive, so perhaps the model for the outcome will be a GLM of some kind (a gamma GLM is popular though hard to fit). That would make the interpretation of the parameters -- and hence the choice of priors -- more challenging. $\endgroup$
    – dipetkov
    Commented Feb 18 at 9:44
  • $\begingroup$ In general, I expect that GroupSPE will present slower RT than GroupCONT. Also, I am expecting that TYPEVERB1 will present slower RT in comparison to 3 but faster RT in comparison to 2. $\endgroup$
    – Dea
    Commented Feb 18 at 12:28
  • $\begingroup$ Yes, another point not clear to me is the fact that the intercept is the reference group. Is there any way to code the "real" intercept, in order to have the reference group in the output too? Regarding Statistical Rethinking, I had a look to it but to me is still a little confusing (I am a novice with bayesian). $\endgroup$
    – Dea
    Commented Feb 18 at 13:08
  • $\begingroup$ If you are referring to dummy coding which uses the reference group as the intercept, then the intercept, $\beta_0$, would be given it's own prior (to represent what the conditional mean of the reference group should be) and the slopes for the comparison groups would be given separate priors (as adjustments to that conditional mean). $\endgroup$ Commented Feb 18 at 15:18
  • $\begingroup$ Note that as the others said, the priors you set for different pieces of your regression will be contingent on the error term of the model. I know that RT is inverse Gaussian distributed, so you may need to consider either a GLMM that fits this family (which by default has Gamma distributed scale parameters in brms) or you can normalize the data with the inverse RT transform: $$ \text{invRT} = \frac{-1000}{\text{RT}} $$ However, I believe that doing so will still result in negative values and will bound the data negatively. $\endgroup$ Commented Feb 18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.