regression {RGeoS}R Documentation

Linear Regression

Description

Linear Regression

Usage

regression(db, icol1=1, icol2=2, 
flag.bivar=1, verbose = 0, save.coeff = FALSE, flag.draw=FALSE, ...)

Arguments

db

The db-class containing the data information used to calculate the linear regression of the target variable with respect to the set of drift functions.

icol1

Rank of the column containing the first target variable (only used when flag.bivar=1)

icol2

Rank of the column containing the second target variable (only used when flag.bivar=1)

flag.bivar
  • 1: the regression is calculated for variable V2 as a function of variable V1

  • 0: the regression is calculated for variable V1 as a function of the set of Fi variables

verbose

1 for a verbose printout

save.coeff

Defines the output option:

  • FALSE the db-class where the regression residuals have been added

  • TRUE a list containing the count of active data, the coefficients of the linear regression, the variance of the active data and the variance of residuals

flag.draw

When TRUE (and if flag.bivar is TRUE and a graphic already exists), the regression line is overlaid on the current figure.

...

Parameters passed to the function line used to represent the regression line

Value

The returned value depends upon the argument save.coeffs.


[Package RGeoS version 9.1.1 Index]