TABLE OF CONTENTS


methodsBiv/print.summary.bivrec [ Functions ]

NAME

    print.summary.bivrec --- S3 method to print summary.bivrec objects

SYNOPSIS

383 print.summary.bivrec <- function(x, ...)

INPUTS

    x      an objet of class summary.bivrec

SOURCE

386 {
387     processnames <- attr(x, "processnames")
388     dots <- x$dots
389     sreg <- x$summary.reg
390     sdisp <- x$summary.disp
391     # Print regression coefficients
392     colnames(sreg)[1:3] <- paste(processnames[1], c("coef", "sd", "pval"), sep = ".")
393     colnames(sreg)[4:6] <- paste(processnames[2], c("coef", "sd", "pval"), sep = ".")
394     cat("\nSummary of regression coefficients: \n")
395     sreg <- cbind(sreg[1:3], "", sreg[4:6], "")
396     colnames(sreg)[c(4, 8)] <- " "
397     # Construct asterisks for p-values
398     pval1 <- as.numeric(sreg[, 3])
399     sreg[, 4] <- paste(ifelse(pval1<.1, "*", ""), ifelse(pval1<.05, "*", ""),
400         ifelse(pval1<.01, "*", ""), sep = "")
401     sreg[!is.na(pval1) & pval1 < 1e-4, 3] <- "<1e-4"
402     pval2 <- as.numeric(sreg[, 7])
403     sreg[, 8] <- paste(ifelse(pval2<.1, "*", ""), ifelse(pval2<.05, "*", ""),
404         ifelse(pval2<.01, "*", ""), sep = "")
405     sreg[!is.na(pval2) & pval2 < 1e-4, 7] <- "<1e-4"
406     for(ind in 1:dim(sreg)[2]) {
407         fixrow <- grep("NA", sreg[, ind]); 
408         if(length(fixrow) > 0) sreg[fixrow, ind] <- ""
409     }
410     print(sreg, ...)
411     # Print dispersion coefficients
412     cat("\nSummary of dispersion coefficients: \n")
413     sdisp <- data.frame(sdisp);colnames(sdisp) <- " "
414     rownames(sdisp)[c(1, 3)] <- paste("var", processnames[1],
415         c("clust", "subj"), sep = ".")
416     rownames(sdisp)[c(2, 4)] <- paste("var", processnames[2],
417         c("clust", "subj"), sep = ".")
418     rownames(sdisp)[c(5, 6)] <- c("covariance", "correlation")
419     print(sdisp, ...)
420     invisible(x)
421 }