Thursday, February 28, 2013

Think it is better to do simple and then get more complex.
Will rerun with only the following of variables:
Annual Temp
Annual Precipitation
Diurnal Range (temperature at beginning of day and end of the day)

Also need to trim tiles. WAAY too big. Don't need, for example, Siberia.

Looks up paper by Mary Wiscz---distributional model of thresholding. 

Wednesday, February 27, 2013

Finally getting my act together and actually downloading land-use data.

Inspired where to obtain land use data from this paper:

Obtained land data from this website:

And figured out how to download land data by tile.
From LANDSAT Archives, using L7 SLC-off (2003->)list. What does SLC-off refer to?

Only downloading tiles for Vietnam, as that is what I am interested. 33 tiles in all.

The below is an excel sheet snapshot of the tiles I selected. The row and column refer to the tile. The date refers to the month and year of the tile.

How I made decisions in choosing the tile.
1) The tile must have been available for Download. For some reason, sometimes optimal tiles at some months could not be downloaded.
2) The most recent tile is preferred. Tiles were chosen from Feb 2010-Feb 2013.
3) If a downloadable, most recent tile was found, the cloud cover must have been < 10%. If no tile was found between 2010-2013 with cloud cover < 10%, the tile with the lowest cloud cover (still must be < 20%) was chosen.

Added all tiles and downloaded in full using the Bulk Download Application. Less stressful than otherwise thought. Next I will mosaic the tiles in R.

Tuesday, February 26, 2013

Thinking it doesn't make any sense that BIO_13 precipitation of the warmest month is most important. I also included BIO_18 precipitation of the warmest quarter.

Due to correlation values, you have to make a decision when the going gets rough. I am now going to include BIO_12 [Annual Precipitation], keep 16, get rid of 13 and 14.

R script:
#load packages
library(rJava) #also make sure to put maxent.jar into R dismo library folder

#convert to raster
altitude<-raster("/Volumes/LOLOYOHE BA/Merged_layers/alt_seasia9tile.grd")
bio2<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio2_seasia9tile.grd")

bio2<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio2_seasia9tile.grd")
bio5<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio5_seasia9tile.grd")
bio8<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio8_seasia9tile.grd")
bio12<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio12_seasia9tile.grd")
bio15<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio15_seasia9tile.grd")
bio16<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio16_seasia9tile.grd")
bio18<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio18_seasia9tile.grd")
bio19<-raster("/Volumes/LOLOYOHE BA/Merged_layers/bio19_seasia9tile.grd")

#stack the layers into one raster and name the layers within the stack

stacked.layers<-stack(altitude, bio2, bio5, bio8, bio12, bio15, bio16, bio18, bio19)
names(stacked.layers)<-c("altitude", "bio2", "bio5", "bio8", "bio12", "bio15", "bio16", "bio18", "bio19")
#remove the original rasters for space
rm(altitude, bio2, bio5, bio8, bio12, bio15, bio16, bio18, bio19)

#read locality points for first species: alcippe peracensis

peracensis.pts<-readShapePoints("/Volumes/LOLOYOHE BA/Vietnam Data/maxent_models/alcippe_peracensis_all.shp")

#run maxent for first species
maxent.peracensis<-maxent(stacked.layers, coordinates(peracensist.pts)[,1:2])

#see graph of important variables


#see the response curves

#make raster from predictions
r.peracensis<-predict(maxent.peracensis, stacked.layers, progress = "window")

These are my models for six species showing differences between before and after changing the BIOCLIM variables to include. Notice the before is run using the maxent.jar applet rather than with R so I am still figuring out how to get all the same outputs

Alcippe peracensis Mountain fulvetta


Garrulax chinensis Black-throated laughingthrush

VariablePercent contributionPermutation importance

Garrulax leucolophus White-crested laughingthrush

VariablePercent contributionPermutation importance

Pellorneum albiventre Spot-throated babbler


Pomatorhinus ruficollis Streak-breasted scimitar babbler

VariablePercent contributionPermutation importance


Should I even bother including in my analysis anymore? (No longer a babbler)

Questions to discuss:

  1. Is it okay to rerun models with new set of BIOCLIM variables even if you have already run it once and just notice the first one does not seem biologically true? What if these new variables don't seem right either? Is it okay to keep trying to rerun the models?
  2. What does it mean when only one variable is giving strong response?
  3. Precipitation of the Wettest Month (BIO13) was removed as we had thought this didn't make much biological sense due to the way the rainy season works in SE Asia (May/June-Sept/October). We thought it made more sense if Precipitation of the Wettest Quarter were included instead (BIO 16). However, this only seemed to be important for P. ruficollis (as well as altitude). Annual precipitation seemed to be the only important variable (BIO 12) for all other species and nothing else. How can we interpret this?
  4. How do I make the ROC curve in R?
  5. I want to validate the model and move forward from this.

Wednesday, February 13, 2013

First PCR as a PhD student. Sigh.

PCR#: LY0001
30 μL reaction
# Tubes: 8
MasterMix Single Tube (μL) Total in MM (μL)
Buffer 3 24
MgCl2 3 24
dNTPs 0.5 4
Taq 0.5 4
H20 13 104
FW 3 24
RV 3 24
FW Primer THYF
RV Primer THYR
Tube# Sample
1 588460
2 580656
3 110278
4 108297
5 560781
6 control
Program:  Omar1
Annealing Temp:  50

Sample #s correlate with AMCC AMNH tissue number.