找回密码
 注册
查看: 15723|回复: 0

R语言 fGarch包 garchFit()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-17 20:58:28 | 显示全部楼层 |阅读模式
garchFit(fGarch)
garchFit()所属R语言包:fGarch

                                        Univariate GARCH Time Series Fitting
                                         单变量GARCH时间系列配件

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Estimates the parameters of an univariate ARMA-GARCH/APARCH process.
估计参数的单变量ARMA-GARCH/APARCH过程中。


用法----------Usage----------


garchFit(formula = ~ garch(1, 1), data = dem2gbp,
    init.rec = c("mci", "uev"),
    delta = 2, skew = 1, shape = 4,
    cond.dist = c("norm", "snorm", "ged", "sged", "std", "sstd",
        "snig", "QMLE"),
    include.mean = TRUE, include.delta = NULL, include.skew = NULL,
        include.shape = NULL, leverage = NULL, trace = TRUE,
   
    algorithm = c("nlminb", "lbfgsb", "nlminb+nm", "lbfgsb+nm"),
    hessian = c("ropt", "rcd"), control = list(),
    title = NULL, description = NULL, ...)
   
garchKappa(cond.dist = c("norm", "ged", "std", "snorm", "sged", "sstd",
    "snig"), gamma = 0, delta = 2, skew = NA, shape = NA)



参数----------Arguments----------

参数:algorithm
a string parameter that determines the algorithm used for maximum  likelihood estimation.         
一个字符串参数,确定使用的算法的最大似然估计。


参数:cond.dist
a character string naming the desired conditional distribution. Valid values are "dnorm", "dged", "dstd",  "dsnorm", "dsged", "dsstd" and "QMLE". The default value is the normal distribution.  See Details for more information.  
一个字符串,命名所需的条件分布。有效的值是"dnorm","dged","dstd","dsnorm","dsged","dsstd"和"QMLE"。默认值是正态分布。请参阅更多信息的详细信息。


参数:control
control parameters, the same as used for the functions from nlminb, and 'bfgs' and 'Nelder-Mead' from optim.  
控制参数,使用的相同为nlminb,和BFGS“和”内尔德酒optim的功能。


参数:data
an optional timeSeries or data frame object containing the variables  in the model. If not found in data, the variables are taken  from environment(formula), typically the environment from which armaFit is called. If data is an univariate series, then the series is converted into a numeric vector and the name of the response in the formula will be neglected.  
一个可选的时间序列数据框的对象,它包含在模型中的变量。如果没有找到data,变量environment(formula),通常是armaFit被称为环境。如果data是一个单变量序列,然后转换成一个数值向量系列,和响应在式的名称将被忽略。


参数:delta
a numeric value, the exponent delta of the variance recursion. By default, this value will be fixed, otherwise the exponent will be  estimated together with the other model parameters if  include.delta=FALSE.  
一个数字值,指数delta的方差递归。默认情况下,这个值是固定的,否则指数将估计连同其他模型参数include.delta=FALSE。


参数:description
a character string which allows for a brief description.   
一个字符串允许的简要说明。


参数:formula
formula object describing the mean and variance equation of the  ARMA-GARCH/APARCH model. A pure GARCH(1,1) model is selected  when e.g. formula=~garch(1,1). To specify for example an  ARMA(2,1)-APARCH(1,1) use formula = ~arma(2,1)+apaarch(1,1).  
公式对象描述的均值和方差的方程的ARMA-GARCH/APARCH模型。选择一个纯粹的GARCH(1,1)模型时,例如formula=~garch(1,1)。例如,要指定ARMA(2,1) -  APARCH(1,1)使用formula = ~arma(2,1)+apaarch(1,1)。


参数:gamma
APARCH leverage parameter entering into the formula for calculating the expectation value.  
的APARCH利用参数进入的期望值计算的公式。


