+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19

Thread: Chi test and regression

  1. #1
    Points: 42, Level: 1
    Level completed: 84%, Points required for next Level: 8

    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Chi test and regression



    Hello everybody

    I have to test whether there is a significant difference between two groups. I want to indicate that among the two groups are no differences. First I made a chi-test and the resulting p value was about 0.4 which would be "good". But the results of a regression did not confirm that. I got a p value of 0.035 for the variable(inwhich group the people are)
    The r2 is just about 0.05 for this variable and about 0.16 for the whole model.
    Im really confused... Does anybody have an idea what Im doing wrong? Why do I get different results?

    Appreciate any help!
    Oliver

  2. #2
    Points: 1,639, Level: 23
    Level completed: 39%, Points required for next Level: 61

    Location
    Sweden
    Posts
    200
    Thanks
    11
    Thanked 45 Times in 41 Posts

    Re: Chi test and regression

    Chi square tests are usually quite weak in power, which could be why you dont detect a significant difference with the chi square test.

  3. The Following User Says Thank You to Englund For This Useful Post:

    Oli (07-25-2012)

  4. #3
    TS Contributor
    Points: 5,643, Level: 48
    Level completed: 47%, Points required for next Level: 107
    Karabiner's Avatar
    Location
    Schalke 04, Germany
    Posts
    856
    Thanks
    8
    Thanked 200 Times in 193 Posts

    Re: Chi test and regression

    I have to test whether there is a significant difference between two groups.
    Could you tell a bit more? Background, objective of the study? At least sample sizes, and description of the dependent variable?

    Kind regards

    K.

  5. The Following User Says Thank You to Karabiner For This Useful Post:

    Oli (07-25-2012)

  6. #4
    Points: 42, Level: 1
    Level completed: 84%, Points required for next Level: 8

    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Chi test and regression

    In my study I would like to show that a different type of incentive(cash vs lottery) does not have an influence on the amount of correct answers. One group has 105 participants the other group has 97.
    the chi test that I have done looked like this: chisq.test(correctanswers, incentivetype) in r. Incentive type was 0 for Lottery and 1 for cash.
    the regression Ive made looked like this:lm(formula=correctanswers~incentivetype+age+gender+...)
    Did I make a mistake?

  7. #5
    Points: 1,639, Level: 23
    Level completed: 39%, Points required for next Level: 61

    Location
    Sweden
    Posts
    200
    Thanks
    11
    Thanked 45 Times in 41 Posts

    Re: Chi test and regression

    I'm not that in to R. But it looks like you haven't really tested the same thing with the chi square test and the regression. When doing the regression you're testing whether incentivetype has an effect on number of correct answers while controlling for the other variables, such as age, gender and so on. However, the regression would be, according to me, a better test in this case since the chi square test doesn't take the other IV´s into account.

  8. The Following User Says Thank You to Englund For This Useful Post:

    Oli (07-25-2012)

  9. #6
    Points: 42, Level: 1
    Level completed: 84%, Points required for next Level: 8

    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Chi test and regression

    And how do I interpret the low r squared? Its only about 5% for the incentivetype variable and just about 17% for the whole regression. I thought this means that only 5% can be explained by the variable incentivetype which would not be that much.

  10. #7
    Points: 1,639, Level: 23
    Level completed: 39%, Points required for next Level: 61

    Location
    Sweden
    Posts
    200
    Thanks
    11
    Thanked 45 Times in 41 Posts

    Re: Chi test and regression

    Yes, that is a good question. Something can be statistically significant, whilst not practically significant. For example, lets say that we find that 45 percent of women like Coca Cola and 44 percent of men do, and lets say that we had a really big sample which caused the results to be significant. Despite the statistically significant results, we'd draw the conclusion that the results are not of practical importance.

    It's a difficult case you've got there. I guess you'll have to argue logically which test/tests you should use. Have you done a t-test to compare the means between the groups?

  11. #8
    Points: 42, Level: 1
    Level completed: 84%, Points required for next Level: 8

    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Chi test and regression

    Thanks for your inputs!

    I thought the t-test is only applicable if there is a normal distribution of the sample given which isnt the case with my data. Or can I do an other test like the t-test?
    Do I get this right:
    The Chi- test results should not be false but they might be not very meaningful.

  12. #9
    Test of Gnomality
    Points: 8,332, Level: 61
    Level completed: 61%, Points required for next Level: 118
    hlsmith's Avatar
    Posts
    1,526
    Thanks
    99
    Thanked 256 Times in 249 Posts

    Re: Chi test and regression

    If you have not done the following, it may be of interest. Perform your chi-square then run a simple logistic regression with only the same dependent and independent variable. Then run different combinations of dependent plus two independent variables in the chi-square test using Breslow-Day test, then repeat same procedures with logistic regression. You may also get a better understanding of your data if you calculate either the RR or OR when performing these tasks. In the end you may understand how the controlling or stratifying of the data changes the significance and the different associations, perhaps also placing these values in a table to better compare.

  13. #10
    Points: 42, Level: 1
    Level completed: 84%, Points required for next Level: 8

    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Chi test and regression

    Thanks I will get some information about how to do such a test.
    I have done a ks test as well to see whether the two samples(cash vs. lottery) have the same distribution. Ive got a large p-value which indicates that there are no differences. Is this something that I could use or isnt it appropriate for my study?

  14. #11
    Test of Gnomality
    Points: 8,332, Level: 61
    Level completed: 61%, Points required for next Level: 118
    hlsmith's Avatar
    Posts
    1,526
    Thanks
    99
    Thanked 256 Times in 249 Posts

    Re: Chi test and regression

    I am not completely sure the objectives and overall purpose of your project, so I cannot answer your question. Though, I think this previous conversation (see below) could be beneficial.

    http://www.talkstats.com/showthread....v-smirnov-test

  15. #12
    Points: 42, Level: 1
    Level completed: 84%, Points required for next Level: 8

    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Chi test and regression

    I have made several regressions with different variables. For instance:
    correctanswers~incentivetype+gender
    correctanswers~incentivetype+age+gender
    correctsanswers~incentivetype+gender+I(incentivetype*gender)
    etc.
    But I dont really know how I should do it. The r2 never exceeded 0.2. And I find it a bit strange that in some cases the p-value for incentivetype is lower than 0.05 and in some cases higher. What do I have to consider while doing a regression? When is it appropriate to use something like that: I(incentivetype*gender)

  16. #13
    Test of Gnomality
    Points: 8,332, Level: 61
    Level completed: 61%, Points required for next Level: 118
    hlsmith's Avatar
    Posts
    1,526
    Thanks
    99
    Thanked 256 Times in 249 Posts

    Re: Chi test and regression

    If "I(incentivetype*gender)" is your interaction term, you should always examine for effect modification between IV. It is up to you whether you keep it in the model, this decision if typically based on its significance (p-value). In general if you are using a effect or p-value cut-off for your IV, you may also use this for the interaction term if it seems feasible. But much is situation based.

  17. #14
    Points: 1,639, Level: 23
    Level completed: 39%, Points required for next Level: 61

    Location
    Sweden
    Posts
    200
    Thanks
    11
    Thanked 45 Times in 41 Posts

    Re: Chi test and regression

    Quote Originally Posted by Oli View Post
    I thought the t-test is only applicable if there is a normal distribution of the sample given which isnt the case with my data.
    Sorry for a very late response. Yes, that is true. But you can transform your data by taking the natural logaritm or the square root of it (if it is only positive values). Often it is possible to transform the data so that it gets approximately normally distributed

  18. #15
    RotParaTon
    Points: 46,233, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Discussion EnderPosting AwardFrequent PosterCommunity AwardMaster Tagger
    Dason's Avatar
    Location
    Ames, IA
    Posts
    9,077
    Thanks
    211
    Thanked 1,607 Times in 1,377 Posts

    Re: Chi test and regression


    Quote Originally Posted by Englund View Post
    Sorry for a very late response. Yes, that is true. But you can transform your data by taking the natural logaritm or the square root of it (if it is only positive values). Often it is possible to transform the data so that it gets approximately normally distributed
    For small samples we require the data in each group to be normally distributed. For large sample sizes it really doesn't matter. What we really want is the sampling distribution of the sample mean to be approximately normally distributed. With a large enough sample size then this happens due to the central limit theorem.

    I'm not a fan of transforming the data just so you get a normal distribution.
    "His programming is malfunctioning. It begins! Get your weapons, he's going to become a killbot!!!" - bryangoodrich

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats