build_srm: Build Social Relations Model Function

Description Usage Arguments

View source: R/core_functions.R

Description

This function generates a string object corresponding to a social relations model in lavaan syntax. It requires a dataframe that contains columns for percever, target, and group ID variables and a rating variable. It does not usually need to be called directly, but is used in other functions.

Usage

1
build_srm(data, perceiver_id, target_id, group_id, rating)

Arguments

data

The dataframe. It must contain columns for percever, target, and group ID variables and a rating variable. It should be in long format such that each row is a rating by a perceiver for a given target in a given group.

perceiver_id

A quoted string with the name of the column containing perceiver IDs. Perceiver IDs should be recycled across groups (i.e., each group should have perceiver 1 to i where i is the number of participants per group). It can either be a number of a character string.

target_id

A quoted string with the name of the column containing target IDs. target IDs should be recycled across groups (i.e., each group should have perceiver 1 to i where i is the number of participants per group). It can either be a number of a character string.

group_id

A quoted string with the name of the column containing group IDs.It can either be a number of a character string.

rating

A quoted string with the name of the column that contains ratings.


Coryc3133/srmRsa documentation built on Dec. 31, 2020, 11:51 a.m.