SAS program code to estimate regression slopes and then test equivalence, and Ambystoma data.
Ecological Archives E086-094-S1.
File list (downloads)
Philip M. Dixon
Department of Statistics
Iowa State University
Ames, IA 50011-1210
EquivSlope.sas -- EquivSlope.sas: SAS (SAS 1999) program code to estimate regression slopes, assuming ar(1) errors, then test equivalence.
Ambystoma.txt -- Ambystoma data set.
The file "EquivSlope.sas" is SAS (SAS 1999) program code to estimate regression slopes, assuming ar(1) errors, then test equivalence. The code was written for SAS version 8.2. It produces identical results in SAS version 9.0. Comments are the text surrounded by /* and */. The first data step (data trend;) reads the raw data and produces a SAS data set with one observation per species and year. The proc mixed step estimates the regression slope for a log-linear model with ar(1), i.e., autocorrelated at lag 1, errors. Parameter estimates are stored in the data set named parms. The slopes are identified as effect = ‘year’. The second data step (data tests;) does the equivalence test calculations for the slope, using an equivalence interval of (-0.0346, 0.0346). LT is the t statistic for testing H0a (slope less than lower boundary). UT is the t statistic for testing H0b (slope greater than upper boundary). LP and UP are the corresponding P values. This information is saved in a text file (ests.txt) and a SAS data set. The final proc print step prints the equivalence test results.
The file "Ambystoma.txt" is an Ambystoma data set. The first line is a header line with variable names. Subsequent lines contain the species (A. talpoideum or A. tigrinum), the year, and the count of breeding females.
ESA Publications | Ecological Archives | Permissions | Citation | Contacts