pairedm {stats4teaching} | R Documentation |
Paired measures (T-Test & Regression)
Description
Generates two paired measures. It provides T-test and a simple linear regression model for generated data.
Usage
pairedm(n, mean = 0, sigma = 1, coefvar = NULL,
rho = NULL, alternative = c("two.sided", "less", "greater"),
delta = 0, conf.level = 0.95, dec = 2,
random = FALSE)
Arguments
n |
size of each sample. |
mean |
vector of means. |
sigma |
vector of standard deviations. |
coefvar |
an optional vector of coefficients of variation. |
rho |
Pearson correlation coefficient (optional). If |
alternative |
a character string specifying the alternative hypothesis for T-Test. Must 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 for interval in T-Test. |
dec |
number of decimals for observations. |
random |
a logical a logical indicating whether you want a random covariance/variance matrix. |
Details
If random
= TRUE, rho
is omitted and sigma
is taken as range for variances of the covariance matrix.
Value
List containing the following components :
-
Data
: a data frame containing the samples created. -
Model
: linear regression model. -
T.Test
: a t-test for the samples.
See Also
[clusterGeneration::genpositiveDefMat()]
Examples
pairedm(10, mean = c(10,2), sigma = c(1.2,0.7), rho = 0.5, alternative = "g")
pairedm(15, mean =c(1,2), coefvar = 0.1, random = TRUE)