楼主: szc412247754
18282 3

[学习分享] R语言中的adfTest和unitrootTest使用方法 [推广有奖]

  • 0关注
  • 4粉丝

已卖:2份资源

硕士生

86%

还不是VIP/贵宾

-

威望
0
论坛币
881 个
通用积分
26.4274
学术水平
16 点
热心指数
23 点
信用等级
12 点
经验
431 点
帖子
235
精华
0
在线时间
148 小时
注册时间
2011-5-25
最后登录
2024-9-25

楼主
szc412247754 发表于 2011-9-11 16:54:41 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
包:{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)     


二维码

扫码加我 拉你入群

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

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

关键词:unitroot Ftest ttest test Unit includes testing family tables title

沙发
记得要忘记1227 在职认证  发表于 2011-9-11 17:05:04
多谢楼主 只是好复杂啊 能否详细讲解下啊

藤椅
szc412247754 发表于 2011-9-11 17:22:41
贴出来共同研究,我也不太明白的。。。

板凳
yahoocom 发表于 2011-9-11 22:11:45
直接copy出来的,建议调整一下书写的风格

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 22:43