Hello,
I have data on loans, one loan per observation, each with a zipcode and amount attached as variables .
1.I looking to get the number of observations/loans per zipcode (string) or zipnumber (same value but long).
So I'm looking to have 1 distinct zipcode as an observation and a number of loans for that zip code as a new variable value.
2. I looking to sum the "amount" variable for each zipcode into a new variable.
So I'm looking to get distinct zipcodes for each observation with an amount summed from the "amount" variable.
Thanks,
Tom
Related Posts with Creating number of obs and summing for new variable value
Using asdoc to report margins in nested tablesI am able to export my probit estimation results to MS Word in a nested table using asdoc, however, …
Reshaping data - variables to observationsI have a number of variables which I would like to convert into observations. The data is structured…
testing the assumptions for panel dataI have a similar question: I am evaluating the impact of options on the payout decision for firms i…
do loop in stataHi Friend, I have a dataset with 40 variables. I need to create a new variable which added a suffix…
Reshaping data with multiple observations per participantHi all! This is my first post here, and I am a complete Stata beginner, so please be patient. I have…
Subscribe to:
Post Comments (Atom)
0 Response to Creating number of obs and summing for new variable value
Post a Comment