参数:hessian
a string denoting how the Hessian matrix should be evaluated, either hessian ="rcd", or "ropt", the default, "rcd"  is a central difference approximation implemented in R and "ropt" use the internal R function optimhess.  
在Hessian矩阵应如何评估一个字符串,表示,无论是hessian ="rcd"或"ropt",默认情况下,"rcd"是中心差分近似实现在R"ropt"使用内部R的功能optimhess。


参数:include.delta
a logical flag which determines if the parameter for the recursion equation delta will be estimated or not. If  include.delta=FALSE then the shape parameter will be kept  fixed during the process of parameter optimization.  
一个逻辑标志,它决定如果该参数的递归方程delta估计或没有。如果include.delta=FALSE然后将保持固定的形状参数,在此过程中的参数优化。


参数:include.mean
this flag determines if the parameter for the mean will be estimated or not. If include.mean=TRUE this will be the case, otherwise the parameter will be kept fixed durcing the process of parameter optimization.  
此标志确定的参数的平均值,将被估计或没有。如果include.mean=TRUE这将是如此,否则该参数将被保持固定durcing的工艺参数优化。


参数:include.shape
a logical flag which determines if the parameter for the shape of the conditional distribution will be estimated or not. If  include.shape=FALSE then the shape parameter will be kept  fixed during the process of parameter optimization.  
一个逻辑的标志,该标志确定的条件概率分布的形状的参数,如果将被估计或没有。如果include.shape=FALSE然后将保持固定的形状参数,在此过程中的参数优化。


参数:include.skew
a logical flag which determines if the parameter for the skewness of the conditional distribution will be estimated or not. If  include.skew=FALSE then the skewness parameter will be kept  fixed during the process of parameter optimization.  
一个逻辑标志,确定的条件分布的偏度的参数估计或没有。如果include.skew=FALSE然后将保持固定的偏度参数的参数优化的过程期间。


参数:init.rec
a character string indicating the method how to initialize the  mean and varaince recursion relation.   
一个字符串,指示如何初始化的均值和varaince的递归关系的方法。


参数:leverage
a logical flag for APARCH models. Should the model be leveraged? By default leverage=TRUE.     
一个逻辑标志APARCH模型。如果模型是杠杆吗?默认情况下,leverage=TRUE。


参数:shape
a numeric value, the shape parameter of the conditional distribution.  
一个数字值,的条件概率分布的形状参数。


参数:skew
a numeric value, the skewness parameter of the conditional  distribution.  
一个数值,参数的条件分布的偏度。


参数:title
a character string which allows for a project title.   
一个字符串,它允许一个项目的名称。


参数:trace
a logical flag. Should the optimization process of fitting the model parameters be printed? By default trace=TRUE.   
一个逻辑标志。拟合的模型参数的优化过程中是否应被印制的?默认情况下,trace=TRUE。


参数:...
additional arguments to be passed.     
一些额外的参数传递。


Details

详细信息----------Details----------

"QMLE" stands for Quasi-Maximum Likelihood Estimation, which assumes normal distribution and uses robust standard errors for inference. Bollerslev and Wooldridge (1992) proved that if the mean and the volatility equations are correctly specified, the QML estimates are consistent and asymptotically normally distributed. However, the estimates are not efficient and “the efficiency loss can be marked under asymmetric ... distributions” (Bollerslev and Wooldridge (1992), p. 166). The robust variance-covariance matrix of the estimates equals the (Eicker-White) sandwich estimator, i.e.
"QMLE"代表的准最大似然估计,假设正常的分配和使用稳健标准误差为推断。 Bollerslev和Wooldridge(1992)证明,如果正确指定的平均值和波动方程,的QML估计是一致的,渐近正态分布。然而,估计是效率不高,“不对称条件下的效率损失可以被标记...分布“(Bollerslev和Wooldridge(1992年),第166页)。强劲的方差 - 协方差矩阵的估计相等于(Eicker白色)三明治估计,即

where V denotes the variance-covariance matrix, H stands for the Hessian and G represents the matrix of contributions to the gradient, the elements of which are defined as
V表示方差 - 协方差矩阵,H代表的Hessian和G梯度的贡献表示矩阵的,其中的元素定义为

