correlation_kim {kim} | R Documentation |
Estimate the correlation between two variables
Description
Estimate the correlation between two variables
Usage
correlation_kim(
x = NULL,
y = NULL,
data = NULL,
x_var_name = NULL,
y_var_name = NULL,
ci_range = 0.95,
round_r = 2,
round_p = 3,
output_type = "summary"
)
Arguments
x |
a numeric vector of data values |
y |
a numeric vector of data values |
data |
(optional) a data object (a data frame or a data.table) |
x_var_name |
(optional) name of the first variable (if using a data set as an input) |
y_var_name |
(optional) name of the second variable (if using a data set as an input) |
ci_range |
range of the confidence interval for the correlation
coefficient. If |
round_r |
number of decimal places to which to round correlation coefficients (default = 2) |
round_p |
number of decimal places to which to round p-values (default = 3) |
output_type |
type of the output. If |
Examples
## Not run:
correlation_kim(x = 1:4, y = c(1, 3, 2, 4))
correlation_kim(x = 1:4, y = c(1, 3, 2, 4), ci_range = FALSE)
# output as a data table
correlation_kim(x = 1:4, y = c(1, 3, 2, 4), output_type = "dt")
## End(Not run)