LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Oct 2010 15:03:26 -0400
Reply-To:     peterflomconsulting@mindspring.com
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject:      Re: How to create a jackknife macro
Comments: To: Keith Larson <keith.larson@ZOOEKOL.LU.SE>
In-Reply-To:  <AANLkTi=2OvB7BgQ-DFgJg5nSQdZ-nku+mY=HisXF55tp@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I am pretty sure that the by-now classic paper Don't Be Loopy by David Cassell will show you how to do this.

The 'L isn't quite the same without the Casse 'L

Peter

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Keith Larson Sent: Monday, October 18, 2010 2:25 PM To: SAS-L@LISTSERV.UGA.EDU Subject: How to create a jackknife macro

Dear list,

I have two species ranges determined from observations. Within each range I have generated 1000 random points. I then extracted environmental data for each observed and random point using GIS. Next, I created a PCA of the environmental variable for all of the observed and random points (both species). For the actual observed (not random points), I then calculated the (absolute) difference for the mean of each PC(1 to 4) between the two species. For example mean(PC1 for species A) - mean(PC1 for species B), and so on for each PC(1 to4).

I would like to do the same for the random points (species A random points, species B random points), but instead of a simple difference using all of the random samples for each species, I would like to run a jackknife, calculating the mean value 1000 times, subsampling the data without replacement (jackknife), using 75% of the data for each replicate. Once I calcuate these mean values, I would like to calculate a 95% range on each PC.

Any help is VERY much appreciated.

Cheers, Keith

A sample dataset might look like:

DATA Survey; INPUT Species PC1 PC2 PC3 PC4 ; DATALINES; Species PC1 PC2 PC3 PC4 A_Obs 118 39 25 229 A_Obs 96 28 27 320 A_Obs 97 35 30 279 A_Obs 93 27 26 269 A_Obs 119 15 31 232 A_Random 105 11 31 259 A_Random 118 25 36 294 A_Random 104 30 29 310 A_Random 99 10 27 270 A_Random 91 19 34 322 B_Obs 91 22 32 276 B_Obs 120 38 37 315 B_Obs 114 35 25 290 B_Obs 98 30 27 281 B_Obs 98 36 29 322 B_Random 105 19 27 319 B_Random 104 15 32 292 B_Random 102 35 24 254 B_Random 104 23 27 285 B_Random 102 38 29 216; RUN;

************************************** Keith Larson, PhD Student Animal Ecology, Lund University Sölvegatan 37 223 62 LUND Sweden Phone: +46 (0)46 2229014 Mobile: +46 (0)73 0465016 Fax: +46 (0)46 2224716 Skype: sternacaspia FB: keith.w.larson@gmail.com **************************************


Back to: Top of message | Previous page | Main SAS-L page