| ![](/includes/contimages/spacer.gif) |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Type Miismatch error after Encode in time series
I am getting a Type Mismatch error that I cannot solve despite spending a
lot of time reading various resources.
I obtained a data set with one field that was a string. I applied Encode to
change the string field (containing alpha characters) to a (general) numeric
field by doing the following:
encode custormername, gen(cust_id)
This is panel data so I defined the data set as time series with TSSET:
tsset cust_id week
The time series commands performed fine at that point such as ARIMA using
BYSORT cust_id, which successfully resulted the arima results by cust_id
over the entire data set such as:
bysort cust_id: arima saleamt, ar(1 52), if tin(2002w1, 2004w35)
However, I want to do TS commands for a specific cust_id and entered:
arima saleamt, ar(1 52), if cust_id=="XYZ COMPANY"
But I get the Type Mismatch r(109) error message, whcih I just cannot solve.
Any hekp is very appreciated. Thank you.
_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/