nSpectralDensities {BioNetStat} | R Documentation

## Spectral Density functions of n graphs

### Description

Returns the spectral densities for a list of adjacency matrices at the same points

### Usage

    nSpectralDensities(A, from = NULL, to = NULL, bandwidth = "Silverman")

### Arguments

`A` | a list of adjacency matrices
`from` | the lower value used to build the distribution
`to` | the higher value used to build the distribution
`bandwidth` | a parameters. It can be set to either "Sturges" or "Silverman".

### Value

a list containing the components 'x' and 'densities'. The first element is the vector 'x' of 'npoints' coordinates of the points where the density function i estimated, and the second is a vector 'y' of the estimated density values.

### See Also

`KLdegree`

`density`

### Examples

    A<-list()
    A[[1]]<-as.matrix(as_adj(erdos.renyi.game(30,0.6,directed = FALSE)))
    A[[2]]<-as.matrix(as_adj(barabasi.game(30,power = 1,directed = FALSE)))
    A[[3]]<-as.matrix(as_adj(watts.strogatz.game(1,30,2,0.3)))
    d<-nSpectralDensities(A, bandwidth="Sturges")
    par(mfrow=c(1,3))
    plot(d$x,d$densities[,1],main="Erdos-Renyi\n Spectral distribution",
    xlab="Eigenvalue",ylab="Frequency")
    plot(d$x,d$densities[,2],main="Barabasi\n Spectral distribution",
    xlab="Eigenvalue",ylab="Frequency")
    plot(d$x,d$densities[,3],main="Watts-Strogatz\n Spectral distribution",
    xlab="Eigenvalue",ylab="Frequency")

[Package BioNetStat version 1.2.2 Index]