Dear Forum,
I have a variable, named "cbo02". I want to calculate the mean of the observations of this variable that are contained in other variable, "t". The "cbo02" variable has 51534752 observations and the "t" variable 132 because "t" is a category and I wanna see which of the "cbo02" observations are contained in "t" and make the mean of it.
cbo02 t
717020 214305
715210 214325
717020 214310
717020 214405
773125 214430
784205 214425
715525 214415
715210 214410
715525 214505
717020 142105
717020 214925
513205 214915
717020 214910
etc...
Thanks.
Related Posts with Mean of observations contained in other variable
Dummy variable in random effects panel regressionDear Statalist members, I found answers to many of my Stata- or statistics-related questions before …
Stata 17 neededDear all, First of all, I hope this post find you all fine. Second of all, I know that my request c…
Exclusions in a loopHi everyone, just upfront: I am pretty new to Stata so please excuse certain rookie mistakes that mi…
Fixing a sample so observations between specifications are the same to enable comparisonsIn my regressions, I add variables across five specifications in which the last contains all the var…
sample size calculation when there are three groups Hi, We are planning to conduct an RCT comparing nitroglycerine patches to decrease the failure rat…
Subscribe to:
Post Comments (Atom)
0 Response to Mean of observations contained in other variable
Post a Comment