# Example 1: Single trial
n_pts_single <- matrix(c(3, 6, 9, 12), nrow = 1)
n_tox_single <- matrix(c(0, 1, 3, 4), nrow = 1)
iso_est <- isotonic_regression(n_pts_single, n_tox_single)
print(iso_est)
# Example 2: Multiple trials
n_pts_mat <- matrix(c(3, 6, 9, 12,
3, 6, 9, 12,
3, 6, 9, 12), nrow = 3, byrow = TRUE)
n_tox_mat <- matrix(c(0, 1, 3, 4,
0, 0, 2, 3,
1, 2, 4, 6), nrow = 3, byrow = TRUE)
iso_est <- isotonic_regression(n_pts_mat, n_tox_mat)
print(iso_est)
Run the code above in your browser using DataLab