Description Usage Arguments Value Examples
View source: R/reputation_model.R
This takes a vector of P1-, P2-, and self-reports and builds a model of lavaan syntax for estimating the possible hearsay reputation parameters. Those parameters are:
hearsay consensus; the correlation between P1(T) & P2(T)
Intercept for P1(T)
Intercept for P2(T)
variance for P1(T)
variance for P2(T)
P1-P2 Relative Elevation (i.e., Mean P1(T) - Mean P2(T))
If n exchangeable triads > 1:
direct reciprocity; the correlation between opposit P1(T)s (e.g., A(C) <-> C(A))
hearsay reciprocity; the correlation between exchangeable P2(T)s (e.g., B(C) <-> D(A))
unnamed parameter; The correlation between P2(T) and the opposite P1(T) in a group. (e.g., B(C) <-> C(A))
The function can handle up to n exchangeable triads.
1 2 3 4 | rep_consensus_accuracy_builder(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)
|
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. This parameter rarely needs 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. |
The function returns a list containing an
object of class tbl_df
and a string object of the model
in lavaan syntax. Model information
includes the type of model, the number of exchangeable triads, and the number
of p1s per p2s, and the number of p2s per p1s, the number of p2s per target, and the number of targets per p2s,
the number of targets per p1s, and the number of p1s per target.
1 2 3 4 5 6 7 8 | 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"))
# view model
agree_con_acc_model$model
# View model information
agree_con_acc_model$rep_model_info
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.