# load data from OSC 2015 reproducibility project
OSC.z
# fit an EM z-curve (with disabled bootstrap due to examples times limits)
m.EM <- zcurve(OSC.z, method = "EM", bootstrap = FALSE)
# a version with 1000 boostraped samples would looked like:
m.EM <- zcurve(OSC.z, method = "EM", bootstrap = 1000)
# or KD2 z-curve (use larger bootstrap for real inference)
m.D <- zcurve(OSC.z, method = "density", bootstrap = FALSE)
# inspect the results
summary(m.EM)
summary(m.D)
# see '?summary.zcurve' for more output options
# plot the results
plot(m.EM)
plot(m.D)
# see '?plot.zcurve' for more plotting options
# to specify more options, set the control arguments
# ei. increase the maximum number of iterations and change alpha level
ctr1 <- list(
"max_iter" = 9999,
"alpha" = .10
)
if (FALSE) m1.EM <- zcurve(OSC.z, method = "EM", bootstrap = FALSE, control = ctr1)
# see '?control_EM' and '?control_density' for more information about different
# z-curves specifications
Run the code above in your browser using DataLab