View source: R/control_intercor.R
control_intercor | R Documentation |
Control function to curate intercorrelations to be used in automatic compositing routine
control_intercor( rxyi = NULL, n = NULL, sample_id = NULL, construct_x = NULL, construct_y = NULL, construct_names = NULL, facet_x = NULL, facet_y = NULL, intercor_vec = NULL, intercor_scalar = 0.5, dx = NULL, dy = NULL, p = 0.5, partial_intercor = FALSE, data = NULL, ... )
rxyi |
Vector or column name of observed correlations. |
n |
Vector or column name of sample sizes. |
sample_id |
Vector of identification labels for samples/studies in the meta-analysis. |
construct_x, construct_y |
Vector of construct names for constructs designated as "X" or "Y". |
construct_names |
Vector of all construct names to be included in the meta-analysis. |
facet_x, facet_y |
Vector of facet names for constructs designated as "X" or "Y". |
intercor_vec |
Named vector of pre-specified intercorrelations among measures of constructs in the meta-analysis. |
intercor_scalar |
Generic scalar intercorrelation that can stand in for unobserved or unspecified values. |
dx, dy |
d values corresponding to |
p |
Scalar or vector containing the proportions of group membership corresponding to the d values. |
partial_intercor |
For meta-analyses of d values only: Logical scalar, vector, or column corresponding to values in |
data |
Data frame containing columns whose names may be provided as arguments to vector arguments. |
... |
Further arguments to be passed to functions called within the meta-analysis. |
A vector of intercorrelations
## Create a dataset in which constructs correlate with themselves rxyi <- seq(.1, .5, length.out = 27) construct_x <- rep(rep(c("X", "Y", "Z"), 3), 3) construct_y <- c(rep("X", 9), rep("Y", 9), rep("Z", 9)) dat <- data.frame(rxyi = rxyi, construct_x = construct_x, construct_y = construct_y, stringsAsFactors = FALSE) dat <- rbind(cbind(sample_id = "Sample 1", dat), cbind(sample_id = "Sample 2", dat), cbind(sample_id = "Sample 3", dat)) ## Identify some constructs for which intercorrelations are not ## represented in the data object: construct_names = c("U", "V", "W") ## Specify some externally determined intercorrelations among measures: intercor_vec <- c(W = .4, X = .1) ## Specify a generic scalar intercorrelation that can stand in for missing values: intercor_scalar <- .5 control_intercor(rxyi = rxyi, sample_id = sample_id, construct_x = construct_x, construct_y = construct_y, construct_names = construct_names, intercor_vec = intercor_vec, intercor_scalar = intercor_scalar, data = dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.