Learn R Programming

egonet (version 1.0)

index.egonet: Compute Burt's indexes (effective size and aggregate constraint) and other measure from sna package

Description

Compute Burt's indexes (effective size and aggregate constraint) and other measure from sna package. It also allow to restrict the analysis to one social circle identified by the name of the alters.

Usage

index.egonet(dat, index = list("effsize", "constraint", "outdegree", "indegree", "efficiency", "hierarchy", "centralization", "gden", "ego.gden"), subset = NULL, ego.name = "EGO")

Arguments

dat
graph to be analyzed having row and column names in the same order.
index
is a list containing prespecified index functions. effsize and constraint are defined in as in Burt (1992) \ outdegree and indegree make a call of degree(dat, cmode="outdegree") and
subset
Restricts the analysis to the nodes with at least one among the elements of vector in the name. If vector = NULL - the default - all the nodes of the graph are comprised.
ego.name
column and row name given to the ego subject. The default is EGO

Value

    Examples

    Run this code
    # make a toy dataset
    egomat <-  matrix(c(0,1,1,1,0,0,1,0,0),3,3)
    colnames(egomat) <- rownames(egomat) <- c("EGO", "1P", "1A")
    
    index.egonet(egomat)
    
    # an example with self defined index 
    my.outdegree <- function(dat) degree(dat,cmod="outdegree")[1]
    index.egonet(egomat,index=c("effsize","constraint","outdegree","indegree","efficiency", "centralization", "gden", "ego.gden", my.outdegree=call("my.outdegree",dat=egomat)))
    
    #Restricts the \code{outdegree} and \code{efficiency} to "EGO" and nodes with "P" in the name
    index.egonet(egomat,index=c("outdegree","efficiency"),subset="P")

    Run the code above in your browser using DataLab