read.bayesx.output {R2BayesX} | R Documentation |
Read BayesX Output from Directories
Description
This function automatically reads in BayesX estimation output which is stored in an output directory.
Usage
read.bayesx.output(dir, model.name = NULL)
Arguments
dir |
a character string, specifies the directory file where BayesX output is stored. |
model.name |
a character string, specifies the base name of the model that should be read in,
also see the examples. If not supplied |
Details
The function searches for model term objects in the specified directory, which are then stored in
a list
. Each model term object will be of class xx.bayesx
, so the generic functions
described in plot.bayesx
may be applied for visualizing the results. In addition
summary statistics of the models may be printed to the R console with
summary.bayesx
.
Value
read.bayesx.output
typically returns a list of class "bayesx"
with the first element
containing a list with the following objects:
formula |
the STAR formula used, |
bayesx.setup |
an object of class |
bayesx.prg |
a character containing the |
bayesx.run |
details on processing with |
call |
the original function call, |
fitted.values |
the fitted values of the estimated model, |
residuals |
the residuals of the estimated model, |
effects |
a |
fixed.effects |
a |
variance |
estimation results for the variance parameter of the model, |
smooth.hyp |
a |
model.fit |
list containing additional information to be supplied to
|
Author(s)
Nikolaus Umlauf, Thomas Kneib, Stefan Lang, Achim Zeileis.
See Also
summary.bayesx
, plot.bayesx
, samples
.
Examples
## load example data from
## package example folder
dir <- file.path(find.package("R2BayesX"), "/examples/ex01")
b <- read.bayesx.output(dir)
## some model summaries
print(b)
summary(b)
## now plot estimated effects
plot(b)
## 2nd example
dir <- file.path(find.package("R2BayesX"), "/examples/ex02")
list.files(dir)
## dir contains of 2 different
## base names
## 01 only one nonparametric effect
b <- read.bayesx.output(dir, model.name = "nonparametric")
plot(b)
## 02 only one bivariate
## nonparametric effect
b <- read.bayesx.output(dir, model.name = "surface")
plot(b)