Title: | Network Representations of Attitudes |
---|---|
Description: | A tool for computing network representations of attitudes, extracted from tabular data such as sociological surveys. Development of surveygraph software and training materials was initially funded by the European Union under the ERC Proof-of-concept programme (ERC, Attitude-Maps-4-All, project number: 101069264). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them. |
Authors: | Samuel Unicomb [aut, cre], Ana Jovancevic [aut], Caoimhe O'Reilly [aut], Alejandro Dinkelberg [aut], Pádraig MacCarron [aut], David O'Sullivan [aut], Paul Maher [aut], Mike Quayle [aut] |
Maintainer: | Samuel Unicomb <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3 |
Built: | 2025-02-16 05:32:14 UTC |
Source: | https://github.com/surveygraph/surveygraphr |
make_projection()
outputs the agent or symbolic network corresponding
to a survey, i.e. the row or column projection.
make_projection( data, layer = NULL, threshold_method = NULL, method_value = NULL, centre = NULL, dummycode = NULL, likert = NULL, mincomps = NULL, similarity_metric = NULL, verbose = NULL )
make_projection( data, layer = NULL, threshold_method = NULL, method_value = NULL, centre = NULL, dummycode = NULL, likert = NULL, mincomps = NULL, similarity_metric = NULL, verbose = NULL )
data |
A data frame corresponding to a survey |
layer |
A string flag specifying which layer to project
|
threshold_method |
A string flag specifying how edges are selected in the network representation.
|
method_value |
A utility variable that we interpret according to the
|
centre |
If |
dummycode |
flag that indicates whether we dummycode data. |
likert |
Specifies the range of the Likert scale contained in |
mincomps |
The minimum number of valid comparisons that must be
made when computing the similarity between rows or columns in the |
similarity_metric |
This currently has just one allowed value, namely the Manhattan distance, which is the default. |
verbose |
This is a debugging flag that prints out survey data after a pre-processing step, but before being supplied to the C++ routines that compute the network representation. |
A data frame corresponding to the edge list of the specified network. It contains three columns named
u
, the first node adjacent to the edge
v
, the second node adjacent to the edge, and
weight
, the similarity between nodes u
and v
S <- make_synthetic_data(20, 5)
S <- make_synthetic_data(20, 5)
make_synthetic_data()
outputs a synthetic survey, generated using a simple, stochastic
model of polarisation.
make_synthetic_data( nrow, ncol, minority = 0.5, polarisation = 0, correlation = 0.85, scale = 10 )
make_synthetic_data( nrow, ncol, minority = 0.5, polarisation = 0, correlation = 0.85, scale = 10 )
nrow |
The number of rows in the survey |
ncol |
The number of columns in the survey |
minority |
The fraction of nodes in the smaller of the two polarised groups |
polarisation |
The degree of polarisation among the system's agents |
correlation |
Probability that group item corresponds to polarisation |
scale |
Range of the Likert scale |
A data frame corresponding to a survey.
S <- make_synthetic_data(200, 8)
S <- make_synthetic_data(200, 8)
make_threshold_profile()
outputs properties of the agent or symbolic network
as a function of similarity threshold.
make_threshold_profile(data, layer)
make_threshold_profile(data, layer)
data |
A data frame corresponding to the attitudes held by agents with respect to a number of items |
layer |
A string flag specifying the type of network to be extracted,
|
Note that this routine is expensive on large graphs. We study networks over the
full range of similarity thresholds [-1, 1]
, and as a result, produce
networks that are complete at the lower limit of that range. Note that by default we
will subsample the provided survey with the C++ implementation in order to
avoid memory issues. We could then allow a flag that turns off the subsampling
step, at the user's peril.
A data frame containing properties of the agent
or symbolic
network as a
function of the similarity threshold. In particular, it contains three columns
named
threshold
, the value of the similarity threshold
ad
, the average degree resulting from threshold
, and
lcc
, the size of the largest connected component resulting from
threshold
S <- make_synthetic_data(20, 5)
S <- make_synthetic_data(20, 5)
This page is a work in progress.
The surveygraph package functions can be summarised as follows.
The reading functions import survey datasets to R so they can be passed to C++ routines. A bunch of file formats need to be accounted for.
The network functions are implemented in C++.
Maintainer: Samuel Unicomb [email protected]
Authors:
Ana Jovancevic
Caoimhe O'Reilly
Alejandro Dinkelberg
Pádraig MacCarron
David O'Sullivan
Paul Maher
Mike Quayle
Useful links:
Report bugs at https://github.com/surveygraph/surveygraphr/issues