GenerateDilsNetwork: Combine multiple networks into a single weighted network.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/GenerateDilsNetwork.R

Description

Use ScalablePCA to recover optimal weights for each network, then calculate the weighted average across networks for each edge.

Usage

1
2
3
  GenerateDilsNetwork(x, subsample = 10000,
    n.subsamples = 1000, ignore.cols, use.cols,
    progress.bar = FALSE)

Arguments

x

data.frame, data over which to run PCA

subsample

numeric or logical, If an integer, size of each subsample. If FALSE, runs PCA on entire data set.

n.subsamples

numeric, number of subsamples.

ignore.cols

numeric, indices of columns not to include

use.cols

numeric, indices of columns to use

progress.bar

logical, if TRUE then progress in running subsamples will be shown.

Value

A list

dils

vector, named vector of component weights for first dimension of principal component analysis (see example for comparison to prcomp).

dils.edgelist

Unused columns of x bound with the DILS scores on the right. Forms an edgelist if there were two unused columns and they containted the ids for the dyads.

coefficients

named vector, weights that genereate dils by taking dot-product with network data.

weights

named vector, raw.weights scaled by standard deviations of network edges, then scaled to sum to 1.

Author(s)

Stephen R. Haptonstahl srh@haptonstahl.org

References

https://github.com/shaptonstahl/

See Also

prcomp

Examples

1
2
3
data(iris)        # provides example data
GenerateDilsNetwork(iris, subsample=10, use.cols=1:4)
GenerateDilsNetwork(iris, subsample=10, ignore.cols=5)

dils documentation built on May 2, 2019, 8:28 a.m.