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: rollreg


From   Joe Canner <jcanner1@jhmi.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: rollreg
Date   Mon, 16 Dec 2013 17:48:52 +0000

Tim,

I agree; take a look at these statements in particular:

local m "`r(rolloption)'(`r(rollobs)')"
graph combine `all', ti("`m' coefficient of `dv' on `wantcoef'") ///
saving("`wantcoef'.gph",replace)

The single quotes that look like French acute accents should be replaced with single quotes that go straight up and down (usually the apostrophe key which is shared with double quotes, next to the Enter key).

Regards,
Joe Canner
Johns Hopkins University School of Medicine

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Monday, December 16, 2013 12:33 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: rollreg

You are mixing different quote characters. Using -asciiplot- from SSC, or otherwise, know that you should be using  char(39) consistently for right quotes, but some look like char(146) to me.

Nick
njcoxstata@gmail.com


On 16 December 2013 17:17, Timothy King <T.P.King@leeds.ac.uk> wrote:
> Dear Statalist,
>
> I am trying to run a rollreg example that performs a rolling regression for each company but get the error message:
>
> 'too few quotes'. I can't spot the source.
>
> The code is as follows:
>
> * rollreg by firm
> set more off
> webuse invest2, clear
> tsset company time
> rollreg market L(0/1).invest time, move(8) stub(mktM) local dv 
> `r(depvar)'
> local rl `r(reglist)'
> local stub `r(stub)'
> local wantcoef invest
> local m "`r(rolloption)'(`r(rollobs)')"
> forv i=1/4 {
> qui reg `dv' `rl' if company==`i'
> local cinv = _b[`wantcoef']
> tsline `stub'_`wantcoef' if company==`i' & `stub'_`wantcoef'<., /// 
> ti("company `i'") yli(`cinv') yti("moving beta") /// name(comp 
> `i',replace) nodraw local all "`all' comp`i'"
> }
> graph combine `all', ti("`m' coefficient of `dv' on `wantcoef'") ///
> ysize(4) xsize(4) col(2) ///
> t1("Full-sample coefficient displayed") 
> saving("`wantcoef'.gph",replace)
>
> Thank you in advance,
>
> Tim
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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