logCoin: Networked log-linear models.

logCoinR Documentation

Networked log-linear models.

Description

logCoin produces a network object from loglinear models parameters.

Usage

logCoin(data, variables=names(data), exogenous=NULL, noFirstCat= NULL,
        weight=NULL, order= 2, pairwise=FALSE, twotails = FALSE,
        pmax = 0.05, frequency = FALSE, percentage = FALSE, 
        directed=FALSE, igraph=FALSE, ...)

Arguments

data

a data frame.

variables

a vector of names of variables included in the previous data frame.

exogenous

a vector of names of variables whose relations amongst them are of no interest. None by default.

noFirstCat

a vector of names of dichotomous variables to appear without the category (no characteristic).

weight

a vector of weights. Optimal for dataframed tables.

order

maximum order parameters to be included in the loglinear model (default=2)

pairwise

Pairwise mode of handling missing values if TRUE. Listwise by default.

twotails

Application of twotail tests to the parameters (default: FALSE, i.e., onetail)

pmax

maximum value of the statistic to include the edge in the list. By default is 0.05, but 0.5 is recommended if data has not been sampled.

frequency

a logical value true if frequencies are to be shown. Default=FALSE.

percentage

a logical value true if percentages are to be shown. Default=TRUE.

directed

includes arrows to the links (target would be the categories of first mention variables).

igraph

Produces an igraph object instead of a netCoin object if TRUE.

...

Any netCoin argument.

Value

This function creates a netCoin object (or igraph) and, if stated, a folder in the computer with an HTML document named index.html which contains the produced graph. This file can be directly opened with your browser and sent to a web server to work properly.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

References

Escobar, M. and Martinez-Uribe, L. (2020) Network Coincidence Analysis: The netCoin R Package. Journal of Statistical Software, 93, 1-32. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v093.i11")}.

Examples

# A n=1,000 sample from the European Social Survey.(Round 8, 2016)
data("ess")
logCoin(ess, c("Social participation", "Political participation"), 
  noFirstCat=c("Social participation", "Political participation"),  
  exogenous=c("Age", "Gender"),  weight = "cweight", 
  order=3, pmax=.05,percentage = TRUE, frequency = TRUE ) # network object

netCoin documentation built on March 31, 2023, 7:34 p.m.