Learn R Programming

mixor (version 1.0.4)

Contrasts: Estimate Contrasts for Mixor Object

Description

This function is used to specify and estimate contrasts of interest for a mixor object.

Usage

Contrasts(fit, contrast.matrix, digits=max(3, getOption("digits") - 2), 
   signif.stars=TRUE, dig.tst = max(1, min(5, digits - 1)))

Arguments

fit

A mixor object.

contrast.matrix

A matrix of contrasts of interest. Each column in the contrast matrix should be of the same length as the coef vector of the fitted mixor object.

digits

minimum number of significant digits to be used for most numbers.

signif.stars

logical; if TRUE, P-values are additionally encoded visually as "significance stars" in order to help scanning of long coefficient tables.

dig.tst

minimum number of significant digits for the test statistics.

Value

A list containing the following components:

contrast.matrix

a matrix specifying the contrasts of interest.

Contrasts

a matrix containing the estimates, SEs, Z-values, and p-values for the contrasts of interest.

See Also

See Also as mixor, coef.mixor, vcov.mixor

Examples

Run this code
# NOT RUN {
library("mixor")
data("SmokingPrevention")
# data frame must be sorted by id variable
SmokingPrevention<-SmokingPrevention[order(SmokingPrevention$class),]
Fitted.students<-mixor(thksord~thkspre+cc+tv+cctv, data=SmokingPrevention, 
     id=class, link="logit")
summary(Fitted.students)
coef(Fitted.students)
vcov(Fitted.students)
cm<-matrix(c(-1,-1,-1,0,0,0,0,0,
              0, 0, 0,0,0,0,0,0,
			  0, 0, 0,1,0,0,0,1),ncol=3,byrow=TRUE)
Contrasts(Fitted.students, contrast.matrix=cm)
# }

Run the code above in your browser using DataLab