where l_{t} is the log likelihood of the t-th observation and zeta_{i} is the i-th estimated parameter. See sections 10.3 and 10.4 in Davidson and MacKinnon (2004) for a more detailed description of the robust variance-covariance matrix.
l_{t}是第t个观察和对数似然的zeta_{i}是第i个参数估计。强大的方差 - 协方差矩阵的一个更详细的说明,请参阅第10.3和10.4戴维森和麦金农(2004)。


值----------Value----------

garchFit <br> <br> returns a S4 object of class "fGARCH" with the following slots:
garchFit的<BR>参考S4返回一个类的对象"fGARCH"插槽如下:


参数:@call
the call of the garch function.  
的呼唤garch功能。


参数:@formula
a list with two formula entries, one for the mean and the other  one for the variance equation.  
具有两个公式条目列表的均值和方差方程另一个之一。


参数:@method
a string denoting the optimization method, by default the   returneds string is "Max Log-Likelihood Estimation".   
一个字符串,表示的优化方法,默认情况下,的returneds字符串是“最大似然估计”。


参数:@data
a list with one entry named x, containing the data of  the time series to be estimated, the same as given by the input argument series.   
一个列表,一个项目,名为x,包含的数据的时间序列估计,相同的输入参数series。


参数:@fit
a list with the results from the parameter estimation. The entries  of the list depend on the selected algorithm, see below.  
一个列表,从参数估计的结果。的列表中的条目依赖于所选择的算法,见下文。


参数:@residuals
a numeric vector with the (raw, unstandardized) residual values.  
一个数值向量(原始的,非标准化的)剩余价值。


参数:@fitted
a numeric vector with the fitted values.  
一个数值向量与拟合值。


参数:@h.t
a numeric vector with the conditional variances (h.t = sigma.t^delta).   
一个数值向量条件方差(h.t = sigma.t^delta)的。


参数:@sigma.t
a numeric vector with the conditional standard deviation.  
一个数值向量与条件的标准偏差。


参数:@title
a title string.  
一个标题字符串。


参数:@description
a string with a brief description.   
一个字符串的简要说明。

The entries of the @fit slot show the results from the optimization.
@合适的插槽中的条目的显示优化的结果。


(作者)----------Author(s)----------



Diethelm Wuertz for the Rmetrics <font face="Courier New,Courier" color="#666666"><b>R</b></font>-port,<br>
R Core Team for the 'optim' <font face="Courier New,Courier" color="#666666"><b>R</b></font>-port,<br>
Douglas Bates and Deepayan Sarkar for the 'nlminb' <font face="Courier New,Courier" color="#666666"><b>R</b></font>-port,<br>
Bell-Labs for the underlying PORT Library,<br>
Ladislav Luksan for the underlying Fortran SQP Routine, <br>
Zhu, Byrd, Lu-Chen and Nocedal for the underlying L-BFGS-B Routine.




参考文献----------References----------

PORT Library Documentation,  http://netlib.bell-labs.com/netlib/port/.
ARCH Models: Properties, Estimation and Testing, J. Economic Surveys 7, 305&ndash;362.
Generalized Autoregressive Conditional Heteroscedasticity, Journal of Econometrics 31, 307&ndash;327.
Quasi-Maximum Likelihood Estimation and Inference in Dynamic Models with Time-Varying Covariance, Econometric Reviews 11, 143&ndash;172.
A Limited Memory Algorithm for Bound Constrained Optimization, SIAM Journal of Scientific Computing 16, 1190&ndash;1208.
Econometric Theory and Methods, Oxford University Press, New York.
Autoregressive Conditional Heteroscedasticity with Estimates  of the Variance of United Kingdom Inflation, Econometrica 50, 987&ndash;1008.
Compact Numerical Methods for Computers, Linear Algebra and Function Minimisation, Adam Hilger.
A Simplex Algorithm for Function Minimization, Computer Journal 7, 308&ndash;313.
Numerical Optimization, Springer, New York.

实例----------Examples----------


