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 r() with recodeI am trying to recode a variable using the values from the return list but from the error message I …
Obtaining relative excess risk due to interaction (RERI) with weighted dataHi all, I am familiar with using the ic command in STATA to obtain RERI. However, I need to obtain …
Calculation of frequency and ratiosHi Everyone, Bellow in the -dataex- example, I have a zipcode, date (month_year) and name of an ins…
command for conditional likelihood regression using timesseries dataDear mr/mrs, I am currently trying to make a regression in STATA using times-series data on GNP. I …
Problem with predicting survival probabilities from stpm2 model with TVC in external dataI have built a prognostic model using stpm2 which includes a tvc (all covariates in model are center…
Subscribe to:
Post Comments (Atom)
0 Response to Creating number of obs and summing for new variable value
Post a Comment