If type = "cases", for all (\(x_i, y_i\)) datapoints, linear models are created by sampling R times - with replacement - from \(n \in \{1 \ldots N\}\) and building models \(Y_n = X_n\beta + \varepsilon\). This is also known as the .632-bootstrap, because the samples will, on average, contain \(1 - e^{-1} = 0.632\) unique elements.
If type = "residuals", for all residuals (\(r_i = y_i - \hat{y}_i\)), linear models are created by sampling R times - with replacement - from \(n \in (1 \ldots N)\) and building models \(\hat{Y}_i + r_n = X_i\beta + \varepsilon\). If type = "residuals2" is selected, scaled and centered residuals \(r_n = \frac{r_i}{\sqrt{1 - h_{ii}}} - \bar{r}\) according to Davison & Hinkley are used. In the "parametric" bootstrap, \(n\) values drawn from a normal distribution \(j_n \in \mathcal{N}(0, \sigma)\), where \(\sigma = \sqrt{\frac{\sum(r_i)^2}{n - p}}\), are added to the fitted values, and linear models are created \(\hat{Y}_i + j_n = X_i\beta + \varepsilon\).
Parameter estimates are obtained from each sampling, from which the average \(\overline{P_{n}}\) and standard error \(\hat{\sigma}\) is calculated as well as a quantile based confidence interval. p-values are calculated through inversion of the confidence interval.