Announcement

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

  • balancing tests after collapse command.

    Hello, I wanna do balancing test between 2 different groups. but in my case, after i collapsed my variables, i'm running the tests but giving me error about "more than 2 groups found, only 2 allowed" because I'm also using if commang while usong ttwst command. How can I solve this problem.
    Attached Files

  • #2
    Plus, when reduce my groups, i have this error
    Attached Files

    Comment


    • #3
      What is the output of

      Code:
      tab treatment if sending_week == 1, missing

      Comment


      • #4
        here it is, total observation must be 1329 but here is 665? Am I missing something?

        HTML Code:
        collapse (mean) ID_numeric atleast1scanning_12h atleast1opening_12h scanning_12h_week opening_12h_week SR_waste_responsible SR_weekly_disposals_num stay_1_year_numeric compost_at_home nature_and_you_vignete_num years_group SR_morally SR_free_time SR_guilty SR_resp_others SR_annoyed SR_responible_self SR_kantian_1 SR_kantian_2 SR_ecologist sending_week SMS_received treatment POST, by(ID_num)
        this is the code I used before the ttest
        Attached Files

        Comment


        • #5
          Originally posted by Hemanshu Kumar View Post
          What is the output of

          Code:
          tab treatment if sending_week == 1, missing
          this is the code I used before the ttest:
          HTML Code:
            collapse (mean) ID_numeric atleast1scanning_12h atleast1opening_12h scanning_12h_week opening_12h_week SR_waste_responsible SR_weekly_disposals_num stay_1_year_numeric compost_at_home nature_and_you_vignete_num years_group SR_morally SR_free_time SR_guilty SR_resp_others SR_annoyed SR_responible_self SR_kantian_1 SR_kantian_2 SR_ecologist sending_week SMS_received treatment POST, by(ID_num)
          results not showing truth, obvervation must 1329 in total
          Attached Files

          Comment


          • #6
            You said you want to do a balance test between two different groups, but as you can see, your treatment defines three groups. If treatment == 0 represents your control group, balance tests will typically want to compare 1 with 0 and 2 with 0. To do the first, you would do

            Code:
            ttest atleast1scanning_12h if sending_week == 1 & inlist(treatment, 0, 1), by(treatment)
            and similarly for 2 vs. 0. To simultaneously check equality of means across all three groups, you would need an F-test; a t-test will not do it.

            Comment


            • #7
              Originally posted by Hemanshu Kumar View Post
              You said you want to do a balance test between two different groups, but as you can see, your treatment defines three groups. If treatment == 0 represents your control group, balance tests will typically want to compare 1 with 0 and 2 with 0. To do the first, you would do

              Code:
              ttest atleast1scanning_12h if sending_week == 1 & inlist(treatment, 0, 1), by(treatment)
              and similarly for 2 vs. 0. To simultaneously check equality of means across all three groups, you would need an F-test; a t-test will not do it.
              Hello Hemanshu, Can I have your contact mail/number?

              Comment

              Working...
              X