Last data update: 2014.03.03

R: Test du coefficient de correlation
cor0.testR Documentation

Test du coefficient de correlation

Description

Test du coefficient de corrélation entre deux variables quantitatives

Usage

cor0.test(x, y, rho0 = 0, alternative = c("two.sided", "less", "greater"))

Arguments

x

un vecteur numérique

y

est un vecteur numérique

rho0

réel indiquant la valeur du coefficient de corrélation pour l'hypothèse nulle. Par défaut rho0 vaut 0

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 :

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

cor.test

Examples

data(IMC.ENFANT)
attach(IMC.ENFANT)
cor0.test(poids,taille)
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/cor0.test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: cor0.test
> ### Title: Test du coefficient de correlation
> ### Aliases: cor0.test
> 
> ### ** Examples
> 
> data(IMC.ENFANT)
> attach(IMC.ENFANT)
> cor0.test(poids,taille)
$statistic
[1] 11.57396

$p.value
[1] 5.584208e-31

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