CI.trt.diff: Testing the significance of the treatment effects of interest...

Description Usage Arguments Examples

View source: R/CI_trt_diff.R

Description

This function can be used for testing the significance of the treatment effects of interest by constructing the corresponding confidence regions. In fact, it is a special case of the function "CI.trt" in this package. This function is more efficient and more easy to use when testing the difference between two treatments.

Usage

1
CI.trt.diff(fit, j1, j2, alpha)

Arguments

fit

An object of output obtained by function "fanova_mean".

j1

A positive integer, which indicates the columns of the design matrix corresponding to the treatment of interest.

j2

A positive integer, which indicates the columns of the design matrix corresponding to the treatment of interest.

alpha

A positive small number, which is the probability of making type I error. e.g., if you want to calculate the 0.95 confidence band, take alpha = 0.05.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fit = fanova_mean(Y.na.mat = Y, X = X,
                  tt = seq(from = 0, to = 44, by = 2),
                  formula = toString("~ X[,1]+X[,2]"),
                  K.int = 6, order = 4,
                  d0 = 0, d1 = 2, d2 = 2, lower = -10, upper = 15)

ci_diff = CI.trt(fit = fit,j1 = 5, j2 = 4, alpha = 0.05)
plot(tt,ci_diff$trt,type = "l")
lines(tt,ci_diff$lb, col = "blue")
lines(tt,ci_diff$ub, col = "blue")

rwang14/implant documentation built on Dec. 9, 2019, 6:36 p.m.