Welcome | State space notation | Functions | > ckal.fil.bin.beta.id |
Last update Apr 29, 2003 |
DESCRIPTION:Conjugated Kalman filter for binomial data assuming identity link and partially specified linear latent process. The conjugated prior on the probability parameter is beta. The specific model is
USAGE:ckal.fil.bin.beta.id(ssm)
REQUIRED ARGUMENTS:
OPTIONAL ARGUMENTS:The following attributes of the ssm object might be needed:
VALUE:Returns an object of class ssm with the same attributes as the object in the call, but with attribute filtered updated with:
SIDE EFFECTS:None
DETAILS:This is the conjugate filter introduced for the class of dynamic generalized linear models by West, Harrison and Migon (1985). Instead of approximating the observational model with a Gaussian one like in the extended Kalman filter, the latent process guides the choice of the conjugate prior on the natural parameter.
REFERENCES:Klein, (2003), State Space Models for Exponential Family Data, Ph.D. Thesis, Department of Statistics, University of Southern Denmark.West & Harrison, (1997), Bayesian Forecasting and Dynamic Models, Springer Series in Statistics. West, Harrison & Migon, (1985),Dynamic Generalized Linear Models and Bayesian Forecasting (with discussion), Journal of the American Statistical association, 80, 73-97. EXAMPLES:# Specify a state space model ss <- ssm(Ft = function(i,x,phi) {c(1,1)}, Gt = function(i,x,phi) {matrix(c(1,0,0,0),ncol=2,byrow=T)}, Wt = function(i,x,phi) {diag(2)/50}, m0 = c(5,0), C0 = diag(10,2), nt = rep(10,20), fam = "binomial", link = "identity") # Simulate observations ss <- simulate.ssm(ss, n=20) # Apply the conjugated Kalman filter ss <- ckal.fil.bin.beta.id(ss) # Make plots plot(apply(ss$filtered$mt,1,sum)/ss$nt, ylab="mean", lty=1, type="l", ylim=c(0,1)) lines(ss$simulated$lambda/ss$nt, lty=2) points(ss$Yt/ss$nt, pch=16) legend(1,1,legend=c("Filtered signal", "Simulated signal","Yt"), lty=c(1,2,-1), marks=c(-1,-1,16)) title("Results from ckal.fil.beta.bin.id") |