Why Fear is the Wrong Approach to Climate Change

Climate skeptics are growing in numbers within the U.S., currently comprising about 25% of the general population, up from about 15% or so a few years ago (goes to show that no matter how small the group, being well-funded will go a long way to hijacking the political and educational system). Regardless, there is now a growing effort to convince climate change deniers that it is real, that it constitutes a large threat to natural and human health, and that something must be done about it.

The most common approach has been to inundate the public with information about the disastrous potential of climate change on all aspects of life as we know it. Central to this approach is the idea that climate skeptics are skeptics because they lack information, and the best remedy to that is education. This doesn’t appear to be working, in fact, it may be doing more harm than good. Because the consequences of climate change are usually negative, ‘education’ usually involves telling stories about how bad things will get in the future, and right-wingers have seized on this calling it, not entirely inaccurately, ‘liberal fear-mongering‘.

Oft ignored is the psychology behind climate change beliefs. In particular, we need to understand how to get skeptics on board (which plays into the much bigger psychological picture of choices, ideology, and self-identification). A new paper in Nature Climate Change presents an incredibly interesting take on the situation. Bain et al. devised a way to experimentally assess which messages get positive reactions from climate skeptics.

They found that negative messages, essentially attempting to educate the skeptics on the effects of climate change, led to skeptics entrenching in their beliefs even further. In contrast, messages that ignored science and instead focused on their self-identity, perception within the community, and economic impacts received significantly more positive responses. That is, messages that suggested taking action on climate change would lead to a friendlier, less hostile community, more positive perception of the individual by his or her peers, and promised that taking action on climate change would create jobs actually worked! Not 100% of the time, but far more than the ‘wrath of nature’ approach.

So maybe it’s time for us to switch tacks in this debate. Science is a dirty word, and presenting scientific evidence in some camps is likely to reinforce negative opinions of climate change. Maybe now its time to suggest that taking action on climate change would help individuals be better citizens, would help this country heal as a whole, would provide capital and jobs for a huge number of green start companies. Maybe taking a ‘responsible citizen’ approach, ignoring the science, would help us make progress. On a religious front, perhaps championing the notion that we are ‘stewards of the earth’, as ordained by God in Genesis, would help climate deniers realize that our responsibility is to care for the planet (look up the definition of steward and debate its meaning later). After all, negative actions by another party only reinforces one’s belief in one’s self and ideology. If we’re trying to reach across idealogical lines, perhaps its time to be a bit more positive. Trying to be positive can’t hurt.

Life and Times of a Snake Mimic: Spicebush Swallowtail Caterpillars

Gallery

This gallery contains 6 photos.

Spicebush swallowtails are incredibly beautiful as both caterpillars and butterflies. The caterpillars begin as bird poop mimics and then turn into snake mimics as they get bigger. They feed exclusively on spicebush and sassafras. A full grown, happy caterpillar can … Continue reading

R for Ecologists: Phylogenies in R

I’ve only recently begun working from an evolutionary perspective, and I can’t imagine why I haven’t thought about it much before. After all, it comes up in just about everything that we do in ecology. For example, I’m currently feeding an herbivore many different plant species. It is likely that the herbivore feeds on plants depending on 1) plant traits which are likely phylogenetically dependent and 2) coevolutionary history with the plant. As a result, it’s become imperative for me to start thinking about phylogenetic relationships among plants and, less frequently, herbivores.

I think phylogenetic trees are an easy way for me to visualize relationships among plant species. However, building phylogenetic trees is no easy task. Fortunately, R can do just about everything, when asked. Here I detail the process of building a plant phylogeny with R.

Let’s assume I want to build a phylogeny for Rosa multiflora (invasive), Rubus allegheniensis (native), Rubus phoenicolasius (invasive), Acer rubrum (native), and Vitis vulpina (native). Here’s how it’s done:

Step 1: Get the Phylogeny

The hard work here has already been done for us. Phylomatic is an online tool that allows us to enter species and build an entire phylogeny based on the APG III framework. Go to the page and you’ll see a box. The instructions are pretty self explanatory, so we’ll put into the box:

