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
Principal factor (factor, pf): What if the proportion of variance accounted for by the factors is greater than 1.00 (greater than 100%)?Hello, I ran factor analysis(factor, pf) in Stata to develop factor scores for my latent variables. …
Help with replacing values of variable with conditionsDear Stata users, I want to replace the values of variable with conditions. This is the example of …
Help with re-formatting a dataset for choice modelling? (EDITED)Hi folks. I have data on public beach visitation by zipcode. For each zip, I have a list of sites wh…
Weighted database regression analysesDear Stata List, I'm having trouble completing a weighted linear regression model using NHANES data…
Principal component analysis for alternative proxiesI have a panel data. There are three alternative proxies (i.e. IndVar1, IndVar2, IndVar3) that basic…
Subscribe to:
Post Comments (Atom)
0 Response to Collapsing data by both weighted and unweighted means
Post a Comment