View source: R/alpha.beta.sigma.R
alpha.beta.sigma | R Documentation |
Creates a 3 \times N
(no. of methods) matrix
consisting of the estimated alphas, betas, and imprecision sigmas for use with the cplot
function.
alpha.beta.sigma(x)
x |
A |
This is primarily a helper function used by the omx
function.
A 3 \times N
matrix
consisting of alphas on the first row, betas on the second row, followed by raw imprecision sigmas.
cplot
, omx
.
## Not run:
library(OpenMx)
library(merror)
data(pm2.5)
pm <- pm2.5
# OpenMx does not like periods in data column names
names(pm) <- c('ms_conc_1','ws_conc_1','ms_conc_2','ws_conc_2','frm')
# Fit model with FRM sampler as reference
omxfit <- omx(data=pm[,c(5,1:4)],bs.q=c(0.025,0.5,0.975),reps=100)
# Extract the estimates
alpha.beta.sigma(summary(omxfit$fit)$parameters[,c(1,5,6)])
# Make a calibration plot
cplot(pm[,c(5,1:4)],1,2,alpha.beta.sigma=
alpha.beta.sigma(summary(omxfit$fit)$parameters[,c(1,5,6)]))
# The easier way
cplot(pm[,c(5,1:4)],1,2,alpha.beta.sigma=omxfit$abs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.