rosaceae/rosa/rosa_multiflora
rosaceae/rubus/rubus_allegheniensis
rosaceae/rubus/rubus_phoenicolasius
sapindaceae/acer/acer_rubrum
vitaceae/vitis/vitis_vulpina

I like the Newick output format. You can look up details elsewhere, but its essentially a text map of the phylogeny. Once you submit, you’ll get a string of text:

((((rosa_multiflora,(rubus_allegheniensis,rubus_phoenicolasius)rubus)rosaceae,acer_rubrum),vitis_vulpin)rosids)euphyllophyte;

Paste that into your favorite text editor and save it as a plain text file (I called mine newick_phylo.txt). R is funky, it doesn’t like some of the parts of that. Trim off the very first parenthesis, and everything to the right of and including the last parenthesis but LEAVE the semicolon (in this case, delete ‘)euphyllophyte’). You have no idea how long that took me to figure out. The final text looks like:

(((rosa_multiflora,(rubus_allegheniensis,rubus_phoenicolasius)rubus)rosaceae,acer_rubrum),vitis_vulpin)rosids;

Step 2: Work it with R

Now, load up R and call the ‘ape‘ package. Use the read.tree( ) command to read in the phylogeny. Then plot the phylogeny file.

rosa.tree <- read.tree('newick_phylo.txt')
plot(rosa.tree)

Voilà! Your phylogeny should look like this:

Basic phylogeny

** Note that the branch lengths assume constant age of divergence. We can fix that if we have estimates of divergence times for each node (i.e. branch occurrence) and run the phylogeny through Phylocom using the bladj command. I leave that one up to you. I recommend starting with Wikstrom et al. (2001) as a starting point for estimating divergence times.

But wait? None of the species names are capitalized? Easy fix! Load the ‘Hmisc‘ package that has a nifty capitalize( ) command and run the following:

tree$tip.label <- capitalize(tree$tip.label)
plot(tree)

Now we want to make the branches for invasive species red. This is trickier. Each ‘edge’ has a vector associated with it, so we can assign colors to all the edges. Finding out which edge is which is the hard part. I still haven’t figured it out just yet on a reliable basis, but it seems to order the edges going down and then going back up:

It looks easy, but try figuring it out on a larger tree.

We want edges 3 and 6 to be red, so the easiest way is to create 1×8 vector of black colors and then rename entries 3 and 6 to red:

edgecol <- rep('black', 8)
edgecol[c(3,6)] <- 'red'
plot(tree, edge.color=edgecol)

I also don’t like that the tip labels are so close to the edges, almost overlapping. We can add some space in using label.offset. Note that the value of label.offset will change for every phylogeny depending on whether you have ages/distances for your edges.

plot(tree, edge.color=edgecol, label.offset = 0.1)

The not-so-real deal.

And there’s your (basic) phylogeny! If you’ve run your Newick tree through bladj with ages for the nodes, you’ll get a nice phylogeny with variable branch lengths depending on the age of split. Also, be sure to check your species names. Notice that for some reason, Phylomatic output Vitis vulpin instead of Vitis vulpina. You can fix that at any step, in the newick text file or in R, but be sure to check your species names. Now, running a phylogenetic analysis like PGLS is a whole different story…

R for Ecologists: Creating a Site x Species Matrix

Today I’m going to adress a fairly common problem in ecology that has been coming up frequently as of late. The issue is how to create a site x species matrix for community composition analysis (i.e. ordination). Moreover, ecologists have to do a good deal of averaging if data are collected on multiple levels, such as averaging quadrats within plots. R makes doing this easy. For example, suppose I’m collecting data on herbaceous plant cover in forest patches. I set up several quadrats within a patch, but the patch is my true replicate, so I have to average over the quadrats within each patch.

Example of experimental layout. Here, there are three replicate patches, so I have to average quadrats within each patch.

Also, if you’re like most field ecologists, you probably don’t take a spreadsheet into the field with 200 columns, one for each species, so you can mark zeroes down for things that are absent. You probably have something like this:

Year

Patch

Quadrat

Species

Cover

2012

1

1

V. dentatum

1

2012

1

1

R. phoenicolasius

20

:

:

:

:

:

2012

1

2

V. dentatum

2

