View source: R/gets-logitx-source.R
logitxSim | R Documentation |
Simulate from a dynamic Autoregressive (AR) logit model with covariates ('X'). This model is essentially a logit-version of the model of Kauppi and Saikkonen (2008).
logitxSim(n, intercept = 0, ar = NULL, xreg = NULL, verbose = FALSE,
as.zoo = TRUE)
dlogitxSim(n, ...)
n |
integer, the number of observations to generate |
intercept |
numeric, the value of the intercept in the logit specification |
ar |
|
xreg |
|
verbose |
|
as.zoo |
|
... |
arguments passed on to |
No details, for the moment.
A vector or matrix, depending on whether verbose
is FALSE
or TRUE
, of class zoo
, depending on whether as.zoo
is TRUE
or FALSE
Genaro Sucarrat, http://www.sucarrat.net/
Heikki Kauppi and Penti Saikkonen (2008): 'Predicting U.S. Recessions with Dynamic Binary Response Models'. The Review of Economic Statistics 90, pp. 777-791
logitx
##simulate from ar(1):
set.seed(123) #for reproducibility
y <- logitxSim(100, ar=0.3)
##more output (value, probability, logit):
set.seed(123) #for reproducibility
y <- logitxSim(100, ar=0.3, verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.