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]

Re: st: RE: Too few quotes error


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: RE: Too few quotes error
Date   Mon, 28 Mar 2011 18:45:03 -0400

Michael, you have a slanted quote to the right of "i". It should be straight: p`i'

Steve
[email protected]

On Mar 28, 2011, at 6:11 PM, Michael C. Morrison wrote:

Thanks for replying NIck.  I tried the clearing suggestion but I receive the same error per the following:

. local rn

. do "C:\Users\Mike\AppData\Local\Temp\STD00000000.tmp"

. // calculate elasticities at deciles over full sample:
. forvalues i=10(10)90 {
 2. quietly margins, eyex(_all) at((p`i´) _all)
 3. local rn "`rn´ p`i´"
 4. matrix nu = nullmat(nu) \ r(b)
 5. }
too few quotes
r(132);

end of do-file

I set trace on and it gives me this:

 - version 11
   - .cmdline = `"`e(cmdline)'"'
   = .cmdline = `"regress gaspc  Income Gasp PNC PUC PPT PD PN PS"'
   - .ZERO = `"`0'"'
   = .ZERO = `", eyex(_all) at((p
too few quotes


Any help would be appreciated.


Mike


On 3/28/2011 3:53 PM, Nick Cox wrote:
> 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/
> 
> 
>   

*
*   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/


*
*   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