Description Usage Arguments Value See Also Examples
View source: R/bidimensional.R
lm2 is used to fit bidimensional linear regression models using Euclidean and Affine transformations following the approach by Tobler (1965).
1 |
formula |
a symbolic description of the model to be fitted in the format |
data |
a data frame containing variables for the model. |
transformation |
the transformation to be used, either |
lm2 returns an object of class "lm2". An object of class "lm" is a list containing at least the following components:
|
string with the transformation type ( |
|
number of predictors used in the model: 4 for euclidean, 6 for affine, 8 for projective. |
|
degrees of freedom for the model and for the residuals |
|
|
|
transformation coefficients, with |
|
|
|
data frame containing fitted values for the original data set |
|
data frame containing residuals for the original fit |
|
R-squared and adjusted R-squared. |
|
F-statistics and the corresponding p-value, given the |
|
Akaike Information Criterion (AIC) difference between the regression model and the null model. A negative values indicates that the regression model is better. See Nakaya (1997). |
|
Distortion index following Waterman and Gordon (1984), as adjusted by Friedman and Kohler (2003) |
|
an underlying linear model for |
|
formula, describing input and output columns |
|
data used to fit the model |
|
function call information, incorporates the |
1 2 3 4 5 6 | lm2euc <- lm2(depV1 + depV2 ~ indepV1 + indepV2, NakayaData, 'euclidean')
lm2aff <- lm2(depV1 + depV2 ~ indepV1 + indepV2, NakayaData, 'affine')
lm2prj <- lm2(depV1 + depV2 ~ indepV1 + indepV2, NakayaData, 'projective')
anova(lm2euc, lm2aff, lm2prj)
predict(lm2euc)
summary(lm2euc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.