lm2 {BiDimRegression} | R Documentation |
lm2 is used to fit bidimensional linear regression models using Euclidean and Affine transformations following the approach by Tobler (1965).
lm2(formula, data, transformation)
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:
transformation |
string with the transformation type ( |
npredictors |
number of predictors used in the model: 4 for euclidean, 6 for affine, 8 for projective. |
df_model, df_residual |
degrees of freedom for the model and for the residuals |
transformation_matrix |
|
coeff |
transformation coefficients, with |
transformed_coeff |
|
fitted_values |
data frame containing fitted values for the original data set |
residuals |
data frame containing residuals for the original fit |
r.squared, adj.r.squared |
R-squared and adjusted R-squared. |
F, p.value |
F-statistics and the corresponding p-value, given the |
dAIC |
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 |
Distortion index following Waterman and Gordon (1984), as adjusted by Friedman and Kohler (2003) |
lm |
an underlying linear model for |
formula |
formula, describing input and output columns |
data |
data used to fit the model |
Call |
function call information, incorporates the |
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)