|
22 | 22 |
|
23 | 23 | #' Generate Crosswalk Table Function
|
24 | 24 | #'
|
25 |
| -#' Generate a crosswalk table for a list of instruments, given the similarity matrix that came out of the match function. |
26 |
| -#' A crosswalk is a list of pairs of variables from different studies that can be harmonised. |
| 25 | +#' This function generates a crosswalk table using a list of instruments and a similarity matrix, |
| 26 | +#' produced by the \code{\link{match_instruments}} function. |
27 | 27 | #'
|
| 28 | +#' @description |
| 29 | +#' A crosswalk is a table that lists matched variables from different studies or instruments, |
| 30 | +#' enabling data harmonization across datasets. |
| 31 | +#' |
| 32 | +#' @details |
| 33 | +#' A crosswalk is a mapping between conceptually similar items (e.g., survey questions or variables) |
| 34 | +#' from different instruments. It is used to identify and align comparable variables across datasets |
| 35 | +#' that use different formats or wordings. This is especially useful in meta-analysis, data integration, |
| 36 | +#' and comparative research, where consistent constructs need to be analyzed across multiple sources. |
| 37 | +#' |
| 38 | +#' The similarity matrix passed to this function is usually obtained from \code{\link{match_instruments}}. |
28 | 39 | #' @param instruments The original list of instruments, each containing a question. The sum of the number of questions in all instruments is the total number of questions which should equal both the width and height of the similarity matrix.
|
29 |
| -#' @param similarity The cosine similarity matrix from Harmony |
| 40 | +#' @param similarity The cosine similarity matrix that is outputed from the \code{\link{match_instruments}} function. |
30 | 41 | #' @param threshold The minimum threshold that we consider a match. This is applied to the absolute match value. So if a question pair has similarity 0.2 and threshold = 0.5, then that question pair will be excluded. Leave as None if you don't want to apply any thresholding.
|
31 | 42 | #' @param is_allow_within_instrument_matches Defaults to False. If this is set to True, we include crosswalk items that originate from the same instrument, which would otherwise be excluded by default.
|
32 | 43 | #' @param is_enforce_one_to_one Defaults to False. If this is set to True, we force all variables in the crosswalk table to be matched with exactly one other variable.
|
|
61 | 72 | #'
|
62 | 73 | #' @export
|
63 | 74 | #' @author Alex Nikic
|
| 75 | +#' @author Omar Hassoun |
64 | 76 |
|
65 | 77 |
|
66 | 78 | generate_crosswalk_table <- function(
|
|
0 commit comments