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
Problems with controls and fixed effects in DIDHi, I'm currently using triple difference to analyse the effect of minimum marriage age legislation…
SEM - insignificant direct path vs. significant indirect pathsDear Forum, I am conducting SEM analysis in Stata and I have specified a well-fitting measurement m…
Two part model with instrumental variableHi: I am using a two part model with a binary dependent variable and a binary endogenous regressor.…
Stratified Wilcoxon Mann Whitney Generalised Odds Ratios for Repeated Measures DataDear Statalist, Hope you're all well. I have a dataset with repeated measures of the modified Rank…
Practicum due soon/autocorrelation unbalanced panel data: xtreg, cluster, xtregar, xtpcse??Hi all! I am struggling a bit to figure out which is the best command to use for OLS on unbalanced …
Subscribe to:
Post Comments (Atom)
0 Response to Collapsing data by both weighted and unweighted means
Post a Comment