Parameter Estimation - Part II

2. Parameterization of the basic IFM with rescue effect: an interpretation by regression

In the related literature, the estimation method illustrated in this and in the previous Unit for the IFM model is referred to as nonlinear regression (H94; Moilanen, 1999). It is beyond the aim of this course to discuss this topic. However, in the case of the basic IFM with rescue effect something similar to the usual linear regression can be done. As this has an interesting implication for the IFM parameterization, we will sketch out the logistic model and the relationship with Unit 10 and Section 11.1. In the usual linear regression model, parameters are estimated by minimizing the differences (or residuals) between the observed response and the model expected values, as summarized in Figure 11.1 (that is, the regression line is determined by the ordinary least square method).

Figure 11 - Scatter plot, regression line (blue) of Y on X and residuals (vertical red bars).

The estimated linear regression provides the expected value of the dependent variable Y, conditional to the dependent variable X=u, E(Y | X=u). For a 0-1 response variable, like presence/absence, this expected value E(Y | X = u) coincides with the (conditional) success probability P(Y = 1 | X = u). Let \(\theta\)(u) = P(Y = 1 | X = u). In the logistic model, it is assumed that

(11.2) \[\theta(u)=\frac{e^{\beta_0+\beta_1u}}{1+e^{\beta_0+\beta_1u}}\]

and therefore, the logit transformation

(11.3) \[g(u)=ln\frac{\theta(u)}{1-\theta(u)}=\beta_0+\beta_1u\]

yields to express a transformation of E(Y | X = u) as linearly dependent from unknown parameters (from which the name of generalized linear model). Of course, k ≤ 1 dependent variables can be considered, yielding the last member of (11.3) to be in the form \(\beta_0+\sum_{j=1}^k\beta_ju_j\)

For the logistic model, the maximum likelihood method applied in Unit 10 and in Section 11.1 is the “equivalent” of the least square method. By proceeding as in Section 10.2 it is easy to prove that parameter estimation is indeed obtained by the minimization of

(11.4) \[-\sum_{i=1}^n\{y_iln[\theta(u_i)]+(1-y_i)ln[1-\theta(u_i)]\}\]

that is, by minimizing a comparison between the observed presence/absence data (\(y_i\)) and the expected presence/absence \(\theta(u_i)\).

The similarity between (11.4) and (10.2) is self-evident. Moreover, we know from Eq. (4.1) that for the basic IFM, the expected presence/absence \(\theta(u_i)\) is given by the incidence \(J_i\) of Eq. (10.3) and Eq. (10.4). Therefore, we only need to check if \(J_i\) can be expressed as in (11.2) or, alternatively, if \(ln (J_i / 1- J_i)\) is a linear combination of the unknown parameters and the dependent variable (u), as in Eq. (11.3).

We firstly consider Eq(10.4) and prove that Eq. (11.3) holds true.

\(1-J_i =\frac {A_0^xy^2/S_i^2A_i^x}{1+A_0^xy^2/S_i^2A_i^x}\)   and then   \(\frac{J_i}{1-J_i}=\frac{A_i^xS_i^2}{A_0^xy^2}\)  , so that    \(ln\frac{A_i^xS_i^2}{A_0^xy^2}=xln(\frac{A_i}{A_0})-2lny+2lnS_i\).

Therefore, by considering as independent variables the patch area and the patch connectivity, and naming \(\beta_0= -2 ln⁡y\), \(\beta_1=x\), and \(\beta_2=2\) we obtain

(11.5) \[g(A_i,S_i)=\beta_0+\beta_1ln(\frac{A_i}{A_0})+\beta_2lnS_i\]

It can be clearly seen that the unknown parameters x and y can be estimated by regressing the presence/absence data (response) on the (scaled) patch area and the connectivity (independent variables) to estimate the unknown parameters \(\beta_0\) and \(\beta_1\). From the estimated values of \(\beta_0\) and \(\beta_1\) we can go back to x and y (\(y = exp(-\beta_0/2)\)). Note that as \(\beta_1=x\), then \(\beta_1\gt0\), while \(\beta_0\) can be any real number.

Example 11.4. The basic IFM with rescue effect: implementing logistic regression by R.
As in Example 10.4, we estimate the parameters of a basic IFM by using only the presence absence vector “p1” of the reference metapopulation REFMETAPOP.

S<-rowSums(edis[,p1>0])

# the command for fitting a generalized linear model is glm
mod1<-glm(p1~offset(2*log(S))+log(A/A0),family=binomial)

