Store

Contact Us

Careers
Home
Industries
Products
Training
Support
Services
Events
News
About
About Esri
Careers
Esri Video
Partners
Support
Search Support
You are here: >
ArcScripts
>
Search Results
> Script Details
Login

Feedback

Help
Linear Regression (bivariate)
contact author

download help

report inappropriate content
Author
Dr Michael Sawada
File Name
regression.zip
Language
Visual Basic
Last Modified
Sep 29 2002
Status of work
Public Domain
Software
ArcGIS Desktop
File Size
281.01 kb
Downloads
4002
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trialversion, or an advertisement for a retail product.
Summary
This program presents a user interface with a dropdown list of all point/polygon/line layers in the current DataFrame and allows the computation of Simple Linear Regression (bivariate) between two numeric attributes. The program provides
a) a complete set of statistics in including calculated tvalues and pvalues (from Student's t distribution) for slope and intercept and correlation coefficient and R2 amongst others in the form of a Stand Alone Table within the current dataframe.
b) Four new fields in the feature table are added that contain the estimated best fit line [Fit], upper [HIGH95] and lower [LOW95] confidence intervals and calculated residuals [RESIDUALS]
c) Optional automatic generation scatterplots of the regressed variables with the best fit line
d) Optional automatic generation residual diagnostic plot
e) Optional (default) calculations only on selected subset of layer features.
f) Optional automatic mapping of residuals using standard deviation classes.
NOTE: The general use of the program is described in the readme.pdf file distributed with the dll. Important details of use and validation are described in that document.
The program by default outputs (as a minimum) the following parameter estimates (you are presented with save an options).
Parameter Value
SLOPE (BETA) 0.953446
Student's tvalue of Beta 34.276996
Standard Error of Beta 0.027816
pvalue Beta [Ho b=0] 0.000000
Y INTERCEPT 321.775119
Student's tvalue of Intercept 2.612878
Standard Error of Intercept 123.149685
pvalue Intercept [Ho b=0] 0.009856
CORRELATION (R) 0.939568
Student's tvalue of R 34.276996
pvalue R [Ho = 0; df = n1] 0.000000
Rsquared 0.882787
Standard Error of XY 566.088813
Number of Observations (n) 158.000000
Mean XVariable 4120.645570
Mean YVariable 4250.588608
Sum of xvalues 651062.000000
Sum of xvalues squared (x^2) 3096969280.000000
Student's pvalues are calculated based on n2 degrees of freedom from the tdistribution and are accurate to 5 decimal places. If there is a pvalue of zero then you may assume that the probability is less than 0.0001.
Written in Visual Basic and requires ArcGIS 8.1. A single DLL is loaded:
1) Extract the .dll from the zipped file and place it in a folder on your harddrive (remember where you've put it!). The file is called regress.dll
2) Load the .dll into ArcMap by
a. Right clicking on any gray area in the menu bar
b. Select Customize… from the 'popup' menu
c. Select the Commands tab at the top of the dialog box.
d. Select the "Add from file" button.
e. Navigate to the folder where the regress.dll was placed and doubleclick on it.
f. Under the categories, click on Sawada and you will see an icon for the Standard Distance. DON'T CLICK THE CLOSE BUTTON YET!!!!
g. Next, click on the dropdown arrow in the bottom left corner and ensure that it says "Normal.mxt"
h. Now, drag that Icon to one of the buttonbars in ArcGIS
i. Click "Close"...
the complete description can be found in the readme.txt file included in the zipfile download.
Contact Us

Privacy

Legal

Site Map