Description Usage Arguments Value Author(s) Examples
Produces point estimates, interval estimates, and p values for linear combinations of regression coefficients using a     uRegress object.
1  | 
reg | 
 an object of class   | 
comb | 
 a vector or matrix containing the values of the constants which create the linear combination of the form c_0 + c_1β_1 + … .  | 
hyp | 
 the null hypothesis to compare the linear combination of coefficients against. The default value is   | 
conf.level | 
 a number between 0 and 1, indicating the desired confidence level for intervals.  | 
robustSE | 
 a logical value indicating whether or not to use robust standard errors in calculation. If   | 
eform | 
 a logical value indicating whether or not to exponentiate the estimated coefficient. By default this is performed based on the type of regression used.  | 
Prints a matrix with the point estimate of the linear combination of coefficients, a p-value, and confidence interval.
Scott S. Emerson, M.D., Ph.D., Andrew J. Spieker, Brian D. Williamson
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | # Loading required libraries
library(survival)
library(sandwich)
# Reading in a dataset
mri <- read.table("http://www.emersonstatistics.com/datasets/mri.txt",header=TRUE)
attach(mri)
# Linear regression of LDL on age (with robust SE by default)
testReg <- regress ("mean", ldl~age+stroke)
# Testing coefficient created by .5*age - stroke (the first 1 comes from including the intercept)
testC <- c(1, .5, -1)
lincom(testReg, testC)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.