Learn R Programming

rmcorr (version 0.7.0)

rmcorr_mat: Create a repeated measures correlation matrix.

Description

Create a repeated measures correlation matrix.

Usage

rmcorr_mat(participant, variables, dataset, CI.level = 0.95)

Value

A list with class "rmcmat" containing the following components.

matrix

the repeated measures correlation matrix

summary

a dataframe showing rmcorr stats for each pair of variables

models

a list of the full rmcorr model for each pair of variables

Arguments

participant

A variable giving the subject name/id for each observation.

variables

A character vector indicating the columns of variables to include in the correlation matrix.

dataset

The data frame containing the variables.

CI.level

The level of confidence intervals to use in the rmcorr models.

References

Bakdash, J.Z., & Marusich, L.R. (2017). Repeated Measures Correlation. Frontiers in Psychology, 8, 456. tools:::Rd_expr_doi("10.3389/fpsyg.2017.00456").

Bland, J.M., & Altman, D.G. (1995). Calculating correlation coefficients with repeated observations: Part 1 -- correlation within subjects. BMJ, 310, 446, tools:::Rd_expr_doi("https://doi.org/10.1136/bmj.310.6977.446").

Cohen, P., West, S. G., & Aiken, L. S. (2002). Applied multiple regression/correlation analysis for the behavioral sciences (3rd edition), Routledge. ISBN: 9780805822236.

See Also

rmcorr, plot.rmc

Examples

Run this code
dist_rmc_mat <- rmcorr_mat(participant = Subject, 
                           variables = c("Blindwalk Away",
                                         "Blindwalk Toward",
                                         "Triangulated BW",
                                         "Verbal",
                                         "Visual matching"),
                           dataset = twedt_dist_measures,
                           CI.level = 0.95)
plot(dist_rmc_mat$models[[2]])

Run the code above in your browser using DataLab