Announcement

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

  • chi2 with string variables - combing into larger variable

    Hello,

    I've been asked to combine sub-variables (which are stored as string variables) into a larger variable called "increasingconfidence" (a combination of all sub-vars). I will be running a chi2.


    Click image for larger version

Name:	Screenshot string variables.png
Views:	1
Size:	16.7 KB
ID:	1711617


    As of now, I have recoded the string variables as numbers in the new larger category.

    Ex: recode increasingconfidence (.=0) if ic_instructoridentity=="ic_instructoridentity"

    The issue (possibly) is when I combine the string variables into one category, I am losing values because stata is only counting them once (to my understanding).

    1. Is this an issue that I am losing values ?
    2. I am trying to create a larger variable as a string, but in actuality its being stored as numeric. Is this an issue? Is this perhaps where encode would be handy?

    Thank you for your help!

  • #2
    From looking more into this problem, chi2 requires independence, meaning that the fact that there are multiple entries per participant (in various columns) means that running a chi2 is inappropriate.

    Would someone recommend another stats test that would be more appropriate?

    Thank you in advance!

    Comment

    Working...
    X