Usage
opt.random.par(M, k, n = NULL, rep, return.all = FALSE,
return.err = TRUE, maxiter = 50, m = NULL, approach,
trace.iter = FALSE, switch.names = NULL,
save.initial.param = TRUE, skip.par = NULL,
save.checked.par = TRUE,
merge.save.skip.par = any(!is.null(skip.par), save.checked.par),
skip.allready.checked.par = TRUE, check.skip = "iter",
print.iter = FALSE, max.iden = 10, seed = NULL,
parGenFun = genRandomPar, mingr = 1, maxgr = Inf,
addParam = list(genPajekPar = TRUE, probGenMech = NULL),
maxTriesToFindNewPar = rep * 10, ...)
opt.these.par(M, partitions, return.all = FALSE, return.err = TRUE,
skip.allready.checked.par = TRUE, maxiter = 50, m = NULL,
approach, trace.iter = FALSE, switch.names = TRUE,
save.initial.param = TRUE, skip.par = NULL,
save.checked.par = !is.null(skip.par),
merge.save.skip.par = all(!is.null(skip.par), save.checked.par),
check.skip = "never", print.iter = FALSE, ...)
Arguments
M
A matrix representing the (usually valued) network. For now, only one-relational networks are supported. The network can have one or more modes (diferent kinds of units with no ties among themselvs. If the network is not two-mode, the matrix must be squar
k
The number of clustrs used in generation of partitions.
n
The vector of the number of units in each mode (only necessary if mode is larger than 2.
rep
The number of repetitions/different starting partitions to check.
partitions
A list of partitions. Each unique value represents one cluster. If the nework is one-mode, than this should be a vector, else a list of vectors, one for each mode.
return.all
If FALSE, solution for only the best (one or more) partition/s is/are returned.
return.err
Should the error for each optimized partition be returned
maxiter
Maximum number of iterations
m
Suficient value for individual cells for valued approach. Can be a number or a character string giving the name of a function. Set to "max" for implicit approach.
approach
One of the approaches described in Žiberna (2007). Possible values are:
"bin" - binary blockmodeling,
"val" - valued blockmodeling,
"imp" - implicit blockmodeling,
"ss" - sum of squares homogenity blockmodeling, and
"ad" - absolute deviations homogenity b
trace.iter
Should the result of each iteration (and not only of the best one) be saved
switch.names
Should partitions that differ only in diferent names of positions be treated as different. It should be set to TRUE only if a asymetric blockmodel via BLOCKS is specified.
save.initial.param
Should the inital parameters (approach,...) be saved
skip.par
The partitions that are not allowed or were already checked and should therfire be skiped.
save.checked.par
Should the checked partitions be saved. For example, so that they can be used in the next call as skip.par
merge.save.skip.par
Should the checked partitions be merged with skiped ones?
skip.allready.checked.par
If TRUE,the partitions that were already checked when runing opt.par form different statrting points will be skiped.
check.skip
When should the check be preformed:
"all" - before every call to 'crit.fun' (Time demanding)
"iter" - at the end of eack iteratiton
"opt.par" - before every call to opt.par, when starting the optimization of a new partition.
"never" - never
print.iter
Should the progress of each iteration be printed?
max.iden
The maximum number of results that should be saved (in case there are more than max.iden results with minimal error, only the first max.iden will be saved).
seed
Optional. The seed for random generation of partitions.
parGenFun
The fucntion (object) that will generate rendom partitions. The deault fuction is genRandomPar. The function has to accept the following parameters: k (number of partitions by modes, n (number of units mingr
Minimal alowed group size
maxgr
Maximal alowed group size
addParam
A list of additional parameters for function specified above. In the usage section they are specified for the dthe default function genRandomPar: maxTriesToFindNewPar
The maximum number of partition try when trying to find a new partition to optimize that was not yet checked before - the default value is rep*1000
...
Argumets passed to other functions, see crit.fun