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: How can I fill in missing values for the month or quarter in this
From
Aaron Kirkman <[email protected]>
To
[email protected]
Subject
Re: st: How can I fill in missing values for the month or quarter in this
Date
Wed, 14 Nov 2012 14:44:35 -0600
Hi Kit,
I thought there must be a way to fill in this data with -tsset- and
-tsfill- but I wasn't sure how. Thank you for pointing me towards the
right commands.
Aaron
On Wed, Nov 14, 2012 at 2:02 PM, Christopher Baum <[email protected]> wrote:
> <>
> clear all
> input year str8 state quarter expenditure
> 1998 Illinois 1 1000
> 1998 Illinois 3 3000
> 1998 Illinois 4 4000
> 1998 Illinois 2 2000
> 2000 Illinois 1 5000
> 2000 Illinois 4 11000
> 2000 Illinois 2 6000
> 2000 Illinois 3 8000
> 2001 Illinois 2 1575
> 2002 Illinois 4 5600
> 1998 Missouri 3 2100
> 1998 Missouri 4 2100
> 1998 Missouri 1 1900
> 1998 Missouri 2 1900
> 2000 Missouri 1 8500
> 2001 Missouri 1 8000
> 2001 Missouri 2 9800
> 2001 Missouri 3 7500
> 2001 Missouri 4 1800
> 2002 Missouri 3 1400
> end
> g yq = yq(year, quarter)
> encode state, gen(stateid)
> tsset stateid yq, quarterly
> tsfill
> l
>
> Kit Baum | Boston College Economics and DIW Berlin | http://ideas.repec.org/e/pba1.html
> An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
> An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
>
>
> *
> * 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/