[R] Help for SUR model

Arne Henningsen arne.henningsen at googlemail.com
Tue Sep 23 09:08:45 CEST 2008


Hi Bill!

On Monday 22 September 2008 23:53, Xianchun Liao wrote:
> I am an R beginner and trying to run a SUR model in R framework.
>
>
>
> subset(esasp500, Obs <=449 & Obs>=197, select = -Date) ->ev13sub
>
> c(Obs>=397) & c(Obs<=399) ->d13
>
> c(Obs>=400) & c(Obs<=449) ->f13
>
> SP500*f13 ->SP500f13
>
>
>
> BBC~SP500+d13+SP500f13  ->sur132
>
> BOW~SP500+d13+SP500f13  ->sur133
>
> CSK~SP500+d13+SP500f13  ->sur134
>
> DTC~SP500+d13+SP500f13  ->sur135
>
> GP~SP500+d13+SP500f13   ->sur136
>
> HAN~SP500+d13+SP500f13  ->sur137
>
> IP~SP500+d13+SP500f13   ->sur138
>
> KMB~SP500+d13+SP500f13  ->sur139
>
> LPX~SP500+d13+SP500f13  ->sur1310
>
> MWV~SP500+d13+SP500f13  ->sur1311
>
> PCH~SP500+d13+SP500f13  ->sur1312
>
> PCL~SP500+d13+SP500f13  ->sur1313
>
> PNR~SP500+d13+SP500f13  ->sur1314
>
> POP~SP500+d13+SP500f13  ->sur1315
>
> SON~SP500+d13+SP500f13  ->sur1316
>
> TIN~SP500+d13+SP500f13  ->sur1317
>
> W~SP500+d13+SP500f13    ->sur1318
>
> WPP~SP500+d13+SP500f13  ->sur1319
>
> WY~SP500+d13+SP500f13   ->sur1320
>
>
>
> system13 <- list(sur132, sur133, sur134, sur135, sur136, sur137, sur138,
> sur139, sur1310, sur1311, sur1312, sur1313, sur1314, sur1315, sur1316,
> sur1317, sur1318,sur1319,sur1320)
>
> labels13 <-
> ist("sur132","sur133","sur134","sur135","sur136","sur137","sur138","sur1
> 39","sur1310","sur1311","sur1312","sur1313","sur1314","sur1315","sur1316
> ","sur1317","sur1318","sur1319","sur1320")
>
> res13 <- systemfit("SUR", system13,labels13, data=ev13sub)
>
> summary(res13)
>
>
>
> But the results show  Error: could not find function "systemfit".

This error message indicates that you haven't loaded the "systemfit" package.
Please load it with the command
R> library( "systemfit" )
and try again. If you cannot load the package, you have to install it first:
R> install.packages( "systemfit" )

Best wishes,
Arne

> So, how to write a R code to implement the formula and get right
> results.
>
>
>
>
>
> Thanks,
>
>
>
> Bill
>
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented, minimal,
> self-contained, reproducible code.

-- 
Arne Henningsen
arne(dot)henningsen(at)googlemail(dot)com
http://www.arne-henningsen.name



More information about the R-help mailing list