-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request - greshape wide - separate #69
Comments
So, th behavior of separate in general seems to me quite different to reshape. You just mean the part where it appends to the variable label a note saying "variable = value"? |
Yes, that is correct. I want to be able to greshape wide and set new variable labels from original string values. |
Features - In `gregress` (including `givregress` and `gpoisson`) collinear columns are now dropped (LDL' decomposition). - `gegen shift, shiftby(#)` and `gstats transform (shift #)` are available to compute lags (negative `#`) and leds (positive `#`). - Adds `gini`, `gini dropneg`, `gini keepneg` to `gcollapse`, `gegen`, and `gstats tab`. - Adds `cumsum`, `cumsum +/-`, and `cumsum +/- varname` to `gstats transform`; options can also be passed to `cumsum` globally via `cumby()` - Closes #69. `greshape wide/spread` now allows `labelformat()` for custom variable labels (only when a single variable is passed to `key()/j()`). The default is `#keyvalue# #stublabel#`. Available placeholders are `#stubname#`, `#stublabel#`, `#keyname#`, `#keylabel#`, `#keyvalue#`, and `#keyvaluelabel#` Enhancements - Closes #68. `gegen` now allows `by:` prefix when calling a `gstats transform` function (this is only allowed because these calls already require single-variable input, so the `by:` prefix should not present an issue when calling the function). - In `givgregress` - Values to missing if model is not identified (not enough instruments). - `hdfe` no longer saves projected vars. - Collinearity and singularity checks in regression models - Removed rowmajor option from `gregress` Bug Fixes - In `gquantiles`, data was read incorrectly with `by()` and `weights` if `xtile` was not requested. In particular, the data was copied as if the target had only one column, but since weights need to be included, the target has two columns. This was fixed. - Fixes bug in `greshape, dropmiss` where if the number of remaining observations is lower than the observations in memory, `set obs` would be run, resulting in an error. Now `keep in` is run for that case.
This is now available. To imitate sysuse auto, clear
local labelformat labelformat(#stubname#, #keyname# == #keyvaluelabel#)
greshape wide mpg, by(make) key(foreign) `labelformat'
desc mpg* However, you can use any combination of placeholders. For instance,
Placeholders available are |
Hi
There is a very slow command in Stata named "separate". What is does is creating new variables containing values from varname.
It would be great to have a similar option for greshape wide , separate that does the same thing, i.e. when reshaping to wide also taking the string value from previous variable and making in the variable label of the new variables in question.
Is that possible?
P.S. Note that some string [aliases] may contain leading or trailing blanks, which would require trimming the string before making the new variable labels for wide-reshaped ones.
Regards
The text was updated successfully, but these errors were encountered: