Which anova and how?


I am currently trying to do an anova for a data set I have, but keep getting an error message. I am attempting to do an anova to test whether levels of fear of crime differ between male and female participants, and whether this depends on whether they have been a victim of crime or not. I thought to do a three-way repeated measures anova, but it keeps telling me it cant find the 'sex' data, and then the 'victim_crime' so I am unsure where I am going wrong. Am I using the wrong anova or is my code wrong? I have put the code chunk below.

res.avo <- aov_ez(data = crime_replication,
dv = fear_of_crime, wid = id,
within = c(sex, crime_victim))

Thank you in advance!

you should look at the documentation for aov_ez function; this is typically done by ?aov_ez in your console.
This will contain explanations of what the arguments should be; and likely examples also.
In this case you are most likely mistakenly using bare symbol names rather than quoted/string literal names.
The documentation would say 'character vector', and therefore you should use quoted value; or an object that resolves to a quoted value.
I also don't know what wid could be; were you intending id ?
you should try

res.avo <- aov_ez(data = crime_replication,
dv = "fear_of_crime", id = "id",
within = c("sex", "crime_victim"))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.