Compare the proportion of total variability explained by the fixed effects and each variance parameter.

## Usage

```
varcomp(object, ...)
# S3 method for splm
varcomp(object, ...)
# S3 method for spautor
varcomp(object, ...)
# S3 method for spglm
varcomp(object, ...)
# S3 method for spgautor
varcomp(object, ...)
```

## Arguments

- object
A fitted model object (e.g., from

`splm()`

,`spautor()`

,`spglm()`

, or`spgautor()`

).- ...
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)
#> # A tibble: 3 × 2
#> varcomp proportion
#> <chr> <dbl>
#> 1 Covariates (PR-sq) 0.396
#> 2 de 0.501
#> 3 ie 0.102
```