varcomp {spmodel} | R Documentation |
Variability component comparison
Description
Compare the proportion of total variability explained by the fixed effects and each variance parameter.
Usage
varcomp(object, ...)
## S3 method for class 'splm'
varcomp(object, ...)
## S3 method for class 'spautor'
varcomp(object, ...)
## S3 method for class 'spglm'
varcomp(object, ...)
## S3 method for class 'spgautor'
varcomp(object, ...)
Arguments
object |
A fitted model object (e.g., from |
... |
Other arguments. Not used (needed for generic consistency). |
Value
A tibble that partitions the the total variability by the fixed effects
and each variance parameter. The proportion of variability explained by the
fixed effects is the pseudo R-squared obtained by psuedoR2()
. The
remaining proportion is spread accordingly among each variance parameter:
"de"
, "ie"
, and if random effects are used, each named random effect.
If spautor()
objects have unconnected sites, a list is returned with three elements:
"connected"
for a variability comparison among the connected sites;
"unconnected"
for a variability comparison among the unconnected
sites; and "ratio"
for the ratio of the variance of the connected
sites relative to the variance of the unconnected sites.
Examples
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
varcomp(spmod)