全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
18218 3
2011-09-11
包:{fUnitRoots }
Description
Acollection and description of functions for unit root testing. The family oftests includes ADF tests based on Banerjee's et al. tables and on J.G.McKinnons' numerical distribution functions. Thefunctions are:
adfTest         Augmented Dickey–Fuller test for unit roots,
unitrootTest       the same based on McKinnons's test statistics.
Usage
unitrootTest(x,lags = 1, type = c("nc", "c", "ct"), title =NULL, description = NULL)   
adfTest(x, lags = 1, type =c("nc", "c", "ct"), title = NULL, description =NULL)
Argumentsdescription
  a characterstring which allows for a brief description.
lags      
  themaximum number of lags used for error term correction.
title       a character string which allows for aproject title.
type       a character string describing the type ofthe unit root regression. Valid choices are "nc" for a regressionwith no intercept (constant) nor time trend, and "c" for a regressionwith an intercept (constant) but no time trend, "ct" for a regressionwith an intercept (constant) and a time trend. The default is "c".
x  a numericvector or time series object.
Details
Thefunction adfTest() computes test statistics and p values along theimplementation from Trapletti's augmented Dickey–Fuller test for unit roots. Incontrast to Trapletti's function three kind of test types can
@data    a data framewith the input data.
@data.name        acharacter string giving the name of the data frame.
@test    a list object which holds the output ofthe underlying test function.
@title     a characterstring with the name of the test.
@description      acharacter string with a brief description of the test. Theentries of the @test slot include the following components:
$statistic      the valueof the test statistic.
$parameter  the lag order.
$p.value       the p-value of the test.
$method       acharacter string indicating what type of test was performed.
$data.name  a characterstring giving the name of the data.
$alternative        acharacter string describing the alternative hypothesis.
$name    the name ofthe underlying function, which may be wrapped.
$output  additionaltest results to be printed.
Examples
## Time Series   
# A time series which contains no unit-root:  
x = rnorm(1000)     
# A time series which contains a unit-root:   
y = cumsum(c(0, x))
## adfTest -    
adfTest(x)   adfTest(y)
## unitrootTest -   
unitrootTest(x)  
unitrootTest(y)     


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-9-11 17:05:04
多谢楼主 只是好复杂啊 能否详细讲解下啊
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-11 17:22:41
贴出来共同研究,我也不太明白的。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-11 22:11:45
直接copy出来的,建议调整一下书写的风格
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群