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

R语言 tsDyn包 TVAR.sim()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 12:34:46 | 显示全部楼层 |阅读模式
TVAR.sim(tsDyn)
TVAR.sim()所属R语言包:tsDyn

                                        Simulation and bootstrap of multivariate Threshold Autoregressive model
                                         多元门限自回归模型的模拟和自举

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

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

Estimate or bootstraps a multivariate Threshold VAR
估计或鞋套一个多元的阈值VAR


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


TVAR.sim(data,B,TVARobject, Thresh, nthresh=1, type=c("simul","boot", "check"), n=200, lag=1, include = c("const", "trend","none", "both"),  thDelay=1,  thVar=NULL, mTh=1, starting=NULL,  innov=rmnorm(n, mean=0, varcov=varcov), varcov=diag(1,k), show.parMat=FALSE, round=FALSE)



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

参数:data
matrix of parameter to simulate
矩阵的参数,以模拟


参数:B
Matrix of coefficients to simulate
的系数矩阵,以模拟


参数:TVARobject
Object computed by function TVAR()
对象计算功能TVAR()


参数:Thresh
The threshold value(s). Vector of length nthresh
的阈值的值(s)。向量的长度nthresh的


参数:nthresh
number of threshold (see details)
阈值(见详情)


参数:type
Whether a bootstrap or simulation is to employ. See details
无论是采用自举或模拟。查看详细资料


参数:n
Number of observations to create when type="simul"
创建时的观测值的数量=“模拟器上”


参数:lag
Number of lags to include in each regime
包括在每一个政权的滞后阶数


参数:include
Type of deterministic regressors to include. NOT WORKING PROPERLY CURRENTLY if not const
确定性回归量包括的类型。如果不妥善目前不是const


参数:thDelay
'time delay' for the threshold variable (as multiple of embedding time delay d) PLEASE NOTE that the notation is currently different to univariate models in tsDyn. The left side variable is taken at time t, and not t+1 as in univariate cases.
“时间延迟”的阈值变量(d)请注意,目前不同的符号是单因素模型在tsDyn多个嵌入时间延迟。左侧变量是在时间t的,而不是在单变量的情况下,1吨。


参数:thVar
external transition variable
外部转换变量


参数:mTh
combination of variables with same lag order for the transition variable. Either a single value (indicating which variable to take) or a combination
具有相同的转换变量的滞后阶数为变量的组合。单个值(指示所采取的变量)或组合


参数:starting
Starting values when a simulation with given parameter matrix is made
开始时,给定的参数矩阵的模拟值


参数:innov
Innovations used for simulation. Should be matrix of dim nxk. By default multivariate normal.
创新用于模拟。如果是矩阵昏暗的脑血康。默认情况下,多变量常态。


参数:varcov
Variance-covariance matrix for the innovations. By default multivariate normal is used.
方差 - 协方差矩阵的创新。默认情况下,多元正常使用。


参数:show.parMat
Logical. Should the parameter matrix be shown? Useful to understand how to give right input
逻辑。如果参数矩阵显示?了解如何让正确的输入


参数:round
Rounds the series created to have the same digits (hopefully) as original series.  
大红大紫的系列创建原始的系列有相同的数字(希望如此)。


Details

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

This function offers the possibility to generate series following a TVAR from two approaches: bootstrap or simulation.
此功能提供了可能产生以下两种方法:引导或模拟一个TVAR系列。

When the parameter matrix is given, on can only simulate a VAR (nthresh=0) or TVAR (nthresh=1 or 2). One can have a specification with constant (default), trend, both or none (see arg include). Order in parameters is include/lags (VECM) and include/lags/include/lags for TVECM, hence, a matrix for a TVECM with 3 regimes, a const and a 2 lags would have 2 lines and 2*(1+4) columns. The innovations can be given by the user (a matrix of dim nxk, here n does not include the starting values!), by default it uses a multivariate normal distribution, with covariance matrix specified by varcov. The starting values (of dim lags x k) can be given. The user should take care for their choice, since it is not sure that the simulated values will cross the threshold even once.
当给定的参数矩阵,只能模拟一个VAR(nthresh = 0)或TVAR(nthresh = 1或2)。我们可以以不变(默认),有一个规范的趋势,或没有(ARG包括)。订购参数包括/滞后(VECM)/滞后/ /滞后TVECM,因此,矩阵的TVECM制度,一个const和2滞后的有2号线和2 *(1 +4)列。创新可以由用户(矩阵昏暗的脑血康,这里n不包括初始值!),默认情况下,它采用的是多元正态分布,varcov指定的协方差矩阵。的初始值(昏暗的滞后XK)可以得到。用户应该照顾他们的选择,因为它是不知道的模拟值将跨越的阈值,甚至一度。

The second possibility is to bootstrap the series. This is done on a object generated by TVECM (or VECM). A simple residual bootstrap is done. Alternatively, one can simulate the series with the same parameter matrix and with normal distributed residuals, corresponding to Monte-carlo simulations. One can alternatively give only the series, and then the function will call internally TVECM().
第二个可能性是引导系列。这样做是生成者TVECM(或VECM)上的对象。做一个简单的残余引导。另外,我们可以模拟一系列具有相同的参数矩阵和正态分布的残差,对应的Monte-Carlo仿真。也可以只系列,则该函数将调用内部TVECM()。


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

A matrix with the simulated/bootstraped series.
矩阵的一系列模拟/ bootstraped的。


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


Matthieu Stigler



参见----------See Also----------

TVAR to estimate a TVAR, VAR.sim to simulate/bootstrap a VAR.
TVAR估计TVAR,VAR.sim模拟/启动VAR。


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


##simulate VAR as in Enders 2004, p 268[#模拟VAR恩德斯2004年,第268]
B1<-matrix(c(0.7, 0.2, 0.2, 0.7), 2)
var1<-TVAR.sim(B=B1,nthresh=0,n=100, type="simul", include="none")
ts.plot(var1, type="l", col=c(1,2))


B2<-rbind(c(0.5, 0.5, 0.5), c(0, 0.5, 0.5))
varcov<-matrix(c(1,0.2, 0.3, 1),2)
var2<-TVAR.sim(B=B2,nthresh=0,n=100, type="simul", include="const", varcov=varcov)
ts.plot(var2, type="l", col=c(1,2))


##Simulation of a TVAR with 1 threshold[模拟TVAR 1阈值]
B<-rbind(c(0.11928245, 1.00880447, -0.009974585, -0.089316, 0.95425564, 0.02592617),c(0.25283578, 0.09182279,  0.914763741, -0.0530613, 0.02248586, 0.94309347))
sim<-TVAR.sim(B=B,nthresh=1,n=500, type="simul",mTh=1, Thresh=5, starting=matrix(c(5.2, 5.5), nrow=1))

#estimate the new serie[估计新系列]
TVAR(sim, lag=1, dummyToBothRegimes=TRUE)

##Bootstrap a TVAR with two threshold (three regimes)[#自举一个TVAR有两个阈值(三个政权)]
data(zeroyld)
serie<-zeroyld
TVAR.sim(data=serie,nthresh=2, type="boot",mTh=1, Thresh=c(7,9))

##Check the bootstrap[#查看引导]
cbind(TVAR.sim(data=serie,nthresh=2, type="check",mTh=1, Thresh=c(7,9)),serie)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 06:48 , Processed in 0.043286 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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