rep_consensus_accuracy: Reputation Consensus & Accuracy Model

Description Usage Arguments Value Examples

View source: R/reputation_model.R

Description

This takes a dataset containing P1-, P2-, and target self-reports and either the names of columns containing those reports or a model from one of the ReputationModelR model builder function, and fits a model estimating the possible hearsay reputation parameters. Those parameters are:

hc

hearsay consensus; the correlation between P1(T) & P2(T)

ha

hearsay accuracy; the correation between P2(T) & T(T)

da

direct accuracy; the correlation between P1(T) & T(T)

int_p1

Intercept for P1(T)

int_p2

Intercept for P2(T)

int_self

Intercept for T(T)

v_p1

variance for P1(T)

v_p2

variance for P2(T)

v_self

variance for T(T)

p1_p2_rel_el

P1-P2 Relative Elevation (i.e., Mean P1(T) - Mean P2(T))

self_p2_rel_el

Self-P2 Relative Elevation (i.e., Mean T(T) - Mean P2(T))

self_p1_rel_el

Self-P1 Relative Elevation (i.e., Mean T(T) - Mean P1(T))

If n exchangeable triads > 1:

rec

direct reciprocity; the correlation between opposit P1(T)s (e.g., A(C) <-> C(A))

h

hearsay reciprocity; the correlation between exchangeable P2(T)s (e.g., B(C) <-> D(A))

m

unnamed parameter; The correlation between P2(T) and the opposite P1(T) in a group. (e.g., B(C) <-> C(A))

tru_sim

True Similarity; the correlation between targets' self-reports. (e.g., A(A) <-> C(C))

as_sim_3p

Third-person assumed similarity; correlation between P2(T) and P1's self-report (e.g., B(C) <- A(A))

as_sim_1p

First-person assumed similarity (i.e., interpersonal assumed similarity); correlation betweenP1(T) and P1's self-report (e.g., A(C) <-> A(A))

The function can handle up to n exchangeable triads.

Usage

1
2
3
4
rep_consensus_accuracy(data, model = NULL, p1_reports, p2_reports,
  target_self, n_triads = length(p1_reports), n_p1s_per_p2s = 1,
  n_p2s_per_p1s = 1, n_p1s_per_ts = 1, n_p2s_per_ts = 1,
  n_ts_per_p1s = 1, n_ts_per_p2s = 1)

Arguments

data

The dataframe. Data should be wide, with a row for every group of participants. At a minimum, it must contain three columns: one for P1-reports, one for P2-reports, and one for targets' self-ratings.

model

Optional. A model from the corresponding ReputationModelR model builder function. If this is supplied, no additional arguments need to be specified.

p1_reports

Quoted column names that contain P1 reports, or ratings made by the person that knows the target directly. If more than one is supplied, the target-wise order must match the other rating types.

p2_reports

Quoted column names that contain P2 reports, or ratings made by the person that knows the target indirectly through the corresponding P1. If more than one is supplied, the target-wise order must match the other rating types.

target_self

Quoted column names that contain target self-reports. If more than one is supplied, the target-wise order must match the other rating types.

n_triads

The number of exchangeable triads in each group. By default, this is determined by counting the number of P1 reports. It is rare that this parameter would need to be changed.

n_p1s_per_p2s

The number of P1s for every P2. This defaults to 1. Currently, only values of 1 are supported.

n_p2s_per_p1s

The number of P2s for every P1;. This defaults to 1. Currently, only values of 1 are supported.

n_p1s_per_ts

The number of P1s for every target;. This defaults to 1. Currently, only values of 1 are supported.

n_p2s_per_ts

The number of P2s for every target;. This defaults to 1. Currently, only values of 1 are supported.

n_ts_per_p1s

The number of targets for every P1;. This defaults to 1. Currently, only values of 1 are supported.

n_ts_per_p2s

The number of targets for every P2;. This defaults to 1. Currently, only values of 1 are supported.

Value

The function returns an object of class lavaan.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("rep_sim_data")
          agree_con_acc <- rep_consensus_accuracy(data = rep_sim_data,
                                                  p1_reports = c("A_C_agreeableness", "C_A_agreeableness"),
                                                  p2_reports = c("B_C_agreeableness", "D_A_agreeableness"),
                                                  target_self = c("C_C_agreeableness", "A_A_agreeableness"))
         # alternatively
         agree_con_acc_model <- rep_consensus_accuracy_builder(p1_reports = c("A_C_agreeableness", "C_A_agreeableness"),
                                                                   p2_reports = c("B_C_agreeableness", "D_A_agreeableness"),
                                                                   target_self = c("C_C_agreeableness", "A_A_agreeableness"))

         agree_con_acc <- rep_consensus_accuracy(data = rep_sim_data,
                                                 model = agree_con_acc_model)

Coryc3133/ReputationAnalyses documentation built on July 31, 2019, 8:35 a.m.