EnglishFrenchSpanish

OnWorks favicon

r.regression.linegrass - Online in the Cloud

Run r.regression.linegrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command r.regression.linegrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


r.regression.line - Calculates linear regression from two raster maps: y = a + b*x.

KEYWORDS


raster, statistics, regression

SYNOPSIS


r.regression.line
r.regression.line --help
r.regression.line [-g] mapx=name mapy=name [output=name] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]

Flags:
-g
Print in shell script style

--overwrite
Allow output files to overwrite existing files

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
mapx=name [required]
Map for x coefficient

mapy=name [required]
Map for y coefficient

output=name
ASCII file for storing regression coefficients (output to screen if file not
specified).

DESCRIPTION


r.regression.line calculates a linear regression from two raster maps, according to the
formula
y = a + b*x
where
x
y
represent the input raster maps.

Optionally, it saves regression coefficients as a ASCII file. The result includes the
following coefficients: offset/intercept (a) and gain/slope (b), correlation coefficient
(R), number of elements (N), means (medX, medY), standard deviations (sdX, sdY), and the F
test for testing the significance of the regression model as a whole (F).

NOTES


The results for offset/intercept (a) and gain/slope (b) are identical to that obtained
from R-stats’s lm() function.

EXAMPLE


Comparison of two DEMs (SRTM and NED, both at 30m resolution), provided in the North
Carolina sample dataset:
g.region raster=elev_srtm_30m -p
r.regression.line mapx=elev_ned_30m mapy=elev_srtm_30m
y = a + b*x
a (Offset): -1.659279
b (Gain): 1.043968
R (sumXY - sumX*sumY/N): 0.894038
N (Number of elements): 225000
F (F-test significance): 896093.366283
meanX (Mean of map1): 110.307571
sdX (Standard deviation of map1): 20.311998
meanY (Mean of map2): 113.498292
sdY (Standard deviation of map2): 23.718307

Using the script style flag AND eval to make results available in the shell:
g.region raster=elev_srtm_30m -p
eval `r.regression.line -g mapx=elev_ned_30m mapy=elev_srtm_30m`
# print result stored in respective variables
echo $a
-1.659279
echo $b
1.043968
echo $R
0.894038

Use r.regression.linegrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

Ad