I have a dataset of ~100K, and I'd like to collapse the data for variable Alpha into its mean, and variable Beta into a mean weighted by variable Weight. As far as I can tell, all means have to be entirely unweighted or entirely weighted by Weight. Is there any way to do both with one command?
My instinct is to collapse it unweighted, reload the data, and collapse it weighted, and then merge the two. That seems a little bulky, though. Thanks.
Related Posts with Collapsing data by both weighted and unweighted means
Help needed: Creating a panel data set with individuals within countriesHello, I am trying to create a panel data set, for individuals within European countries over the t…
Does using Discoll-Kraay standard errors correct heteroskedasticity and autocorrelation problem?Hello guys, I am running a fixed effect regression model. I have a problem of heteroskedasticity an…
Pesaran TestHi guys, I am running a fixed effects regression and wanted to test for cross-sectional dependence. …
Years are dropped when running a fixed effect regressionDear all, For my thesis, for which I have gathered panel data, I have to run a logit regression wit…
Mediation suregDear all, I am running the follwing STATA code from the example from this website: https://stats.id…
Subscribe to:
Post Comments (Atom)
0 Response to Collapsing data by both weighted and unweighted means
Post a Comment