This page contains the R package RItools which is a joint project of Jake Bowers , Ben Hansen and Mark Fredrickson.
For Use Within R
Installation and Configuration
The source code packaged for OS X or other Unices is can be downloaded from within R using:
download.packages("RItools",type="source",destdir="YourDestinationDirectoryHere")
The source and binary code is available via the CRAN repository
system for versions of R later than 2.7.0 so installation should simply use:
install.packages("RItools")
If you want to install RItools
for versions of R more current than 2.2 but earlier than 2.7, you'll have to use:
install.packages("Ritools",type="source",dep=TRUE)
.
If you don't already have the SparseM package installed, you will need the tools required to compile fortran libraries installed in order to build SparseM.
For Use Within Stata
It is now possible to access some of the basic capabilities of RItools from within Stata . The workhorse of the package is the xbalance command. At this time only default usage and output is possible from within Stata.
Installation and Configuration
To use xBalance within Stata, you must install R, available from
CRAN. You must also install the RItools package.
From your R prompt:
install.packages("RItools")
Next, from your Stata prompt, install xbalance from the SSC repository:
ssc install xbalance
You can see the source of the Stata files at the SSC repository.
After installing the xbalance.ado file, you will need to install Roger Newson's Rsource Stata package. To install Rsource from SSC at the Stata prompt type:
ssc install rsource
You must set the global {hi:Rterm_path} prior to running
xbalance. Examples, on Windows and Unix (such as Mac OS X)
respectively:
global Rterm_path `"c:\r\R-2.5.0\bin\Rterm.exe"'
global Rterm_path `"/usr/bin/R"'
You may find it convenient to add the appropriate R path settings to your profile.do
.