Extract TRIM model coefficients.
# S3 method for trim
coef(object, representation = c("standard", "trend", "deviations"), ...)
TRIM output structure (i.e., output of a call to trim
)
[character]
Choose the coefficient
representation. Options "trend"
and "deviations"
are for model 3 only.
currently unused
A data.frame
containing coefficients and their standard errors,
both in additive and multiplicative form.
In the simplest cases (no covariates, no change points), the trim Model 2 and Model 3 can be summarized as follows:
Model 2: \(\ln\mu_{ij}=\alpha_i + \beta\times(j-1)\)
Model 3: \(\ln\mu_{ij}=\alpha_i + \gamma_j\).
Here, \(\mu_{ij}\) is the estimated number of counts at site \(i\), time \(j\). The parameters \(\alpha_i\), \(\beta\) and \(\gamma_j\) are refererred to as coefficients in the additive representation. By exponentiating both sides of the above equations, alternative representations can be written down. Explicitly, one can show that
Model 2: \(\mu_{ij}= a_ib^{(j-1)} = b\mu_{ij-1}\), where \(a_i=e^{\alpha_i}\) and \(b=e^\beta\).
Model 3: \(\mu_{ij}=a_ic_j\), where \(a_i=e^{\alpha_i}\), \(c_1=1\) and \(c_j=e^{\gamma_j}\) for \(j>1\).
The parameters \(a_i\), \(b\) and \(c_j\) are referred to as coefficients in the multiplicative form.
The equation for Model 3
\(\ln\mu_{ij} = \alpha_i + \gamma_j\),
can also be written as an overall slope resulting from a linear regression of the \(\mu_{ij}\) over time, plus site- and time effects that record deviations from this overall slope. In such a reparametrisation the previous equation can be written as
\(\ln\mu_{ij} = \alpha_i^* + \beta^*d_j + \gamma_j^*,\)
where \(d_j\) equals \(j\) minus the mean over all \(j\) (i.e. if \(j=1,2,\ldots,J\) then \(d_j = j-(J+1)/2\)). It is not hard to show that
The \(\alpha_i^*\) are the mean \(\ln\mu_{ij}\) per site
The \(\gamma_j^*\) must sum to zero.
The coefficients \(\alpha_i^*\) and \(\gamma_j^*\) are obtained by
setting representation="deviations"
. If representation="trend"
,
the overall trend parameters \(\beta^*\) and \(\alpha^*\) from the overall
slope defined by \(\alpha^* + \beta^*d_j\) is returned.
Finally, note that both the overall slope and the deviations can be written in multiplicative form as well.
Extract the site, growth or time effect parameters computed with
trim
.
Other analyses:
confint.trim()
,
gof()
,
index()
,
now_what()
,
overall()
,
overdispersion()
,
plot.trim.index()
,
plot.trim.overall()
,
results()
,
serial_correlation()
,
summary.trim()
,
totals()
,
trim()
,
vcov.trim()
,
wald()
# NOT RUN {
data(skylark)
z <- trim(count ~ site + time, data=skylark, model=2, overdisp=TRUE)
coefficients(z)
# }
Run the code above in your browser using DataLab