[R] how to call sas in R

bogdan romocea br44114 at gmail.com
Tue Jul 5 17:08:25 CEST 2005


Why don't you do the simulations in SAS? If you prefer otherwise,
setup the SAS code for running in batch mode (output and log
redirection), then call it from R with (on Windows, untested)
system("start ' ' C:\etc\sas.exe -sysin garch.sas") 
To keep the parameters from the estimate, have the SAS job output them
to a text file or data set.

hth,
b.


> -----Original Message-----
> From: Nongluck Klibbua [mailto:Nongluck.Klibbua at newcastle.edu.au] 
> Sent: Saturday, July 02, 2005 4:14 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] how to call sas in R
> 
> 
> Hello all,
> I would like to know how to call sas code in R. Since I 
> simulate data in
> R and I need to use sas code (garch-t,egarch and gjr) to 
> estimate it. I
> need to simulate 500 times with 2000 obs. How I can call that code in
> R.Also, how I can keep the parameters from the estimate.
> 
> j=1:500
> i=1:2000
> sas code
> keep parameters.
> 
> Best Appreciate,
> Luck
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list