Setup initial file structure
This commit is contained in:
16
Modules/ado/personal/d/dege.ado
Normal file
16
Modules/ado/personal/d/dege.ado
Normal file
@ -0,0 +1,16 @@
|
||||
program define dege
|
||||
syntax anything [, i(string)]
|
||||
preserve
|
||||
if "`i'"=="" {
|
||||
local i ind
|
||||
}
|
||||
qui reshape long `anything',i(`i') j(item)
|
||||
qui rename `anything' response
|
||||
qui inspect item
|
||||
local nbvalues=r(N_unique)
|
||||
forvalues j=1/`nbvalues' {
|
||||
qui gen `anything'`j'=item==`j'
|
||||
qui replace `anything'`j'=-`anything'`j'
|
||||
}
|
||||
restore,not
|
||||
end
|
Reference in New Issue
Block a user