"normal" for normal distribution, "t-dist" for t-distribution.
.theta
Causal estimate.
.thetase
Standard error of estimate.
df
Degrees of freedom (for t-distribution).
.rse
Residual standard error.
.alpha
Significance level.
Details
The slight complication of this function is that when the estimate of the residual standard error (RSE) is less than one, the t-distribution confidence interval is calculated as either the confidence interval using a normal deviate and setting the RSE to 1, or a t-distribution deviate and using the estimated RSE. The wider of the two intervals is reported. This ensures that under-dispersion is not doubly penalized, while also making sure that the estimate is no more precise than that from a fixed-effect analysis.