Learn R Programming

sdsfun (version 0.8.0)

cor_test: (partial) correlation test

Description

(partial) correlation test

Usage

cor_test(x, y, z = NULL, level = 0.05)

Value

A numeric vector

Arguments

x

A numeric vector representing the first variable.

y

A numeric vector representing the second variable.

z

An optional numeric vector or matrix of control variables. If provided, partial correlation is computed.

level

(optional) Significance level. Default is 0.05.

Examples

Run this code
gzma = sf::read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
cor_test(gzma$PS_Score,gzma$EL_Score)

Run the code above in your browser using DataLab