Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

funnelPlot

Plot function for a list of sienaFit objects


Description

Draws a funnel plot for a list of sienaFit objects that all have estimated the same parameter.

Usage

funnelPlot(anslist, k, threshold=NULL, origin=TRUE,
           plotAboveThreshold=TRUE, verbose=TRUE, ...)

Arguments

anslist

A list of object of class sienaFit.

k

The number of the parameter to be plotted.

threshold

threshold for standard errors: all estimations where the standard error for parameter k is larger than this threshold will be disregarded.

origin

Boolean: whether to include the origin in the plot, if all estimates have the same sign.

plotAboveThreshold

Boolean: whether to include the estimates for which the standard error is larger than threshold, and plot them with an asterisk at se=threshold.

verbose

Boolean: whether to report in the console all estimates omitted, because either their standard error is larger than threshold, or they were fixed.

...

For extra arguments (passed to plot).

Details

The function funnelPlot plots estimates against standard errors for a given effect k, with red reference lines added at the two-sided significance threshold 0.05. Effects for which a score test was requested are not plotted (and reported to the console if verbose).
If not all effects with number k are the same in all sienaFit objects, a warning is given. The effect name for the first object is used as the plot title.
Another funnel plot is available as print.sienaMeta.

Value

The two-column matrix of values of the plotted points is invisibly returned.

Author(s)

Tom Snijders

See Also

Examples

# A meta-analysis for three groups does not make much sense.
# 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 = NULL, nsub=1, n3=50, seed=123)
effects.1 <- getEffects(dataset.1)
effects.3 <- getEffects(dataset.3)
effects.4 <- getEffects(dataset.4)
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)
funnelPlot(list(ans.1, ans.3, ans.4), k=2)
funnelPlot(list(ans.1, ans.3, ans.4), k=2, origin=FALSE)

RSiena

Siena - Simulation Investigation for Empirical Network Analysis

v1.3.0
GPL-2 | GPL-3 | file LICENSE
Authors
Tom A.B. Snijders [cre, aut] (<https://orcid.org/0000-0003-3157-4157>), Ruth Ripley [aut], Christian Steglich [aut, ctb] (<https://orcid.org/0000-0002-9097-0873>), Johan Koskinen [aut, ctb] (<https://orcid.org/0000-0002-6860-325X>), Nynke Niezink [aut, ctb], Viviana Amati [aut, ctb] (<https://orcid.org/0000-0003-1190-1237>), Christoph Stadtfeld [ctb] (<https://orcid.org/0000-0002-2704-2134>), James Hollway [ctb] (IHEID, <https://orcid.org/0000-0002-8361-9647>), Per Block [ctb], Robert Krause [ctb], Charlotte Greenan [ctb], Josh Lospinoso [ctb], Michael Schweinberger [ctb] (<https://orcid.org/0000-0003-3649-5386>), Mark Huisman [ctb], Krists Boitmanis [ctr], Felix Schoenenberger [ctb], Mark Ortmann [ctb], Marion Hoffman [ctb], Robert Hellpap [ctb], Alvaro Uzaheta [ctb]
Initial release
2021-05-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.