Dear Stata-users,
I'm composing a demand elasticity model based on Poi's (2012) command: quaids.
For simplicity, I'll demonstrate my problem using the food.dta example file.
Code:
webuse food
generate nkids = int(runiform()*4)
generate rural = (runiform() >0.7)
*installing quaids.ado
help st0268_1
quaids w1-w4, anot(10) prices (p1-p4) expenditure(expfd) demographics (nkids rural) nolog level(95)
estat expenditure, atmeans stderrs
matrix elas =r(expelas)
matrix list elas
matrix list r(sd)
matrix list e(V)
*elasticities are saved as a vector under r(uncompelas)
estat uncompensated, atmeans stderrs
matrix uncompelas = r(uncompelas)
matrix list uncompelas
matrix list r(sd)
->now my aim is to obtain the elasticity tables with asterisks (*) based on the p-values (.05 .01 .001)
-> here I use the estout package
*approach 1
* install needed package:
ssc install estout, replace
estimates store uncompelas
estout uncompelas, cells(sham(star))
-> I also tried different approaches:
*approach 2
estimates table, star(.05 .01 .001)
*trying another version: parmest
ssc describe parmest
ssc install parmest
help parmest
*elasticities are saved as a vector under r(uncompelas)
estat compensated, atmeans stderrs
matrix compelas = r(compelas)
matrix list compelas
matrix list r(sd)
*approach 3
parmest, list(,) stars(0.05 0.01 0.001) // only works for parameter table not for matrix
-> instead of putting asterisks on the elasticity tables, they are applied on the parameter table (computed through the quaids command) in all the three approaches
How can I direct Stata to place the * on the price elasticity tables?
Any help is appreciated!
Best,
Henni
Related Posts with P-value based significance asterisks in price elasticity table in QUAIDS (Poi, 2012) model
Local and global macro are not capturing variables' names but the values in the first rowDear all, I have a problem when using the local and global macro. When I set up a local macro base…
Nested Variables in glmI am trying to use nested variables in glm because I have a non-normal dependent variable potentiall…
clustering and concentration Stata code Hi everyone, I am in the process of writing one of my dissertation chapters. Using US Census and A…
Foreach Loop to Rename VariableDear all, I was trying to use foreach loop to rename variables, I wanted to names of the variables …
extract yearDear All, How can I extract year (Stata format) from the following variable? Code: * Example genera…
Subscribe to:
Post Comments (Atom)
0 Response to P-value based significance asterisks in price elasticity table in QUAIDS (Poi, 2012) model
Post a Comment