Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Too few quotes error


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Too few quotes error
Date   Mon, 28 Mar 2011 21:53:29 +0100

Looks OK quotequotawise. 

But if you did this before, made some mistake, and then corrected, your local macro `rn' might have a lot of stuff in it left over like dirt on a shoe. 

So try once more but first go 

local rn 

to clear that macro. 

Nick 
[email protected] 

Michael C. Morrison

This is probably a question for Kit Baum, although I'm sure others could 
handle it. I'm trying to duplicate his efficient (and greatly 
appreciated) code found in "/Stata tip 88: Efficiently evaluating 
elasticities with the margins command"/, The Stata Journal (2010), 10, 
Number 2, pp. 309-312 . When I run this code

// calculate elasticities at deciles over full sample:
forvalues i=10(10)90 {
quietly margins, eyex(_all) at((p`i´) _all)
local rn "`rn´ p`i´"
matrix nu = nullmat(nu) \ r(b)
}
matrix rownames nu = `rn´
matrix list nu, format(%6.3f) ti("Elasticities")

I receive the following error "too few quotes" right after }

What am I missing?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index