R/print.stratified.pscore.R

Defines functions print.stratified.pscore

Documented in print.stratified.pscore

print.stratified.pscore <- function(x,
                                ...){

  object <- x
  
  cat("\n Stratified by: ", object$stratified.by, "\n")

  cat("\n Strata information: \n\n")

  df <-
    data.frame(cbind(object$intervals,
                     as.numeric(table(object$stratum.index)),
                     round(as.numeric(table(object$stratum.index))/dim(object$data)[1],3)))
  
  colnames(df) <- c("  Strata bounds","    n","    n  (proportion)")

  print(df)

}

Try the nonrandom package in your browser

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

nonrandom documentation built on May 29, 2017, 11:41 p.m.