print.sienaMeta: Methods for processing sienaMeta objects

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/siena08.r

Description

print, summary, and plot methods for sienaMeta objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'sienaMeta'
print(x, file=FALSE, reportEstimates=FALSE, ...)

## S3 method for class 'sienaMeta'
summary(object, file=FALSE, extra=TRUE, ...)

## S3 method for class 'summary.sienaMeta'
print(x, file=FALSE, extra=TRUE, ...)

## S3 method for class 'sienaMeta'
plot(x, ..., which = 1:length(x$theta),
                         useBound=TRUE, layout = c(2,2))

Arguments

object

An object of class sienaMeta.

x

An object of class sienaMeta, or summary.sienaMeta as appropriate.

file

Boolean: if TRUE, sends output to file named x$projname.txt. If FALSE, output is to the terminal.

reportEstimates

Boolean: whether to report all estimates and standard errors.

extra

Boolean: if TRUE, prints more information.

which

Set of effects contained in the plot (given by sequence numbers).

useBound

Boolean: whether to restict plotted symbols to the bound used in the call of siena08.

layout

Vector giving number of rows and columns in the arrangement of the several panels in a rectangular array, possibly spanning multiple pages.

...

For extra arguments (none used at present).

Value

The function print.sienaMeta prints details of the merged estimates of the meta-analysis carried out by siena08, with test statistics. See the help page for siena08 for what is produced by this function.

The function summary.sienaMeta prints details as for the print method, but also details of the sienaFit objects included.

Output from either can be directed to a file by using the argument file. It will be appended to any existing file of the same name: projname.txt where projname is the value of the argument to siena08.

The function plot.sienaMeta plots estimates against standard errors for each effect, with reference lines added at the two-sided significance threshold 0.05. It returns an object of class trellis, of the lattice.package. Effects for which a score test was requested are not plotted.

Author(s)

Ruth Ripley, Tom Snijders

References

T. A. B. Snijders and Chris Baerveldt. "Multilevel network study of the effects of delinquent behavior on friendship evolution". Journal of Mathematical Sociology, 27: 123–151, 2003.

See also the Siena manual and http://www.stats.ox.ac.uk/~snijders/siena/

See Also

siena08

Examples

 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
## Not run: 
# A meta-analysis for three groups does not make much sense
# for generalizing to a population of networks,
# but it the Fisher combinations of p-values are meaningful.
# But using three groups shows the idea.

Group1 <- sienaDependent(array(c(N3401, HN3401), dim=c(45, 45, 2)))
Group3 <- sienaDependent(array(c(N3403, HN3403), dim=c(37, 37, 2)))
Group4 <- sienaDependent(array(c(N3404, HN3404), dim=c(33, 33, 2)))
dataset.1 <- sienaDataCreate(Friends = Group1)
dataset.3 <- sienaDataCreate(Friends = Group3)
dataset.4 <- sienaDataCreate(Friends = Group4)
OneAlgorithm <- sienaAlgorithmCreate(projname = "SingleGroups")
effects.1 <- getEffects(dataset.1)
effects.3 <- getEffects(dataset.3)
effects.4 <- getEffects(dataset.4)
effects.1 <- includeEffects(effects.1, transTrip)
effects.1 <- setEffect(effects.1, transRecTrip, fix=TRUE, test=TRUE)
effects.3 <- includeEffects(effects.3, transTrip)
effects.3 <- setEffect(effects.3, transRecTrip, fix=TRUE, test=TRUE)
effects.4 <- includeEffects(effects.4, transTrip)
effects.4 <- setEffect(effects.4, transRecTrip, fix=TRUE, test=TRUE)
ans.1 <- siena07(OneAlgorithm, data=dataset.1, effects=effects.1, batch=TRUE)
ans.3 <- siena07(OneAlgorithm, data=dataset.3, effects=effects.3, batch=TRUE)
ans.4 <- siena07(OneAlgorithm, data=dataset.4, effects=effects.4, batch=TRUE)
ans.1
ans.3
ans.4
meta <- siena08(ans.1, ans.3, ans.4)
print(meta, reportEstimates=FALSE)
print(meta)
summary(meta)
# For specifically presenting the Fisher combinations:
# First determine the number of estimated effects:
(neff <- sum(sapply(meta, function(x){ifelse(is.list(x),!is.null(x$cjplus),FALSE)})))
Fishers <- t(sapply(1:neff,
        function(i){c(meta[[i]]$cjplus, meta[[i]]$cjminus,
                        meta[[i]]$cjplusp, meta[[i]]$cjminusp, 2*meta[[i]]$n1 )}))
Fishers <- as.data.frame(Fishers, row.names=names(meta)[1:neff])
names(Fishers) <- c('Fplus', 'Fminus', 'pplus', 'pminus', 'df')
Fishers
# For plotting:
plo <- plot(meta, layout=c(3,1))
plo
plo[3]
# Show effects of bound (bounding at 0.4 is not reasonable, just for example)
meta <- siena08(ans.1, ans.3, ans.4, bound=0.4)
plot(meta, which=c(2,3), layout=c(2,1))
plot(meta, which=c(2,3), layout=c(2,1), useBound=FALSE)

## End(Not run)

RSienaTest documentation built on July 14, 2021, 3 a.m.