degroot: Calculates the simple weighted avergaging model

Description Usage Arguments Details Value Note

View source: R/degroot.R

Description

Calculates the simple weighted avergaging model

Usage

1
2
degroot(W, Y, iterations, all.iter = F, row.normalize = T,
  self.weight = 1)

Arguments

W:

the weight matrix to use

Y:

the starting positions to use

iterations:

the number of iterations to take

all.iter:

T/F of whether all the iterations are returned in a matrix

row.normalize:

T/F indicator of whether the matrix should be row normalized before using

self.weight:

numeric value(s) in [0, 1], indicating how much each person weights him-/herself vs. others. 0 indicates full self-weight, and 1 indicates full other-weight. Only used if row.normalize is TRUE.

Details

Uses the DeGroot weighted averaging model, which just returns (W ^ iterations) 1 and divide each row by it's sum. Otherwise, throw a warning if each row doesn't sum to 1.

Value

A vector with the weighted average taken (iter) times

Note

Do NOT use DTMC for this – DTMC requires that the Y variable sum to 1.


jcfisher/latentnetDiffusion documentation built on May 20, 2019, 5:26 p.m.