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: Synth - Quarterly Data
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Synth - Quarterly Data
Date
Fri, 28 Mar 2014 11:14:28 +0000
Dimitry answered your question, although cleverly. If you feed
trperiod(2007q1)
you get an error as reported, but if you feed
trperiod(`=tq(2007q1)')
Stata will calculate -tq(2007q1)- on the fly. -synth- will see (in this case)
trperiod(188)
and should be happy. You get the best of both worlds. Start at -help
macro- and read about expansion operators such as `= '.
Nick
[email protected]
On 28 March 2014 10:58, Fonseca-Ferreira,V (pgt)
<[email protected]> wrote:
> Yes, the numeric list is indeed my problem.
> Maybe if I regenerate the quarterly data (gen date = quarterly (time, "YQ")). But then they will report the results with time specified like "145- 276" with treatment period being "170".
> How could i make stata read my data as this but report 2007q1?
Dimitriy V. Masterov
> I am away from my computer so I cannot be 100% certain, but I believe
> this is because the syntax calls for a numeric list and you're using
> strings. Try doing something like `=tq(2007q1)'.
On Thu, Mar 27, 2014 at 2:04 PM, Fonseca-Ferreira,V (pgt)
>> I am studying counter factual GDP responses of the 2004 European Union entrants during the crisis in the absence of the Euro, and I intend to use the Synthetic Control Group Method from Alberto Abadie (synth command in stata).
>> I have been trying to run it with quarterly data,but Stata does not seem to be able to recognize it, even though it seems to understand that I am working with quarterly data, according to the tsset function:
>>
>> . tsset Country date
>> panel variable: Country (strongly balanced)
>> time variable: date, 1993q2 to 2013q4
>> delta: 1 quarter
>>
>> When I try to run :
>> synth ln_GDP ln_GDP_1 ln_C ln_I ln_GC ln_X ln_M , trunit(33) trperiod(2007q1)figure counit(6 16 21 22 28) xperiod(1995q2(1) 2006q4) mspeperiod(1995q2(1) 2006q4) resultsperiod(1995q2(1) 2013q3) nested keep(Slovenia)
>>
>> I get the error message "trperiod() invalid -- invalid number r(121);" where trperiod(2007q1) is the period the treatment "Euro" was introduced in Slovenia. I believe the problem lies in the "q" in "2007q1", and that this would also be a problem for xperiod; mspeperiod; and resultsperiod. Any ideas on how can I correct this?
*
* 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/