53
Best Model Dylan Loudon

Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Embed Size (px)

Citation preview

Page 1: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Best Model

Dylan Loudon

Page 2: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Linear Regression Results

Erin Alvey

Page 3: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Who will you trust?

• Field technicians?

• Software programmers?

• Statisticians?

• Instructors?

• GIS technicians?

• Other researchers?

• Yourself?

Page 4: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Regression (Correlation) Modeling• Creates a model in N-Dimensional

“Hyper-Space”

• Defined by:– Covariates– Response variables– Mathematics used to create the model– Statistics used to optimize parameters– Options for model evaluation– Predictor variables

Page 5: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Multiple Linear Regression

Page 6: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Linear Regression: 2 Predictors

Mathworks.com

Page 7: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Non-Linear Regression

Page 8: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Regression Methods• Continuous Regression:

– Linear Regression– Generalized Linear Models (GLM)– Generalized Additive Models (GAMs)

• Categorical Regression (trees):– Regression Trees– Classification and regression trees (CART)

• Machine Learning:– Maximum Entropy (Maxent)– NPMR, HEMI, BRTs, etc.

Page 9: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Brown Shrimp Size

• Add graph from work

Page 10: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Terminology

• Plant uses:– Measured value and response variable– Explanatory variable

• I prefer:– Response variable– I’ll use “measured value” to identify measured

values in field data– Covariate: Explanatory variable used to build

the model– Predictor: Explanatory variable used to predict

Page 11: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Douglas Fir Habitat Model

Hab

itat

Qua

lity

Precipitation (mm)0 10000

1

Page 12: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

PredictorModel

Prediction

Page 13: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

PredictorModel

Prediction

Field Data

Covariate

Model Selection and Parameter Estimation

Page 14: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

PredictorModel

Prediction

Field or Sample Data

Covariate

Model Selection and Parameter Estimation

Model Validation

Page 15: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Douglas-Fir sample dataLat Lon F3 MeanTempPrecip

40.893634 -121.802272 41 69 107040.987702 -122.117088 45 96 140640.987702 -122.117088 40 96 140640.987702 -122.117088 43 96 140640.987702 -122.117088 42 96 140640.987702 -122.117088 46 96 1406

Create the Model

Model“Parameters”

Precip

To Points

Extract

Text File

To Raster

X Y MeanTempPrecip Predict-123.677 41.61906 71 1548 193.6-123.344 41.61906 55 1212 150.4-123.011 41.61906 79 887 187.5667-122.677 41.61906 68 584 155.4667-122.344 41.61906 102 513 221.1

Prediction

Attributes

Page 16: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Data

• Response Variable– From the field data (sample data)

• Covariates– From the field or remotely sensed

• Predictors– Typically remotely sensed – Sample as covariates for training– Can be different for predicting to new

scenarios

Page 17: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Response Variable

• What is the:– Spatial uncertainty?– Temporal uncertainty?– Measurement uncertainty?

• Will it answer your question?

Page 18: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Covariate Variables

• What is the:– Spatial uncertainty?– Temporal uncertainty?– Measurement uncertainty?

• How well does the collection time of the covariates match the field data?

• Do they co-vary with the phenomena?

• Do the covariates “correlate”?

Page 19: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Types of uncertainty

• Accuracy (bias)

• Precision (repeatability)

• Reliability (consistency of a set of measurements)

• Resolution (fineness of detail)

• Logical consistency– Adherence to structural rules, attributes,

and relationships

• Completeness

Page 20: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Types of Errors• Gross errors

– Transcription– Sinks in DEMs

• Random– Estimated using probability theory

• Systematic errors– “Drift” in instruments– Dropped lines in Landsat

Page 21: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Gross Errors

• Lat/Lon:– Reversed– 0, names, dates, etc.

• Dates:– Extended in databases

• Measurements:– Inconsistent units– Inconsistent protocols– What can you expect from a field team?

Page 22: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Occurrences of Polar Bears

From The Global Biodiversity Information Facility (www.gbif.org, 2011)

Page 23: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Systematic Errors

Landsat Scan line Error

Page 24: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Response Variable Qualification Tools• Maps (various resolutions)

• Examine the data values:– How many digits?– Repeating patterns, gross errors?

• “Documentation”

• Measurements:– Occurrences?– Binary: Histogram– Categorical: Histogram– Continuous: Histogram

Page 25: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

