Description Usage Arguments Value
Plot variancecov matrix of random terms; also it is optional to simulate and
visualize data based on these varcov matrices. The input can be a communityPGLMM
model (by setting argument x
). If no model has been fitted, you can also specify
data, formula, and family, etc. without actually fitting the model, which will
save time.
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  pglmm_plot_ranef(
formula = NULL,
data = NULL,
family = "gaussian",
sp.var = "sp",
site.var = "site",
tree = NULL,
tree_site = NULL,
repulsion = FALSE,
x = NULL,
show.image = TRUE,
show.sim.image = FALSE,
random.effects = NULL,
add.tree.sp = TRUE,
add.tree.site = FALSE,
cov_ranef = NULL,
tree.panel.space = 0.5,
title.space = 5,
tree.size = 3,
...
)
communityPGLMM.show.re(
formula = NULL,
data = NULL,
family = "gaussian",
sp.var = "sp",
site.var = "site",
tree = NULL,
tree_site = NULL,
repulsion = FALSE,
x = NULL,
show.image = TRUE,
show.sim.image = FALSE,
random.effects = NULL,
add.tree.sp = TRUE,
add.tree.site = FALSE,
cov_ranef = NULL,
tree.panel.space = 0.5,
title.space = 5,
tree.size = 3,
...
)
pglmm_plot_re(
formula = NULL,
data = NULL,
family = "gaussian",
sp.var = "sp",
site.var = "site",
tree = NULL,
tree_site = NULL,
repulsion = FALSE,
x = NULL,
show.image = TRUE,
show.sim.image = FALSE,
random.effects = NULL,
add.tree.sp = TRUE,
add.tree.site = FALSE,
cov_ranef = NULL,
tree.panel.space = 0.5,
title.space = 5,
tree.size = 3,
...
)
communityPGLMM.plot.re(
formula = NULL,
data = NULL,
family = "gaussian",
sp.var = "sp",
site.var = "site",
tree = NULL,
tree_site = NULL,
repulsion = FALSE,
x = NULL,
show.image = TRUE,
show.sim.image = FALSE,
random.effects = NULL,
add.tree.sp = TRUE,
add.tree.site = FALSE,
cov_ranef = NULL,
tree.panel.space = 0.5,
title.space = 5,
tree.size = 3,
...
)

formula 
A twosided linear formula object describing the mixed effects of the model. To specify that a random term should have phylogenetic covariance matrix along
with nonphylogenetic one, add Note that correlated random terms are not allowed. For example,

data 
A 
family 
Either "gaussian" for a Linear Mixed Model, or
"binomial" or "poisson" for Generalized Linear Mixed Models.
"family" should be specified as a character string (i.e., quoted). For binomial and
Poisson data, we use the canonical logit and log link functions, respectively.
Binomial data can be either presence/absence, or a twocolumn array of 'successes' and 'failures'.
For both binomial and Poisson data, we add an observationlevel
random term by default via 
sp.var 
The variable name of "species"; yaxis of the image. 
site.var 
The variable name of "site"; xaxis of the image. 
tree 
A phylogeny for column sp, with "phylo" class, or a covariance matrix for sp.
Make sure to have all species in the matrix; if the matrix is not standardized,
(i.e., det(tree) != 1), 
tree_site 
A second phylogeny for "site". This is required only if the site column contains species instead of sites. This can be used for bipartitie questions; tree_site can also be a covariance matrix. Make sure to have all sites in the matrix; if the matrix is not standardized (i.e., det(tree_site) != 1), pglmm' will try to standardize it for you. No longer used: keep here for compatibility. 
repulsion 
When there are nested random terms specified, 
x 
A fitted model with class communityPGLMM. 
show.image 
Whether to show the images of random effects. 
show.sim.image 
Whether to show the images of simulated site by sp matrix. This can be useful to see how the phylogenetic information were included. 
random.effects 
Optional prebuild list of random effects. If 
add.tree.sp 
Whether to add a phylogeny of species at the top of the simulated site by sp matrix plot, default is TRUE. 
add.tree.site 
Whether to add a phylogeny of sites at the right of the simulated site by sp matrix plot, default is FALSE. 
cov_ranef 
A named list of covariance matrices of random terms. The names should be the
group variables that are used as random terms with specified covariance matrices
(without the two underscores, e.g. 
tree.panel.space 
The number of lines between the phylogeny and the matrix plot, if add.tree is TRUE. 
title.space 
The number of lines between the title and the matrix plot, if add.tree is TRUE. 
tree.size 
The height of the phylogeny to be plotted (number of lines), if add.tree is TRUE. 
... 
Additional arguments for

A hidden list, including the covariance matrices and simulated site by species matrices.
Individual plots are saved as plt_re_list
and plt_sim_list
. If show.image
or
show.sim.image
is TRUE, the corresponding final plot (plt_re_all_in_one
or
plt_sim_all_in_one
) can be saved as external file using ggplot2::ggsave
as
it is a grid object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.