Last data update: 2014.03.03

R: Comparaison de deux coefficients de correlation
cor2.test.2.sampleR Documentation

Comparaison de deux coefficients de correlation

Description

Test de l'égalité de deux coefficients de corrélation

Usage

cor2.test.2.sample(x1, y1, x2, y2, alternative = c("two.sided", "less", "greater"))

Arguments

x1

x1 vecteur numérique associé à y1

y1

y1 vecteur numérique associé à x1

x2

x2 vecteur numérique associé à y2

y2

y2 vecteur numérique associé à x2

alternative

Hypothèse alternative du test. Trois tests sont possibles: bilatéral ("two.sided"), unilatéral inférieur ("less"), unilatéral supérieur ("greater"). Par défaut c'est l'hypothèse "two.sided"

Value

Retourne une liste contenant

statistic

La valeur de la statistique de test

p.value

La valeur-p du test

Author(s)

Lafaye de Micheaux Pierre <lafaye@dms.umontreal.ca>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <benoit.liquet@isped.u-bordeaux2.fr>

References

Chapitre 11 (Intervalles de confiance et tests d'hypothèses) du livre: Le logiciel R, Maitriser le langage, Effectuer des analyses statistiques

See Also

cor0.test

Examples

data(IMC.ENFANT)
attach(IMC.ENFANT)
indf <- which(SEXE=="F")  # Permet de recuperer les indices des filles.
indg <- which(SEXE=="G")  # Permet de recuperer les indices des garcons.
cor2.test.2.sample(taille[indf],poids[indf],taille[indg],poids[indg])
detach(IMC.ENFANT)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LeLogicielR)
Loading required package: xtable
Loading required package: RColorBrewer
Loading required package: gdata
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

Loading required package: IndependenceTests
LeLogicielRPackageFunctions and datasets to accompany the book "Le logiciel R:
Maitriser le langage, Effectuer des analyses statistiques"
(french)1.22012-04-20Lafaye de Micheaux Pierre, Drouilhet Remy, Liquet BenoitP Lafaye de Micheaux <lafaye@dms.umontreal.ca>This package provides functions and datasets for the
        reader of the book "Le logiciel R: Maitriser le langage,
        Effectuer des analyse statistiques". The documentation and help
        pages are written in french.frGPL (>= 2)yesxtable, RColorBrewer, gdata, IndependenceTestslatin12012-12-15 14:37:01 UTC; lafayeCRAN2012-12-15 15:55:07R 3.3.1; x86_64-pc-linux-gnu; 2016-07-02 01:51:13 UTC; unix
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LeLogicielR/cor2.test.2.sample.Rd_%03d_medium.png", width=480, height=480)
> ### Name: cor2.test.2.sample
> ### Title: Comparaison de deux coefficients de correlation
> ### Aliases: cor2.test.2.sample
> 
> ### ** Examples
> 
> data(IMC.ENFANT)
> attach(IMC.ENFANT)
> indf <- which(SEXE=="F")  # Permet de recuperer les indices des filles.
> indg <- which(SEXE=="G")  # Permet de recuperer les indices des garcons.
> cor2.test.2.sample(taille[indf],poids[indf],taille[indg],poids[indg])
$statistic
[1] -1.67379

$p.value
[1] 0.09417185

> detach(IMC.ENFANT)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>