Learn R Programming

seqtest (version 0.1-0)

print.size: Print size object

Description

This function prints the size object

Usage

## S3 method for class 'size':
print(x, ...)

Arguments

x
size object.
...
further arguments passed to or from other methods.

References

Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.

See Also

size.mean, size.prop, size.cor

Examples

Run this code
#--------------------------------------
# Two-sided one-sample test
# theta = 0.5
# alpha = 0.05, beta = 0.2

n <- size.mean(theta = 0.5, sample = "one.sample",
               alternative = "two.sided", alpha = 0.05, beta = 0.2)

print(n)

#--------------------------------------
# Two-sided one-sample test
# H0: pi = 0.5, H1: pi != 0.5
# alpha = 0.05, beta = 0.2, delta = 0.2

n <- size.prop(delta = 0.2, pi = 0.5, sample = "one.sample",
               alternative = "two.sided", alpha = 0.05, beta = 0.2)

print(n)

#--------------------------------------
# H0: rho = 0.3, H1: rho != 0.3
# alpha = 0.05, beta = 0.2, delta = 0.2

n <- size.cor(delta = 0.2, rho = 0.3, alpha = 0.05, beta = 0.2)

print(n)

Run the code above in your browser using DataLab