# by specifying family=binomial, the logistic regression is carried
# out. The fact that \(\beta_2\) = 2 in Eq. (11.5) is specified by offset.
summary(mod1) # we will not discuss all the content of the output

Call:
glm(formula = p1 ~ offset(2 * log(S)) + log(A/A0), family = binomial)

Deviance Residuals:

Min1QMedian3QMax
-2.8370-0.86950.31040.73774.3226

Coefficients:

EstimateStd. Errorz valuePr(>|z|)
(Intercept)4.00092.23981.7860.0741.
log(A/A0)0.18260.28390.6430.5202*

---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance:223.34 on 99 degrees of freedom
Residual deviance:222.93 on 98 degrees of freedom

AIC: 226.93

Number of Fisher Scoring iterations: 5

Please, note that the regression signed in red (*) is not significant! That is, p1 does not contain enough evidence to state that the presence of the species in any patch depends on the patch area. However, assessing statistical significance is not here the main aim, as this dependence is directly hypothesized in Eq. (5.2).

Then, from the estimated betas values we go back to x and y, regardless of the significance of the regression model.

(beta<-coef(mod1))

(Intercept)log(A/A0)
4.00088540.1825774

# in the notation of Eq. (11.5), \(\beta_0 = beta[1]\) and \(\beta_1 = beta[2]\)
# therefore

(xhat<-beta[2])

log(A/A0)
0.1825774

(yhat<-exp(-beta[1]/2))

(Intercept)
0.1352754

Please, note that the estimated values xhat and yhat coincide (apart from numerical approximation) with those directly obtained in Example 10.4 by maximum likelihood estimation.

The regression analysis can be carried out in the case of more than one snapshot, as in Example 11.3.

pm<-(p+p1)/2
S<-rowSums(edis[,pm>0])

# As before, we need to specify that two year of data are used. This
# is done by cbind, which creates a matrix 100x2 where for each patch
# the first column contains the number of successes in the 2 trials,
# and the second column the number of failures.
cbind(p+p1,2-p-p1)[1:10,]

[,1][,2]
[1,]11
[2,]11
[3,]11
[4,]11
[5,]11
[6,]11
[7,]11
[8,]20
[9,]11
[10,]11

mod2<-glm(cbind(p+p1,2-p-p1)~offset(2*log(S))+log(A/A0),
family=binomial)

Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred

# the warning message tells us that some of the estimated incidences
# (the fitted probabilities) can be equal to either 0 or 1.

summary(mod2)

Call:
glm(formula = cbind(p + p1, 2 - p - p1) ~ offset(2 * log(S)) +
log(A/A0), family = binomial)
Deviance Residuals:

Min1QMedian3QMax
-2.3433-0.7996-0.06740.79023.4166

Coefficients:

EstimateStd. Errorz valuePr(>|z|)
(Intercept)-1.94671.2165-1.6000.11
log(A/A0)0.72790.16094.5236.09e-06***

---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance:155.61 on 99 degrees of freedom
Residual deviance:135.24 on 98 degrees of freedom

AIC: 239.05

Number of Fisher Scoring iterations: 5

Please, note that the regression (***) is strongly significant! That is, by taking into account both the snapshots "p" and "p1", there is enough evidence to state that the presence of the species in a patch depends on the patch area.

As before, it can be easily seen that the estimated parameters coincide with those obtained in Example 11.3.

Finally, we compare the estimated incidences:

incidences1<-fitted(mod1)
summary(incidences1)

Min.1st Qu.MedianMean3rd Qu.Max.
0.00000.31100.78330.61000.93570.9857

incidences2<-fitted(mod2)
summary(incidences2)

Min.1st Qu.MedianMean3rd Qu.Max.
0.00000.25650.61690.53000.80160.9282

For the basic IFM without rescue effect, it is not possible to obtain an equation similar to Eq. (11.5). Indeed, from Eq. (10.3) we obtain

\(\frac{J_i}{1-J_i}=\frac{A_i^xS_i^2}{A_0^xy^2+A_0^xS_i^2}\)     so that    \(ln\frac{A_i^xS_i^2}{A_0^xy^2+A_0^xS_i^2}=xln\bigg(\frac{A_i}{A_0}\bigg) + ln\bigg(\frac{S_i^2}{y^2+S_i^2}\bigg)\)

where connectivity Si and parameter y cannot be separated as in Eq. (11.5).