0

I have a time series of binomial data $y_i$ with a time dependent $p(t)$. The data is generated iteratively, hence $t \in 1,...,T$. Any suggestions on how to estimate $p(t)$? I feel that the naive approach would be to use some sort of smoothing method (e.g. smoothing splines) to the raw data, but this allows for $p(t)$ outside the [0,1] interval.

Note that $p(t)$ seem to have some periodicity so a logistic model would not be suitable. The periodicity is not regular though, so I don't think incorporating some sort of Fourier analysis would work.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
esten
  • 43
  • 3
  • Why logistic regression does not catch the variability? – Tim Dec 06 '17 at 18:21
  • You might want to try `gam` from the R package mgcv; it allows you to use splines on the parameters of a logistic regression (among other things), in this case your model would look like `y~s(t), family="binomial"`, for example, and you'd recover an appropriate estimate of $p(t)$ from the procedure. – jbowman Dec 06 '17 at 18:23
  • @Tim, there is some periodicity in the data. However it's not regular so I don't think incorporating Fourier analysis would be suitable. Updated the question now. – esten Dec 06 '17 at 18:33
  • You could use [periodic splines](https://stats.stackexchange.com/questions/225729/what-are-periodic-version-of-splines), see also [this](https://stats.stackexchange.com/questions/225653/periodic-splines-to-fit-periodic-data). There is even an R package `pbs`. – kjetil b halvorsen Dec 29 '18 at 15:32

0 Answers0