# CI.trt: Estimating a linear combination of treatment effects and... In rwang14/implant: A High-throughput Phenotyping Pipeline for Image Processing and Functional Growth Curve Analysis

## Description

This function is used for estimating a linear combination of treatment effects and its confidence regions. Moreover, it can be used to test the coefficient of the difference between two treatments.

## Usage

 `1` ```CI.trt(fit,L,alpha) ```

## Arguments

 `fit` An object of output obtained by function "fanova_mean". `L` A numeric contrast vector which specifies the linear combination of the parameters 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.

## Value

 `trt` A t by 1 vector which includes the estimated mean of the treatment mean at different observation time points. `ub` A t by 1 vector which indicates the upper bound of the (1-alpha) confidence band at different time points. `lb` A t by 1 vector which indicates the lower bound of the (1-alpha) confidence band at different time points.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```fit = fanova_mean(Y.na.mat = Y.na.mat, 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) L1 = c(1,0,0,1/3,1/3) ci1 = CI.trt(fit = fit, L = L1, alpha = 0.05) plot(tt,ci1\$trt,type = "l") lines(tt,ci1\$lb, col = "blue") lines(tt,ci1\$ub, col = "blue") ```

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