Now you have two issues: Your data is not in a site x species format, and even if it were, you need to add zeroes in for the species that weren’t observed in the quadrats because you only recorded what you saw, not what you didn’t. This becomes an issue for averaging over quadrats. The zeros must be included when taking the average of the quadrats. Fortunately, the ‘reshape‘ package of R makes this a snap to do.

Let’s suppose the above data were imported as a dataframe called ‘Patch.Cover’ and you have, being forward-thinking, already loaded the ‘reshape’ package. The first thing to do is to ‘cast’ your data into a site by species matrix, including all sampling levels. We keep the quadrat level in for now:

site.sp.quad <- cast(Patch.Cover, Year + Plot + Quad ~ Species, value='Cover', FUN=mean)

This code is pretty straightforward. The first argument is the dataframe. The second is a formula: on the left hand side are the factors you want to include and the right hand side is the factor you want to ‘transpose’, or convert into columns. FUN=mean tells it to take the mean value, which at this level, is just the observed cover because we’ve included all factors (i.e. it’s not going to aggregate or average over anything because each row has a unique identifier).

For whatever reason, ‘cast’ returns a funky output of class ‘cast’, so we need to make it a dataframe before we can mess with it.

site.sp.quad <- as.data.frame(site.sp.quad)

Now every year/plot/quadrat combination has been given a value for every species. This is great if zeroes had been recorded, but they were not. Instead, there is now an ‘NaN’ value where there was no cover entry

Year

Patch

Quadrat

R. phoenicoluasius

V. dentatum

2012

1

1

20

1

2012

1

2

NaN

2

We convert those NaN’s to 0.

site.sp.quad[is.na(site.sp.quad)] <- 0

We now have a full site x species matrix at the quadrat level that might look something like this.

Year

Patch

Quadrat

R. phoenicoluasius

V. dentatum

2012

1

1

20

1

2012

1

2

0

2

But we’re not done, we now have to average quadrats within plots. After thinking about it some, the best way I came up with was to collapse the data back into column form and then recast it at the plot level.

First, ‘melt’ the data back into column form:

column.quad <- melt(site.sp.quad, id=c('Year', 'Plot', 'Quad'))

The ‘id’ argument is a vector of the factors assigned to each plot, ‘melt’ figures out the rest. Now you have a much bigger column dataframe because zeroes have been added in. Now we can properly average over the plots:

site.sp.plot <- cast(column.quad, Year + Plot ~ variable, value='value', FUN=mean)

We left ‘Quadrat’ out of the formula so now each row is identified only by year and plot. Thus, each year/plot combination has multiple entries (one for each quadrat, three in the patch example) and FUN=mean takes the average of those entries. Notice ‘variable’ and ‘value’. That’s because the melt( ) command made the column name of the species column ‘variable’ and the cover column was called ‘value’. You can change these to whatever you want, but I generally don’t see the purpose.

So there it is, you’ve now got a site x species matrix appropriately formatted and averaged for all of your ordination and multivariate needs (which are another headache altogether). For anyone interested, I wrote a custom function that collapses all of these steps into one function:


site.sp <- function(data.frame, factors, obs, value, avg.over=''){
require(reshape)
fmla <- as.formula(paste(paste(factors, collapse='+'), obs, sep='~'))

full.data <- cast(data.frame, fmla, value=value, mean)
full.data <- as.data.frame(full.data)
full.data[is.na(full.data)] <- 0

col.full <- melt(full.data, id=factors)

factors.agg <- factors[which(factors!=avg.over)]
agg.fmla <- as.formula(paste(paste(factors.agg, collapse="+"), 'variable', sep='~'))
agg.data <- cast(col.full, agg.fmla, value=value, mean)

site.sp.data <<- as.data.frame(agg.data)
 }

It takes five arguments: data.frame (self explanatory), factors (a vector of ALL factors identifying a quadrat: Year, Plot, and Quadrat in the above example), obs (the name of the column including species names, ‘Species’ in the above example), value (the response variable, ‘Cover’ in the above example, but could be density or whatever), and avg.over (the factor you want to average out, ‘Quadrat’ in the above example). The default for avg.over is blank, so that if you don’t address this argument, you get a properly formatted non-averaged site x species matrix with all the factors.

I hope this helps. Feel free to critique the code and offer improvements.