Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: moving average

From   Chip Hunter <[email protected]>
To   [email protected]
Subject   st: moving average
Date   Mon, 15 Mar 2004 16:57:06 -0600

I have what I thought was an unremarkable panel data set containing monthly performance data for 300 employees for 36 months. There is sporadic missing data and not everyone starts in month 1 or finishes in month 36.

I am having trouble using the " tssmooth ma " command. Specifically, if I type

tssmooth ma foo=performance, window (1 1 1)

then the result makes good sense.

But any use of lags or leads great than 1 results in the same error. For example

tssmooth ma foo=performance, window (2 1 2)

leads to the message
window( ) invalid -- invalid numlist has elements outside of allowed range .

The manual tells me that the first and third arguments can accept integer values ranging from 0 to one-half the number of observations in the sample. What's wrong here?

Chip Hunter

Chip Hunter
University of Wisconsin-Madison
School of Business
Management and Human Resources Dept.
4114 Grainger Hall
975 University Ave.
Madison, WI 53706

* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index