## Ordered Forest
require(orf)
# load example data
data(odata)
# specify response and covariates
Y <- as.numeric(odata[, 1])
X <- as.matrix(odata[, -1])
# estimate Ordered Forest with default settings
orf_fit <- orf(X, Y)
# print output of the orf estimation
print(orf_fit)
# show summary of the orf estimation
summary(orf_fit)
# plot the estimated probability distributions
plot(orf_fit)
# predict with the estimated orf
predict(orf_fit)
# \donttest{
# estimate marginal effects of the orf
margins(orf_fit)
# }
Run the code above in your browser using DataLab