# NOT RUN {
# Small data example (Koopman et al., 2019)
smallData <- data.frame(Subs = c(1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3),
Xa = c(0, 0, 1, 0, 1, 1, 1, 2, 1, 0, 1, 2, 0, 0, 0),
Xb = c(0, 0, 1, 0, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 0),
Xc = c(1, 0, 0, 0, 1, 1, 2, 1, 2, 0, 1, 1, 2, 1, 0))
MLcoefH(smallData)
# Compute also the range-preserving confidence intervals
MLcoefH(smallData, ci = .95)
# Print variance-covariance matrices
MLcoefH(smallData, cov.mat = TRUE)
# Load real data example. Note that due to an estimation adaptation (Koopman et al., 2020)
# the results differ from the table in Koopman et al. (2019).
data(autonomySupport)
# Compute scalability coefficients with or without standard errors, range-preserving
# confidence intervals, nice output
# }
# NOT RUN {
H.se.nice <- MLcoefH(autonomySupport)
H.se.nice
# }
# NOT RUN {
H.se.not <- MLcoefH(autonomySupport, nice.output = FALSE)
H.se.not
# }
# NOT RUN {
H.se.ci.nice <- MLcoefH(autonomySupport, ci = .95)
H.se.ci.nice
# }
# NOT RUN {
H.se.ci.not <- MLcoefH(autonomySupport, ci = .95, nice.output = FALSE)
H.se.ci.not
# }
# NOT RUN {
H.nice <- MLcoefH(autonomySupport, se = FALSE)
H.nice
# }
# NOT RUN {
H.not <- MLcoefH(autonomySupport, se = FALSE, nice.output = FALSE)
H.not
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab