Learn R Programming

dils (version 0.8.1)

GenerateDilsNetwork: Combine multiple networks into a single weighted network.

Description

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

Usage

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.

References

https://github.com/shaptonstahl/

See Also

prcomp

Examples

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

Run the code above in your browser using DataLab