楼主: yjsun
5013 2

[Splus与R高级班] Ox安装的问题-续 [推广有奖]

  • 6关注
  • 7粉丝

VIP

已卖:810份资源

院士

52%

还不是VIP/贵宾

-

威望
0
论坛币
19836 个
通用积分
54.6494
学术水平
8 点
热心指数
17 点
信用等级
5 点
经验
2057 点
帖子
759
精华
0
在线时间
7029 小时
注册时间
2004-11-25
最后登录
2025-9-16

楼主
yjsun 发表于 2009-8-30 21:19:36 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
感谢方老师上次的解答,我以前的安装是按照在您视频时打开的ox网页地址下载的ox,我卸载了,安装的是您讲义中ox软件,不过觉得还是有些问题:

1、安装路径
默认的还是programes下的安装路径,但是不管是默认的C:\Program Files\OxMetrics5安装路径,还是C:\OxMetrics5安装路径,
都和您提供的把ox引入带R中的代码(见下一行代码)的路径不一致

command = "C:\\OX\\OxMetrics5\\Ox\\bin\\oxl.exe C:\\OX\\OxMetrics5\\Ox\\lib\\GarchOxModelling_w.ox"

2、并且运行
m3=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,3),series=intc)
m1=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,1),series=intc)
这两个代码均会有下面的Warning message:

> m3=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,3),series=intc)
Warning message:
In system(command, show.output.on.console = trace, invisible = TRUE) :
  C:\OX\OxMetrics5\Ox\bin\oxl.exe not found
> m1=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,1),series=intc)
Warning message:
In system(command, show.output.on.console = trace, invisible = TRUE) :
  C:\OX\OxMetrics5\Ox\bin\oxl.exe not found

3、运行m3和m1后,再运行names(m1)会显示如下信息,因为我不知道下面的信息是否和您执行的命令的返回结果时候一致,所以列出来供您比较参考。
[1] "x"            "csts"         "cond.dist"    "arma.orders"  "arfima"       "garch.orders" "arch.in.mean" "model"        "ox"           "call"         "residuals"   
[12] "condvars"     "coef"         "title"        "description"


4、另外,执行下述代码只会产生一行一列的图形,而不是par(mfco=c(2,1))要求的两行一列,所以我想一定是哪里出了问题
par(mfco=c(2,1))
plot(intc,type="l")
plot(sqrt(m1$condvars),type="l")


还请方老师您释疑,感谢中!
二维码

扫码加我 拉你入群

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

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

关键词:Description garchOxFit OxMetrics invisible Programes command 软件 网页

沙发
ruiqwy 发表于 2009-8-31 20:42:53
你好!
问题1,2。应该是你没安装正确或是引用正确。你现在可以按我给的路径重新安装试试,如果安装后对应路径没有oxl.exe或GarchOxModelling_w.ox,你可以从其他目录拷到对应的目录下。然后再执行一下。
问题3 的object基本上这些
问题4,你的par(mfco=c(2,1))错误,应该是par(mfcol=c(2,1))或是par( mfrow=c(2,1))
R is the second language for me!Using R is standing on the shoulders of giants!   Let\'s use R together!

藤椅
yjsun 发表于 2009-9-8 19:53:08
恩,谢谢方老师。
前几天特忙,昨天晚上才有时间试一下,确实是安装路径有问题,问题四如您所言
安装路径我参考了您提供的说明文档,又参考了GARCH in R,您课件code中的m3和m1命令就可以运行了。code中其他的命令我还没有试。

GARCH in R

This article is provided by professor Zongwu  Cai from University of North Carolina at Challotte and the copyright belongs to him.

Ps: The directory can be disigned as you want.

####################################

1) Download and install R:

After you install R, please install R packages (fBasics, fSeries, tseries, nnet, evir).  During the installation, please use default directory of the R

C:\Program Files\R\R-2.6.1

From within R select Packages -> Install Package(s)...

Choose your CRAN mirror if necessary and select fBasics, fSeries, tseries, nnet, evir, click "OK".

If other packages are also required (e.g. fBasics). Agree to install them as well.

You may already have this package installed in your computer, if so, please update the package instead.

####################################

2) Install Ox Console:

Download Ox Console 4.10 for Windows XP/2000/NT/9x (.exe, 4MB) from following link:

http://www.doornik.com/download/b736gw/oxcons.html

Install 'oxcons410.exe' in the default directory C:\Program Files\OxMetrics4, then copy the whole subdirectory 'Ox' to 'C:\'.

####################################

3) Download and install G@RCH 4.2:

Download garch42.zip from following link:

http://www.core.ucl.ac.be/~laurent/G@RCH/site/xbdcons/garch42.zip

Create a new directory (folder) on your PC: C:\Ox\Packages

[The subdirectory "packages" might exist already. In this case, you do not need to create one.]

Unzip "garch42.zip" into "C:\Ox\Packages"

4) Installation of the interface:

Download “GarchOxModelling.ox” from

http://www.math.uncc.edu/~zcai/GarchOxModelling.ox

and copy the file "GarchOxModelling.ox" to "C:\Ox\lib".

5) Download a corrected version of the garchOxFit function from

http://www.math.uncc.edu/~zcai/garchoxfit_R.txt

Save the file “garchoxfit_R.txt” in your R working directory, say save it into c:\Ox\lib

####################################

6) Using garchOxFit function in R:

Begin each R session with the following commands after changing your working directory:

>library(fSeries)

>source("c:/Ox/lib/garchoxfit_R.txt")

The function usage is:

> garchOxFit

function (formula.mean = ~arma(0, 0), formula.var = ~garch(1,

    1), series = x, cond.dist = c("gaussian", "t", "ged", "skewed-t"),

    include.mean = TRUE, truncation = 100, trace = TRUE, title = NULL,

    description = NULL,arch.in.mean=0)

For information on package 'fSeries':

>library(help="fSeries")

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-30 20:46