Statalist


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

st: RE: tsset


From   "Jeff" <[email protected]>
To   <[email protected]>
Subject   st: RE: tsset
Date   Sat, 16 Jan 2010 16:57:57 -0800

Martin,

Thank you.  Your syntax worked up to a point.  I was able to code the
salemonth to its proper monthly date, i.e., 1=April 2005, etc.  However,
as you noted, I was not able to tsset the data after that.

My end goals was to produce a corrgram and ACF graph of the saleprice
data, however, after I set the data to your suggested syntax and then
trying to get a corrgram using:
Corrgram saleprice, lags(15)

I get the error message:

time variable not set, use -tsset varname ...-

Then when I try to tsset month (or salemonth)
I get the error message:

repeated time values in sample

Thus I am unable to generate either a corrgram or an ACF graph.

Any suggestions to get to my end goal of corrgram or ACF graph would be
appreciated.  Thank you in advance.

Jeffrey B. Wolpin
 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Saturday, January 16, 2010 1:46 PM
To: [email protected]
Subject: st: RE: RE: RE: tsset


<>

Note that my code does not furnish a solution to the problem of
"repeated
time values in sample", which Stata will complain about in response to
the
command

*******
tsset month, monthly
*******

following my code. This problem is one of your data, and only you can
solve
it - probably by not -tsset-ing your data...

HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Samstag, 16. Januar 2010 22:41
To: [email protected]
Subject: st: RE: RE: tsset


<>

*******
clear*

inp byte(salemonth)	saleprice
1	980000
2	575000
2	439000
3	1300000
3	850000
3	841000
3	350000
4	1280000
4	897000
4	470000
5	515000
6	615000
8	1000000
8	430000
10	2000000
10	850000
12	1200000
13	1200000
13	780000
14	1700000
15	1500000
16	1500000
16	989000
17	800000
18	1100000
19	1920000
20	1100000
20	950000

end

compress
list, noo

gen month= mofd(date("1/3/2005", "DMY"))+ salemonth
format month %tmMonth_CCYY
l
*******


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jeff
Sent: Samstag, 16. Januar 2010 22:34
To: [email protected]
Subject: st: RE: tsset

I'm a relatively new user of STATA.  The following partial array of
numbers represents the Month of Sale (Salemonth) and Sale Price
(saleprice) of various real properties.  I wish to tsset the "salemonth"
so that #1 corresponds to April 2005, #2 corresponds to May 2005, etc.
Notice, however, that some months repeat themselves.  In other words, in
some months there are more than one transaction (Saleprice).

I've tried the following which does not work because it advances each
month by one, and does not recognize that some months can have multiple
sale price transactions.

Generate month = ym(2005, 04)+_n-1
tsset month, monthly

Thank you in advance


salemonth	saleprice
1	980000
2	575000
2	439000
3	1300000
3	850000
3	841000
3	350000
4	1280000
4	897000
4	470000
5	515000
6	615000
8	1000000
8	430000
10	2000000
10	850000
12	1200000
13	1200000
13	780000
14	1700000
15	1500000
16	1500000
16	989000
17	800000
18	1100000
19	1920000
20	1100000
20	950000

Jeffrey B. Wolpin

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

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index