correlation {RGeostats}R Documentation

Plot the translated correlation

Description

Plot the translated correlation, for one or two variables

Usage

correlation(db, name1=1, name2=NA, db2=NA, name.size=NA,
            ndisc=100,flag.plot=TRUE, flag.same=TRUE, flag.regr=FALSE,
            flag.iso=FALSE,flag.diag=FALSE,flag.aspoint=FALSE,dmin=NA,dmax=NA,
            dirvect = NA, tolang = NA, opt.code = 0, tolcode = 0,
            mini1=NA, maxi1=NA, mini2=NA, maxi2=NA, 
            lin.lty=1, lin.lwd=1, lin.col= "black",
	    xlab=NA, ylab=NA, title=NA, verbose=FALSE,...)

Arguments

db

The db-class containing the data information used to calculate the correlation.

name1

Rank of the column containing the first target variable

name2

Rank of the column containing the second target variable

db2

If 'db2' is specified, the second variable is read from this Db. This option is only available when flag.same=TRUE. This Db2 must have exactly the same organization as 'Db'.

name.size

When the argument 'flag.aspoint' has been switched ON, the samples are represented as circles. If the argument 'name.size' is defined (as a valid attribute of db-class provided as first argument), then the samples are represented with a radius proportional to that variable.

ndisc

Number of discretization steps along each axis for graphic representation

flag.plot

TRUE if the correlation plot is produced.

flag.same

TRUE if the variables must be compared at the same location (standard correlation). FALSE for the shifted correlation

flag.regr

When TRUE, represent the regression line of the variable 'name2' as a function of the variable 'name1'

flag.iso

When TRUE, the axes are the same, calculated from the minimum of both variables to the maximum of both variables.

flag.diag

When TRUE, represent the diagonal between the lower left and the upper right corners

flag.aspoint

When TRUE, the different symbols are represented as circles (of constant or varying radii).

When FALSE, the samples are migrated onto an internal fine grid. Then the density of samples per grid node is displayed using a colored raster representation of this internal grid.

dmin

Minimum distance for the calculation of the translated correlation

dmax

Maximum distance for the calculation of the translated correlation

dirvect

The directions in which the translated correlation must be calculated. For more information, refer to get.directions

tolang

Angular tolerance. If no angular tolerance is not defined, the tolerance is set to 90 degrees.

opt.code

Option concerning the sample codes for constituting pairs:

  • 0 : a pair of samples is selected whatever their codes (if active)

  • 1 : a pair is retained if the code is active in the data base and the codes of the two samples are closer than tolcode

  • 2 : a pair is retained only if the codes of the two samples are different

tolcode

Maximum distance between the codes of the two samples.

lin.lty

Type of the line used to represent the linear regression and/or the bissector.

lin.lwd

Thickness of the line used to represent the linear regression and/or the bissector.

lin.col

Color of the line used to represent the linear regression and/or the bissector.

mini1

Minimum value for the first target variable

maxi1

Maximum value for the first target variable

mini2

Minimum value for the second target variable

maxi2

Maximum value for the second target variable

xlab,ylab

Labels for the graphic, arguments used by the Splus function "plot"

title

Title to be displayed (optional)

verbose

When TRUE, the calculation of the correlation and (optionally) the regression line produces verbose outputs.

...

Parameters transmitted to the functions db.plot and lines.

Details

When one variable is provided, the function calculates: Correl(Z1(x),Z1(x+h)) For two variables, the function calculates: Correl(Z1(x),Z2(x+h))

Value

The correlation coefficient.


[Package RGeostats version 11.0.6 Index]