garma(VGAM)
garma()所属R语言包:VGAM
GARMA (Generalized Autoregressive Moving-Average) Models
GARMA(广义自回归滑动平均)模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits GARMA models to time series data.
适合GARMA模型,时间序列数据。
用法----------Usage----------
garma(link = "identity", earg=list(), p.ar.lag = 1, q.ma.lag = 0,
coefstart = NULL, step = 1)
参数----------Arguments----------
参数:link
Link function applied to the mean response. The default is suitable for continuous responses. The link loge should be chosen if the data are counts. Links such as logit, probit, cloglog, cauchit are suitable for binary responses.
链接功能应用的平均响应。默认情况下是适用于连续反应。如果数据是计数,应选择的链接loge。链接,如logit,probit,cloglog,cauchit是合适的二进制反应。
参数:earg
List. Extra argument for the link. See earg in Links for general information. In particular, this argument is useful when the log or logit link is chosen: for log and logit, zero values can be replaced by bvalue which is inputted as earg=list(bvalue = bvalue). See loge and logit etc. for specific information about each link function.
列表。额外的参数的链接。见earg中Links的一般信息。尤其是,这种说法是非常有用的选择时,log或logit的关联的log和logit,可更换零值的bvalue输入earg=list(bvalue = bvalue)。见loge和logit等每一个环节的功能的具体信息。
参数:p.ar.lag
A positive integer, the lag for the autoregressive component. Called p below.
一个正整数,滞后自回归组件。 p下面。
参数:q.ma.lag
A non-negative integer, the lag for the moving-average component. Called q below.
一个非负的整数,滞后移动平均组分。 q下面。
参数:coefstart
Starting values for the coefficients. For technical reasons, the argument coefstart in vglm cannot be used.
启动的系数的值。由于技术原因,说法coefstartvglm不能使用。
参数:step
Numeric. Step length, e.g., 0.5 means half-stepsizing.
数字。步长,例如,0.5指半stepsizing的。
Details
详细信息----------Details----------
This function draws heavily on Benjamin et al. (1998). See also Benjamin et al. (2003). GARMA models extend the ARMA time series model to generalized responses in the exponential family, e.g., Poisson counts, binary responses. Currently, this function can handle continuous, count and binary responses only. The possible link functions given in the link argument reflect this, and the user must choose an appropriate link.
此功能在很大程度上是以本杰明等人。 (1998年)。本杰明等人。 (2003年)。 GARMA模型ARMA时间序列模型扩展到广义的反应指数系列,例如,泊松计数,二进制响应。目前,该功能可以处理连续,计数和二进制响应。 link参数反映可能存在的联系功能,用户必须选择一个适当的链接。
The GARMA(p, q) model is defined by firstly having a response belonging to the exponential family
GARMA(p, q)模型的定义,首先响应的指数系列
where theta_t and phi are the canonical and scale parameters respectively, and A_t are known prior weights. The mean mu_t=E(Y_t|D_t)=b'(theta_t) is related to the linear predictor eta_t by the link function g. Here, D_t={x_t,…,x_1,y_(t-1),…,y_1,mu_(t-1),…,mu_1} is the previous information set. Secondly, the GARMA(p, q) model is defined by
theta_t和phi是规范和尺度参数分别为,和A_t前已知的权重。的平均值mu_t=E(Y_t|D_t)=b'(theta_t)相关的线性预测eta_t通过链接功能g。在这里, D_t={x_t,…,x_1,y_(t-1),…,y_1,mu_(t-1),…,mu_1}是以前的信息集。其次,GARMA(p, q)模型所定义的
Parameter vectors beta, phi and theta are estimated by maximum likelihood.
参数向量beta,phi和theta通过最大似然估计。
值----------Value----------
An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能如vglm。
警告----------Warning----------
This VGAM family function is 'non-standard' in that the model does need some coercing to get it into the VGLM framework. Special code is required to get it running. A consequence is that some methods functions may give wrong results when applied to the fitted object.
这VGAM家庭功能是“非标”,该模型确实需要一些胁迫得到它到的VGLM的框架。特殊代码需要得到它运行。这样做的结果是一些方法的功能时,可能导致错误的结果的拟合对象。
注意----------Note----------
This function is unpolished and is requires lots of improvements. In particular, initialization is quite poor, and ought to be improved. A limited amount of experience has shown that half-stepsizing is often needed for convergence, therefore choosing crit = "coef" is not recommended.
此功能待加强,并需要大量的改进。特别是,初始化是相当差的,应该加以改进。数量有限的经验表明,半stepsizing是经常需要收敛,因此选择crit = "coef",不建议。
Overdispersion is not handled. For binomial responses it is currently best to input a vector of 1s and 0s rather than the cbind(successes, failures) because the initialize slot is rudimentary.
偏大不被处理。二项式反应,它是目前最好的输入向量,而不是cbind(successes, failures)1“和”0“,因为初始化插槽是最基本的。
(作者)----------Author(s)----------
T. W. Yee
参考文献----------References----------
Fitting Non-Gaussian Time Series Models. Pages 191–196 in: Proceedings in Computational Statistics COMPSTAT 1998 by Payne, R. and P. J. Green. Physica-Verlag.
Generalized Autoregressive Moving Average Models. Journal of the American Statistical Association, 98: 214–223.
Markov regression models for time series: a quasi-likelihood approach. Biometrics, 44: 1019–1031.
参见----------See Also----------
The site http://www.stat.auckland.ac.nz/~yee contains more documentation about this family function.
“该网站http://www.stat.auckland.ac.nz/仪包含了这间家庭功能的更多的文档。
实例----------Examples----------
gdata = data.frame(interspike = c(68, 41, 82, 66, 101, 66, 57, 41, 27, 78,
59, 73, 6, 44, 72, 66, 59, 60, 39, 52,
50, 29, 30, 56, 76, 55, 73, 104, 104, 52,
25, 33, 20, 60, 47, 6, 47, 22, 35, 30,
29, 58, 24, 34, 36, 34, 6, 19, 28, 16,
36, 33, 12, 26, 36, 39, 24, 14, 28, 13,
2, 30, 18, 17, 28, 9, 28, 20, 17, 12,
19, 18, 14, 23, 18, 22, 18, 19, 26, 27,
23, 24, 35, 22, 29, 28, 17, 30, 34, 17,
20, 49, 29, 35, 49, 25, 55, 42, 29, 16)) # See Zeger and Qaqish (1988)[见(1988 Zeger和Qaqish)]
gdata = transform(gdata, spikenum = seq(interspike))
bvalue = 0.1 # .Machine$double.xmin # Boundary value[。机$ double.xmin#边界值]
fit = vglm(interspike ~ 1, trace = TRUE, data = gdata,
garma("loge", earg = list(bvalue = bvalue),
p = 2, coef = c(4, 0.3, 0.4)))
summary(fit)
coef(fit, matrix = TRUE)
Coef(fit) # A bug here[这里的一个错误]
## Not run: with(gdata, plot(interspike, ylim = c(0, 120), las = 1,[#不运行:(GDATA,图(峰峰,ylim = C(0,120),LAS = 1,]
xlab = "Spike Number", ylab = "Inter-Spike Time (ms)", col = "blue"))
with(gdata, lines(spikenum[-(1:fit@misc$plag)], fitted(fit), col = "orange"))
abline(h = mean(with(gdata, interspike)), lty = "dashed", col = "gray")
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|