Learn R Programming

SemNetCleaner (version 1.1.0)

equate: Equate Group Responses

Description

In general, this function serves as a wrapper for equate.multi. This function equates the responses between two binary response matrices (e.g., two groups) by only keeping the column names that match between both matrices.

Usage

equate(rmatA, rmatB)

Arguments

rmatA

Binary matrix. A textcleaner filtered response matrix for binary matrix A

rmatB

Binary matrix. A textcleaner filtered response matrix for binary matrix B

Value

A list containing binary matrices that have matching column names (matching response):

rmatA

Binary matrix with matched responses for rmatA

rmatB

Binary matrix with matched responses for rmatB

Examples

Run this code
# NOT RUN {
# Toy example
raw <- open.animals[c(1:10),-c(1,2)]

# Clean and prepocess data
clean <- textcleaner(raw, partBY = "row", dictionary = "animals")

# Obtain binary data
bin <- clean$binary

# Finalize mat1
mat1 <- finalize(bin[c(1:5),])

# Finalize mat2
mat2 <- finalize(bin[c(6:10),])


# Equate mat1 and mat1
eq <- equate(mat1, mat2)

# Obtain respective equated response matrices
eq.mat1 <- eq$mat1
eq.mat2 <- eq$mat2

# }

Run the code above in your browser using DataLab