print.ridit: Print Output of Ridit analysis

Description Usage Arguments Author(s) Examples

Description

Print Output of Ridit analysis

Usage

1
2
3
#print.ridit(x, ...)
## S3 method for class 'ridit'
print(x,g,...)

Arguments

x

a numeric vector of data values or a matrix of crosstab data.

g

a vector giving group of data or when x is a crosstab, number 1 or 2 when group is in the row or column of crosstab.

...

a optional text corresponds to label or code of arbitrary reference group or a number corresponds to row of group in output (when we want change reference group of output). Also user can enter an arbitrary numeric vector as reference group. Default is Null that used for total of all group as reference (special case that equivalent to the Kruskal-Wallis test).

Author(s)

SeyedMahmood TaghaviShahri

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, ...) 
{
    cat("\n")
    cat("Ridit Analysis:")
    cat("\n")
    cat("\n")
    m = max(nchar(names(x$MeanRidit)))
    cutpoint = 40
    if (m > cutpoint) 
        m = cutpoint
    cat("Group", "\t", format("Label", width = m), "\t", "Mean Ridit", 
        "\n", sep = "")
    cat("-----", "\t", format("-----", width = m), "\t", "----------", 
        "\n", sep = "")
    for (k in 1:length(x$MeanRidit)) cat(k, "\t", format(substr(names(x$MeanRidit)[k], 
        start = 1, stop = m), width = m), "\t", round(x$MeanRidit, 
        4)[k], "\n", sep = "")
    cat("\n")
    cat(x$msg, "\n")
    cat("chi-squared = ", round(x$TestStatistic, 4), sep = "")
    cat(", df = ", x$df, sep = "")
    cat(", p-value = ", format(x$Sig, digits = 4), sep = "")
    cat("\n")
    cat("\n")
  }

Example output

function (x, ...) 
{
    cat("\n")
    cat("Ridit Analysis:")
    cat("\n")
    cat("\n")
    m = max(nchar(names(x$MeanRidit)))
    cutpoint = 40
    if (m > cutpoint) 
        m = cutpoint
    cat("Group", "\t", format("Label", width = m), "\t", "Mean Ridit", 
        "\n", sep = "")
    cat("-----", "\t", format("-----", width = m), "\t", "----------", 
        "\n", sep = "")
    for (k in 1:length(x$MeanRidit)) cat(k, "\t", format(substr(names(x$MeanRidit)[k], 
        start = 1, stop = m), width = m), "\t", round(x$MeanRidit, 
        4)[k], "\n", sep = "")
    cat("\n")
    cat(x$msg, "\n")
    cat("chi-squared = ", round(x$TestStatistic, 4), sep = "")
    cat(", df = ", x$df, sep = "")
    cat(", p-value = ", format(x$Sig, digits = 4), sep = "")
    cat("\n")
    cat("\n")
}

Ridit documentation built on May 1, 2019, 8:21 p.m.