Say I have two vectors:
Action.Taken = c(0,1,0,0,1,1,0,1,0)
Success = c(0,0,0,1,0,1,0,1,0)
The first tells me whether or not a specific action was taken in a trial and the second tells me whether or not that trial succeeded. How would I go analyzing these two vectors to answer the following question: Does taking action (Action.Taken = 1
) affect whether or not success is had (Success = 1
)? I'd like some measure of significance as an regression/hypothesis testing.
I'm looking for an answer that I can implement using R. I am also quite new to stats, so it would be nice if someone could give me a relatively simple, straightforward answer/example.
Thanks!
prop.test
function, which returns, among other things, the p-value given the null hypothesis that two (or more) proportions aren't different. I think phi is just as simple ascor(dat)
, but I don't know what/how much that tells me. $\endgroup$