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
command pbalchk with fator variablesHello, I am trying t use the command pbalchk to examine the balance of covariates with ipw weights. …
Wonder how I should set my control and my treatment groups for a diff-in-diff regression?Hello! I'm looking to run my first diff-in-diff regression for my research project that talks about…
Criteria for xtregar or xtglsHi Dear, As xtregar and xtgls are recommended for the panel dimensions when T>N, what is the cri…
Error reshaping from wide to longI am getting an error message as 'variable id does not uniquely identify the observations' while res…
How to keep only the observations that are not repeated on a single string variable?Hello, I have a database that has repeated observations on a single variable. The problem is that t…
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