## UNIVARIATE TIME SERIES INPUT:[#单变量时间序列输入:]
   # In the univariate case the lhs formula has not to be specified ... [在单因素的情况下,左公式不被指定...]
   
   # A numeric Vector from default GARCH(1,1) - fix the seed:[一个数值向量从默认GARCH(1,1) - 修正的种子:]
   N = 200
   x.vec = as.vector(garchSim(garchSpec(rseed = 1985), n = N)[,1])
   garchFit(~ garch(1,1), data = x.vec, trace = FALSE)

   # An univariate timeSeries object with dummy dates:[单变量时间序列对象的与哑日期:]
   x.timeSeries = dummyDailySeries(matrix(x.vec), units = "GARCH11")
   garchFit(~ garch(1,1), data = x.timeSeries, trace = FALSE)         

## Not run: [#不运行:]
   # An univariate zoo object:[一元的动物园对象:]
   x.zoo = zoo(as.vector(x.vec), order.by = as.Date(rownames(x.timeSeries)))
   garchFit(~ garch(1,1), data = x.zoo, trace = FALSE)

## End(Not run)[#(不执行)]

   # An univariate "ts" object:[一元“ts”的对象:]
   x.ts = as.ts(x.vec)
   garchFit(~ garch(1,1), data = x.ts, trace = FALSE)
   
## MULTIVARIATE TIME SERIES INPUT:[#多元时间序列输入:]
   # For multivariate data inputs the lhs formula must be specified ...[对于多变量数据输入的LHS公式必须在指定...]
   
   # A numeric matrix binded with dummy random normal variates:[用伪随机的正常分布随机数值矩阵绑定:]
   X.mat = cbind(GARCH11 = x.vec, R = rnorm(N))
   garchFit(GARCH11 ~ garch(1,1), data = X.mat)
        
   # A multivariate timeSeries object with dummy dates:[多变量时间序列对象的与哑日期:]
   X.timeSeries = dummyDailySeries(X.mat, units = c("GARCH11", "R"))
   garchFit(GARCH11 ~ garch(1,1), data = X.timeSeries)

## Not run:     [#不运行:]
   # A multivariate zoo object:[一个多元动物园对象:]
   X.zoo = zoo(X.mat, order.by = as.Date(rownames(x.timeSeries)))
   garchFit(GARCH11 ~ garch(1,1), data = X.zoo)

## End(Not run)[#(不执行)]

   # A multivariate "mts" object:[多变量对象:“MTS”]
   X.mts = as.ts(X.mat)
   garchFit(GARCH11 ~ garch(1,1), data = X.mts)

## MODELING THE PERCENTUAL SPI/SBI SPREAD FROM LPP BENCHMARK:[#LPP BENCHMARK的SPI / SBI PERCENTUAL的蔓延,从建模:]
   
   X.timeSeries = as.timeSeries(data(LPP2005REC))
   X.mat = as.matrix(x.timeSeries)
   ## Not run: X.zoo = zoo(X.mat, order.by = as.Date(rownames(X.mat)))[#不运行:X.zoo动物园(X.mat,order.by as.Date(rownames(X.mat)))]
   X.mts = ts(X.mat)
   garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.timeSeries)
   # The remaining are not yet supported ...[其余尚未支持......]
   # garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.mat)[garchFit(100 *(SPI  -  SBI)的GARCH(1,1),数据= X.mat)]
   # garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.zoo)[garchFit(100 *(SPI  -  SBI)的GARCH(1,1),数据= X.zoo)]
   # garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.mts)[garchFit(100 *(SPI  -  SBI)的GARCH(1,1),数据X.mts次)]
   
## MODELING HIGH/LOW RETURN SPREADS FROM MSFT PRICE SERIES:[#造型高/低回报的息差MSFT价格序列:]
   
   X.timeSeries = MSFT
   garchFit(Open ~ garch(1,1), data = returns(X.timeSeries))
   garchFit(100*(High-Low) ~ garch(1,1), data = returns(X.timeSeries))

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-23 10:28 , Processed in 0.038266 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表