sample2indp {stats4teaching}R Documentation

Independent normal data

Description

Generates two normal independent samples. It also provides Cohen's effect and T-Test.

Usage

sample2indp(n , mean = 0, sigma = 1, coefvar = NULL,
            alternative = c("two.sided", "less", "greater"), delta = 0,
            conf.level = 0.95, dec = 2)

Arguments

n

vector of size of samples.

mean

vector of means.

sigma

vector of standard deviations.

coefvar

an optional vector of coefficients of variation.

alternative

a character string specifying the alternative hypothesis for T-Test. meanst be one of “two.sided“ (default), “greater“ or “less“. Can be specified just the initial letter.

delta

true value of the difference in means.

conf.level

confidence level of the interval. It determines level of significance for comparing variances.

dec

number of decimals for observations.

Details

If mean or sigma are not specified it's assumed the default values of 0 and 1.

n is a vector, so it's possible to generate samples with same or different sizes.

If coefvar is given, sigma is omitted. Vector of means cannot have any 0.

Value

A list containing the following components:

Examples

sample2indp(c(10,12),mean = c(2,3),coefvar = c(0.3,0.5), alternative = "less", delta = -1)

sample2indp(8,sigma = c(1,1.5), dec = 3)


[Package stats4teaching version 0.1.0 Index]