Skip to contents

Creates a conditional summary of the saturation point analysis performed by satpt().

Usage

# S3 method for class 'satpt'
summary(object, digits = max(3, getOption("digits") - 3), ...)

# S3 method for class 'summary.satpt'
print(x, ...)

Arguments

object

satpt object to be summarized.

digits

Minimal number of significant digits. Default is max(3, getOption("digits") - 3).

...

Additionally, arguments passed to base::print().

x

summary.satpt object to be printed.

Value

An object with S3 class "summary.satpt" containing 10 elements created by summary().

threshold

Saturation threshold applied to the standard errors of the sample proportions.

saturation

A character value indicating whether all response categories have achieved saturation given the defined threshold. The value of "Yes" indicates that saturation has been achieved while a value of "No" indicates that saturation was not achieved and more data is needed to achieve saturation.

which_saturation

A character value indicating which collection of responses within y determined saturation achievement. Generally, this is only of importance when examining select all apply questions.

n

Total number of observations with a response provided.

phat

A matrix containing the row-wise sample proportions for the observed contigency table. The values are formatted by digits.

se

A matrix containing the standard errors for the calculated sample proportions (phat). The values are formatted by digits.

pooled_se

A logical value indicating whether pooled standard errors were calculated due to the presence of response bias.

alpha

Significance level for test forindependence.

test

A htest object produced by stats::chisq.test() containing the results from the test for independence.

hindex

Heterogeneity index for the sample proportions calculated by mean absolute deviation. The values are formatted by digits if hindex is not NULL in object.

Details

For printing summary.satpt objects, the digits parameter does not need to be specified in print as summary() already takes care of the formatting of significant digits.

See also

Examples

# Creating an example, where response bias is present.

## Simulating data
prob <- matrix(
  data = c(0.4, 0.4, 0.2, 0.1, 0.1, 0.8),
  nrow = 2, ncol = 3, byrow = TRUE
)
catg <- LETTERS[1:3]
set.seed(123)
dat <- satpt::simulate(
  n = 1, size = c(200, 100), prob = prob, categories = catg
)

## Determining saturation with response bias and summarizing analysis
res <- satpt::satpt(y = dat$responses1, by = dat$period)
summary(object = res, digits = 3)
#> 
#> Saturation point analysis of sample proportions
#> ===============================================
#> 
#> Analysis based on: responses1 
#> Saturation achieved? No
#> Saturation threshold of 0.025
#> Responses collected from a sample size of 300
#> 
#> Data interval and overall sample proportions
#> ============================================
#>           y: responses1
#> by: period     A     B     C
#>    1       0.385 0.405 0.210
#>    2       0.150 0.050 0.800
#>    Overall 0.307 0.287 0.407
#> 
#> 
#> Data interval and overall standard errors
#> =========================================
#>           y: responses1
#> by: period     A     B     C
#>    1       0.034 0.035 0.029
#>    2       0.036 0.022 0.040
#>    Overall 0.026 0.024 0.023
#> 
#> Pooled standard errors?  Yes 
#> 
#> 	Pearson's Chi-squared test
#> 
#> data:  y: responses1 given by: period
#> X-squared = 98.379, df = 2, p-value < 2.2e-16
#> 
#> Response bias present? Yes
#> Significance level: 0.05
#> 
#> 
#> Heterogeneity index
#> ====================
#>  Categories Index
#>           A 0.118
#>           B 0.178
#>           C 0.295