Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting mean, standard deviation and significance test for 3 variables

    Dear all,

    I've got a question regarding a problem consisting of three variables. The 3 variables are "Treatment" (Control/Treatment), "Gender" and "# of desserts bought". How can I get the mean standard deviation and a significance test like with the chi2-test but for the three conditions. So: Is there a significant difference between the numbers of desserts bought by a female person under treatment or control?

    Thank you for you help!

  • #2
    Well, the means and standard deviations are easy enough:

    Code:
    table treatment gender, c(mean desserts sd desserts)
    Of course, replace "treatment," "gender," and "desserts" by the actual names of your variables.

    As for the chi-square test, there are many different hypotheses you could test here. You mention one specific one, and that would be:

    Code:
    tab desserts treatment if gender == "female", chi2
    (replace "female" by whatever the actual code for female in your gender variable is, and without quotes if it is numeric).

    But perhaps you have something more general in mind. If you explain your goals, better advice might be forthcoming.

    Comment

    Working...
    X