Announcement

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

  • weighted SMD for categorical variables

    I would like to calculate the standardized mean differences (SMDs) for categorical variables using weights. I found the package -stddiff- which calculates SMDs for categorical variables, but it doesn't accept weights, and it looks like a non-trivial revision to incorporate weights. Before I try to write my own version, Is there an existing package or Stata command that will calculate SMDs (or Cohen's d) for categorical variables using weights?

    thanks,
    Jeph

  • #2
    I don't know of any specifically for categorical variables but in some circumstances you could use -pbalchk- (net from http://personalpages.manchester.ac.uk/staff/mark.lunt) or -covbal- (SSC); each takes weights

    where did you find -stddiff- which -search- does not find?

    Comment


    • #3
      Thanks for the reply ; apologies for not providing a source, it's on RePEc : https://econpapers.repec.org/softwar...de/s458275.htm

      I'll check put -covbal- and -pbalchk-.

      Comment


      • #4
        thank you

        Comment


        • #5
          Just to followup - neither -pbalchk- nor -covbal- calculate the overall SMD for categorical variables; in the end I revised -stddiff- to take weights and validated the results against R's -svyCreateTableOne- output. I'm not sure what the etiquette is on sharing hacked versions of other people's code, but if someone is interested message me directly and I'll ponder the question then.

          cheers,
          Jeph

          Comment


          • #6
            Hi Jeph,

            I have the same question about calculating the SMD with weights. I notice that you mentioned that you revised -stddiff- to take weights. Can you please share the code with me? The covariate list contains both catogorical and continuous variables. I appreciate your help!

            Best,
            Huiying

            Comment


            • #7
              Huiying Wang Send me a private message with your email address and I will share the code with you.

              Comment


              • #8
                Hi Jeph

                I have also been looking for a solution to this problem and would be very grateful for your code!

                I've sent you a private message.

                Many thanks

                Rhys

                Comment


                • #9
                  Hi Jeph and Statalist,
                  I'm also looking for a solution to this problem. If anyone has suggestions that would be most appreciated! Jeph Herrin
                  Kind regards,
                  Ben

                  Comment


                  • #10
                    Hi all,
                    Does anyone have the modified stddiff code that Jeph Herrin wrote for incorporating weights? If you'd be willing to pass it along, I would greatly appreciate it. Ben Lazrus Rhys Davies Huiying Wang
                    Thank you,
                    Sarah

                    Comment


                    • #11
                      Hi all,
                      I am also interested in learning about the modified stddiff code. I would really appreciate it if anyone has suggestions or could share the code. Sarah Seelye Ben Lazrus Rhys Davies Huiying Wang Jeph Herrin
                      Many thanks,
                      Chaitra

                      Comment


                      • #12
                        Originally posted by Chaitra Srinivas View Post
                        Hi all,
                        I am also interested in learning about the modified stddiff code. I would really appreciate it if anyone has suggestions or could share the code. Sarah Seelye Ben Lazrus Rhys Davies Huiying Wang Jeph Herrin
                        Many thanks,
                        Chaitra
                        I also have this problem and would love to learn of a solution!

                        Comment


                        • #13
                          Hi all,

                          Jeph was great about sharing his code with me. Unfortunately, it does not work with probability weights, but does work with analytical weights. I continue my search for a solution for probability weighted data!

                          Comment


                          • #14

                            Dear All,

                            I would really appreciate if anyone could share the modifed stddiff code with me.
                            Sean Hardiman Jeph Herrin Sarah Seelye Ben Lazrus Rhys Davies Huiying Wang Chaitra Srinivas

                            Much thanks,
                            Atika

                            Comment


                            • #15
                              Hi all,

                              I have the same need as others and would appreciate if someone could share the modified stddiff code with me.

                              Thanks

                              Jeph Herrin Huiying Wang Sean Hardiman Sarah Seelye Ben Lazrus Rhys Davies Chaitra Srinivas

                              Comment

                              Working...
                              X