What’s the Impact on Models?

Page 26: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Significant Digits

• How many digits to represent 1 meter?– Geographic: Lat/Lon?– UTM: Eastings/Northings?

Page 27: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Significant Digits

• Geographic:– 1 digit = 1 degree– 1 degree ~ 110 km– 0.00001 ~ 1.1 meters

• UTM:– 1 digit = 1 meter

Page 28: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Covariate Qualification

• Maps

• Documentation

• Examine the data:– How many digits?

• Integer or floating point?

– Repeating patterns?

• Histograms

Page 29: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

CONUS Annual Percip.

Page 30: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Covariate Uncertinaty

0.00

0.20

0.40

0.60

0.80

1.00

1.20-231

-219

-207

-195

-183

-172

-160

-148

-136

-124

-112

-100 -88

-77

-65

-53

-41

-29

-17 -5 7 19 30 42 54 66 78 90 102

Num

ber o

f Pix

els

Scal

ed to

1

Degrees C Times 10

Min Temp of Coldest Month

Page 31: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Min Temp of Coldest Month

0.00

0.20

0.40

0.60

0.80

1.00

1.20-230

-215

-201

-186

-172

-157

-143

-128

-114

-100 -85

-71

-56

-42

-27

-13 2 16 31 45 60 74 88 103

Num

ber o

f Occ

urre

nces

Sca

led

to 1

Degrees C Times 10

Min Temp: Envrionment

Page 32: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Histograms

hist(Temp,breaks=400)

Page 33: Best Model Dylan Loudon. Linear Regression Results Erin Alvey
Page 34: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Covariate Correlation

• Correlation Plots

• Pearson product-moment correlation coefficient

• Spearman’s rho – non parametric correlation coefficient

Page 35: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Correlation plots

Page 36: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

California Correlations

Page 37: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

California Predictors

Page 38: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Response vs. Covariates

• For Occurrences:– Histogram covariates at occurrences vs.

overall covariates

• For Binary Data:– Histogram covariates for each value

• For Categorical Data :– Histogram covariates for each value– Or scatter plots

• For Continuous Data– Scatter plots

Page 39: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Covariate Occurrence Histograms

Precipitation with Douglas-Fir Occurrences

Page 40: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Douglas Fir Model In HEMI 2

Green: Histogram of all of CaliforniaRed: Histogram of Douglas-Fir Occurrences

Page 41: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Doug-Fir Height vs. Precip.

Page 42: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Douglas Fir Height

Page 43: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Terrestrial Predictors

• Elevation:– Slope– Aspect– Absolute Aspect

• Distance to:– Roads– Streams (streamline)

• Climate– Precip– Temp

• Soil Type• RS:

– Landsat– MODIS– NDVI, etc.

Page 44: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Marine Predictors

• Temp• DO2• Salinity• Depth• Rugosity

(roughness)• Current (at depths)• Wind

Page 45: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

More Complicated

• Associated species• Trophic levels• Temporal• Cyclical

Page 46: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Predictor Layers

• Means, mins, maxes

• Range of values

• Heterogeneity

• Spatial layers:– Distance to…– Topography: elevation, slope, aspect

Page 47: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Field Data and Predictors

• As close to field measurements as possible

• Clean and aggregate data as needed– Documenting as you go

• Estimate overall uncertainty

• Answer the question:– What spatial, temporal, and measurement

scales are appropriate to model at given the data?

Page 48: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Temporal Issues

• Divide data into months, seasons, years, decades.– Consistent between predictors and

response

• Extract predictors as close to sample location and dates as possible

• Use the “best” predictor layers

Page 49: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Additional Slides

Page 50: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Dimensions of uncertainty

• Space

• Time

• Attribute

• Scale

• Relationships

Page 51: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Basic Tools

• Histograms: What is the distribution of occurrences of values (range and shape)

• Scattergrams: What is the relationship between response and predictor variables and between predictor variables

• QQPlots: Are the residuals normally distributed?

Page 52: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Types of Data

• “God does not play dice”– Einstein

• “the end of certainty”– Prigogine, 1977 Nobel Prize

• What remains is:– Quantifiable probability with uncertainty

Page 53: Best Model Dylan Loudon. Linear Regression Results Erin Alvey

Uncertainty Factors

• Inherent uncertainty in the world

• Limitation of human congnition

• Limitation of measurement

• Uncertainty in processing and analysis