Announcement

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

  • Entering specific weights for each strata

    Hello everyone,

    I am looking for a way to enter weights into STATA. For a project I created four special types of weights to compensate for my stratificated sample design. I will compute than manually, but I haven't found a way yet to tell STATA that it shall weight one strata with that number and the other strata with another number and so on.

    Does anyone have an idea how this could work?

    Thank you very much,
    Aileen

  • #2
    Welcome to Statalist, Aileen! You will need the svyset command.

    Please describe the study design, including all the stages of sampling, and tell us how you computed the weights.. Also, what is the goal of the study?

    In ffuture posts, be sure to follow the directions in FAQ 12. Finally, it's "Stata" not "STATA" ( FAQ 18.).
    Last edited by Steve Samuels; 22 Mar 2016, 11:16.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Hallo Steve,

      Thank you for your reply!

      The aim of my study is to compare different weights I have created and see which one gets the best result in different situations.
      To examinate this, I have chosen a population including 12000 firms, which are divided into the 4 stratas, which are depending on the two branch typs and the amount of employees (small or big company). I call this stratas 11,12,21 and 22, where 1 and 2 name the typs of branch and amount of employees.

      To explain how I computet the 4 weighting types would take a little to long. But I allready decided to generate a new variable called "weight" where I can enter the specific weight for each strata.

      But I am still struggling a little, because I am quite insecure about which weighting type a shall choose now. Just to make sure that you understand exactly what I want: I have allready computed the weights I need, so the variable "weight" contains nothing but the factor, with which I would like to multiply for example the profit of each Company in one stata, to get a result for the entire sample which is as accurat as possible.
      I know that I can choose between 4 weighting typs within STATA, but I don't know which one to choose. And what would be the commands for it than?

      Thanks a lot for your effort!
      Aileen

      Comment


      • #4
        Here are the commands I currently use to run my Analysis:

        sample 6.25 if Typ==11
        sample 4 if Typ==12
        sample 50 if Typ ==21
        sample 42.5 if Typ==22

        gen weight = 1.333 if Typ==11
        replace weight = 2.083 if Typ==12
        replace weight = 0.167 if Typ==21
        replace weight = 0.196 if Typ==22

        svyset Gewinn, strata(Typ) weight(weight) vce(linearized) singleunit(missing)

        svy: mean Gewinn


        Comment


        • #5
          I have now seen a relevant question that you should have referred to: http://www.statalist.org/forums/foru...atified-sample.

          I'll answer your question there. The brief answer here is that your svyset is substuting a mixing up post-calibration and sampling weightds.

          I referred to FAQs 12 and 18. FAQ 12 asks that you put code and results betwen CODE delimiters. FAQ 18 asks that you spell "Stata" correctly.
          Last edited by Steve Samuels; 23 Mar 2016, 07:45.
          Steve Samuels
          Statistical Consulting
          [email protected]

          Stata 14.2

          Comment


          • #6
            Hello Steve,

            Thank you very much for all your effort. And I am sorry that I misspelled Stata, it will not happen again!

            I will try out the callibration immidiately!

            Have a great day,
            Aileen

            Comment


            • #7
              Pedantry corner, again (I wrote that #18): for your papers and presentations, it is each stratum, other strata; one stratum, two or more strata.

              Comment


              • #8
                Consider this thread closed and direct all further comments to a parallel thread started by the poster (the source of the mysterious reference to "calibration").
                Last edited by Steve Samuels; 30 Mar 2016, 16:08.
                Steve Samuels
                Statistical Consulting
                [email protected]

                Stata 14.2

                Comment

                Working...
                X