R/print.augSIMEX.R

print.augSIMEX <-
function (x, digits = max(3, getOption("digits") - 3), 
          signif.stars = getOption("show.signif.stars"), ...) 
{   
    cat("\nCall:\n",
      paste(deparse(x$call), sep="\n", collapse = "\n"), "\n\n", sep="")
    cat("\nThe error-prone variable: ")
    cat(x$err.var, sep = ", ")
    cat("\nThe corresponding true variable: ")
    cat(x$err.true, sep = ", ")
    cat("\nNumber of simulations: ", x$B, sep = "")
    cat("\nNumber of iterations in bootstrap: ", x$nBoot, "\n\n", sep = "")
    
    if(length(x$coefficients) == 0L) {
      cat("\nNo Coefficients\n")
    } else {
      cat("\nCoefficients:\n")
      coefs <- x$coefficients
      print(coefs)
    }
    cat("\n")
    
    cat(apply(cbind(paste(format(c("Null","Residual"), justify="right"),
                          "deviance:"),
                    format(unlist(x[c("null.deviance","deviance")]),
                           digits = max(5L, digits + 1L)), " on",
                    format(unlist(x[c("df.null","df.residual")])),
                    " degrees of freedom\n"),
              1L, paste, collapse = " "), sep = "")
    if(nzchar(mess <- naprint(x$na.action))) cat("  (", mess, ")\n", sep = "")
    cat("AIC: ", format(x$aic, digits = max(4L, digits + 1L)),"\n\n",sep = "")
    ##
    cat("\n")
    invisible(x)
}

Try the augSIMEX package in your browser

Any scripts or data that you put into this service are public.

augSIMEX documentation built on April 23, 2020, 5:08 p.m.