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:

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 

Rsquared and adjusted Rsquared. 

Fstatistics and the corresponding pvalue, 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 
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)