1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/REGE.FC.R, R/REGE.FC.ow.R, R/REGE.R,
% R/REGE.ow.R, R/REGE_for.R
\encoding{UTF-8}
\name{REGE.FC}
\alias{REGE.FC}
\alias{REGE.FC.ow}
\alias{REGE}
\alias{REGE.ow}
\alias{REGE.for}
\alias{REGD.for}
\alias{REGE.ow.for}
\alias{REGD.ow.for}
\alias{REGE.ownm.for}
\alias{REGE.ownm.diag.for}
\alias{REGE.nm.for}
\alias{REGE.nm.diag.for}
\alias{REGE.ne.for}
\alias{REGE.ow.ne.for}
\alias{REGE.ownm.ne.for}
\alias{REGE.nm.ne.for}
\alias{REGD.ne.for}
\alias{REGD.ow.ne.for}
\title{REGE - Algorithms for compiting (dis)similarities in terms of regular equivalnece}
\usage{
REGE.FC(
M,
E = 1,
iter = 3,
until.change = TRUE,
use.diag = TRUE,
normE = FALSE
)
REGE.FC.ow(
M,
E = 1,
iter = 3,
until.change = TRUE,
use.diag = TRUE,
normE = FALSE
)
REGE(M, E = 1, iter = 3, until.change = TRUE, use.diag = TRUE)
REGE.ow(M, E = 1, iter = 3, until.change = TRUE, use.diag = TRUE)
REGE.for(M, iter = 3, E = 1)
REGD.for(M, iter = 3, E = 0)
REGE.ow.for(M, iter = 3, E = 1)
REGD.ow.for(M, iter = 3, E = 0)
REGE.ownm.for(M, iter = 3, E = 1)
REGE.ownm.diag.for(M, iter = 3, E = 1)
REGE.nm.for(M, iter = 3, E = 1)
REGE.nm.diag.for(M, iter = 3, E = 1)
REGE.ne.for(M, iter = 3, E = 1)
REGE.ow.ne.for(M, iter = 3, E = 1)
REGE.ownm.ne.for(M, iter = 3, E = 1)
REGE.nm.ne.for(M, iter = 3, E = 1)
REGD.ne.for(M, iter = 3, E = 0)
REGD.ow.ne.for(M, iter = 3, E = 0)
}
\arguments{
\item{M}{Matrix or a 3 dimensional array representing the network. The third dimension allows for several relations to be analyzed.}
\item{E}{Initial (dis)similarity in terms of regular equivalnece.}
\item{iter}{The desired number of iterations.}
\item{until.change}{Should the iterations be stopped when no change occurs.}
\item{use.diag}{Should the diagonal be used. If \code{FALSE}, all diagonal elements are set to 0.}
\item{normE}{Should the equivalence matrix be normalized after each iteration.}
}
\value{
\item{E}{A matrix of (dis)similarities in terms of regular equivalnece.}
\item{Eall}{An array of (dis)similarity matrices in terms of regular equivalence, each third dimension represets one iteration. For ".for" functions, only the initial and the final (dis)similarities are returned.}
\item{M}{Matrix or a 3 dimensional array representing the network used in the call.}
\item{iter}{The desired number of iterations.}
\item{use.diag}{Should the diagonal be used - for functions implemented in R only.}
...
}
\description{
REGE - Algorithms for compiting (dis)similarities in terms of regular equivalnece (White & Reitz, 1983).
\code{REGE, REGE.for} - Classical REGE or REGGE, as also implemented in Ucinet. Similarities in terms of regular equivalence are computed. The \code{REGE.for} is a wrapper for calling the FORTRAN subrutine written by White (1985a), modified to be called by R. The \code{REGE} does the same, however it is written in R. The functions with and without ".for" differ only in whether they are implemented in R of FORTRAN. Needless to say, the functions implemented in FORTRAN are much faster.
\code{REGE.ow, REGE.ow.for} - The above function, modified so that a best match is searched for each arc separately (and not for both arcs, if they exist, together).
\code{REGE.nm.for} - REGE or REGGE, modified to use row and column normalized matrices instead of the original matrix.
\code{REGE.ownm.for} - The above function, modified so that a best match for an outgoing ties is searched on row-normalized network and for incoming ties on column-normalized network.
\code{REGD.for} - REGD or REGDI, a dissimilarity version of the classical REGE or REGGE. Dissimilarities in terms of regular equivalence are computed. The \code{REGD.for} is a wrapper for calling the FORTRAN subroutine written by White (1985b), modified to be called by R.
\code{REGE.FC} - Actually an earlier version of REGE. The difference is in the denominator. See Žiberna (2007) for details.
\code{REGE.FC.ow} - The above function, modified so that a best match is searched for each arc separately (and not for both arcs, if they exist, together).
other - still in testing stage.
}
\examples{
n <- 20
net <- matrix(NA, ncol = n, nrow = n)
clu <- rep(1:2, times = c(5, 15))
tclu <- table(clu)
net[clu == 1, clu == 1] <- 0
net[clu == 1, clu == 2] <- rnorm(n = tclu[1] * tclu[2], mean = 4, sd = 1) * sample(c(0, 1),
size = tclu[1] * tclu[2], replace = TRUE, prob = c(3/5, 2/5))
net[clu == 2, clu == 1] <- 0
net[clu == 2, clu == 2] <- 0
D <- REGE.for(M = net)$E # Any other REGE function can be used
plot.mat(net, clu = cutree(hclust(d = as.dist(1 - D), method = "ward.D"),
k = 2))
# REGE returns similarities, which have to be converted to
# disimilarities
res <- optRandomParC(M = net, k = 2, rep = 10, approaches = "hom", homFun = "ss", blocks = "reg")
plot(res) # Hopefully we get the original partition
}
\references{
\enc{Žiberna, A.}{Ziberna, A.} (2008). Direct and indirect approaches to blockmodeling of valued networks in terms of regular equivalence. Journal of Mathematical Sociology, 32(1), 57-84. doi: 10.1080/00222500701790207
White, D. R., & Reitz, K. P. (1983). Graph and semigroup homomorphisms on networks of relations. Social Networks, 5(2), 193-234.
White, D. R.(1985a). DOUG WHITE'S REGULAR EQUIVALENCE PROGRAM. Retrieved from http://eclectic.ss.uci.edu/~drwhite/REGGE/REGGE.FOR
White, D. R. (1985b). DOUG WHITE'S REGULAR DISTANCES PROGRAM. Retrieved from http://eclectic.ss.uci.edu/~drwhite/REGGE/REGDI.FOR
White, D. R. (2005). REGGE. Retrieved from http://eclectic.ss.uci.edu/~drwhite/REGGE/
#' @author \enc{Aleš Žiberna}{Ales Ziberna} based on Douglas R. White's original REGE and REGD
}
\seealso{
\code{\link{sedist}}, \code{\link{critFunC}}, \code{\link{optParC}}, \code{\link{plot.mat}}
}
\keyword{cluster}
\keyword{graphs}
|