I am a student and new to Stata. Any help is appreciated.
I have a data set with age and weight. I would like to return a table that tells me the number of instances for each age and the average of the weight. Can someone point me in the right direction?
I have tried egen avgwt = mean(avgwt), by(age) and then summarizing the info but it just shows me number of observations and mean, std dev, etc for all observations. I need the average weight by each age and number of instances to use for some other calcs.
Thank you!
Related Posts with Counting Instance of a variable and returning average
Stata command for S-shapes analogue to Utest command by Lind and MehlumDear Stata comunity, I was wondering whether there is any statistical test and command in Stata to …
DID model with multiple categoriesDear STATA experts, I am writing my thesis using firm-level panel data ranging from 2007 to 2016. H…
Panel data regression with T>NDear STATA users, I am writing my bachelor thesis and need to do some econometric research with sta…
dea and malmq: Data Envelopment Analysis and Malmquist Productivity AnalysisThe user-written dea command (for Data Envelopment Analysis) and malmq command (for Malmquist Produc…
Loop over a huge number of filesI am trying to loop over a large number of files (360,000 files) to convert them from .csv to .dta f…
Subscribe to:
Post Comments (Atom)
0 Response to Counting Instance of a variable and returning average
Post a Comment