I have a dataset that I ran ANCOVA on and did postHoc analysis. when I view the summary of my data by typing summary(data), I only see the t value and p value.
Is there a way I can see cohen's d value on this? Am using the R stats package.
I have a dataset that I ran ANCOVA on and did postHoc analysis. when I view the summary of my data by typing summary(data), I only see the t value and p value.
Is there a way I can see cohen's d value on this? Am using the R stats package.
A Note on Effect Sizes
Greetings! First off, you would never use Cohen's d for an ANCOVA. A much more common effect size for ANCOVA is eta squared or partial eta squared. Additionally, I didn't see you post any code or data, so it is hard to guess exactly how you have run your model so far. I can run a model with some data you can use in case you want to at least know how, but next time provide the
dputof your data in your question along with your code you have run so far.Running the ANCOVA
First we can load the
effectsizelibrary to obtain our eta squared estimate and load our data with minor changes.If we look at the data, we can check to see that it is appropriate (at least on the surface) for ANCOVA:
Here you can see the data from this command:
We can then fit an ANCOVA with this model:
Here you can see the summary from the model:
We can also look at our pairwise comparisons with this code:
As seen here:
Obtaining Partial Eta
From there you simply run this code:
Which gives you the effect size:
Side Note
There are a number of things you should check with an ANCOVA before running it or obtaining a summary from the model. It is best to make sure it fits all model assumptions before interpreting results like effect sizes. Let me know if this was helpful.