[R] Time Series Count Models
spencer.graves at pdf.com
Tue Jul 19 01:19:07 CEST 2005
We are leveraging too far on speculation, at least from what I can
see. PLEASE do read the posting guide!
"http://www.R-project.org/posting-guide.html". In particular, try the
simplest example you can find that illustrates your question, and
explain your concerns to us in terms of a short series of R commands and
the resulting output.
With counts, especially if there were only a few zeros, I'd start by
taking logarithms (after replacing 0's by something like 0.5 or by
adding something like 0.5 to avoid sending 0's to (-Inf)) and use "lme",
if that seemed appropriate. Then if I got drastically different answers
from other software, I would suspect a problem.
Other possibilities for count data are the following:
* "lmer" library(lme4) [see Douglas Bates. Fitting linear mixed
models in R. R News, 5(1):27-30, May 2005, www.r-project.org ->
Newsletter -> "Volume 5/1, May 2005: PDF".
* "glmmPQL" in library(MASS).
* "glmmML" in library(glmmML)
However, I don't know if any of these as the capability now to handle
short time series like you described.
You might also consider the IEKS package by Bjarke Mirner Klein
Brett Gordon wrote:
> Thanks for the suggestion. Is such a model appropriate for count data?
> The library you reference seems to just be form standard regressions
> (ie those with continuous dependent variables).
> On 7/16/05, Spencer Graves <spencer.graves at pdf.com> wrote:
>> Have you considered "lme" in library(nlme)? If you want to go this
>>route, I recommend Pinheiro and Bates (2000) Mixed-Effect Models in S
>>and S-Plus (Springer).
>> spencer graves
>>Brett Gordon wrote:
>>>I'm trying to model the entry of certain firms into a larger number of
>>>distinct markets over time. I have a short time series, but a large
>>>cross section (small T, big N).
>>>I have both time varying and non-time varying variables. Additionally,
>>>since I'm modeling entry of firms, it seems like the number of
>>>existing firms in the market at time t should depend on the number of
>>>firms at (t-1), so I would like to include the lagged cumulative count.
>>>My basic question is whether it is appropriate (in a statistical
>>>sense) to include both the time varying variables and the lagged
>>>cumulative count variable. The lagged count aside, I know there are
>>>standard extensions to count models to handle time series. However,
>>>I'm not sure if anything changes when lagged values of the cumulative
>>>dependent variable are added (i.e. are the regular standard errors
>>>correct, are estimates consistent, etc....).
>>>Can I still use one of the time series count models while including
>>>this lagged cumulative value?
>>>I would greatly appreciate it if anyone can direct me to relevant
>>>material on this. As a note, I have already looked at Cameron and
>>>R-help at stat.math.ethz.ch mailing list
>>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>Spencer Graves, PhD
>>Senior Development Engineer
>>PDF Solutions, Inc.
>>333 West San Carlos Street Suite 700
>>San Jose, CA 95110, USA
>>spencer.graves at pdf.com
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA
spencer.graves at pdf.com
More information about the R-help