# Posts

## Migration!

All the posts on this site have migrated to drewtyre.rbind.io. Comment threads didn’t, so you might still find the posts below useful. But as of the start of July 2017, nothing new will appear here.

## The beginning of the end!

I’m in the process of converting everything over to blogdown/hugo/netlify. Hopefully everything here will easily migrate over, although for the moment I also expect to leave it all here in the (highly unlikely) case someone has a permanent link to a page somewhere. When I get the new domain name sorted I’ll post it here.

## Does model averaging make sense?

Brian Cade published a scathing condemnation of current statistical practices in ecology. It promises to be highly influential; I have seen it cited by reviewers already. I agree with a great many points Brian raised. I also disagree with one very central point.

## How to read a tab delimited file

The semester long course from Data Carpentry uses read.csv(..., sep="\t") to read tab delimited files. I’ve been using readr::read_tsv() because … well, just because! A student in my data management class (reasonably) had this question:

## What's the best way to implement the logistic model in R?

I’m teaching my population dynamics class using R for the first time. I want the students to use a simple logistic population model to make predictions about how population size will respond to different management actions. So, I need to figure out the best way to implement a discrete time, logistic growth model in R.

## Accounting for exposure days

Every year I suggest a student use Terry Shaffer’s log exposure models for nest survival (Shaffer 2004). And every year I spend hours trying to figure out why the code in the help section of ?family doesn’t work. So this year I’m writing it down.

## Statistics training

This tweet sparked a host of comments about the need for R prep courses, as well as some great gifs! This is my R prep course, with a few other computational skills thrown in for good measure.

## What about that 1970's ice age?

A good friend posted this link to FB. I read the post, did some background reading, and debated whether to write this post or not. I’ve been writing it in my head anyway, so time to get it out!

## Slow Science

I’ve heard a number of calls for faculty to slow down, think, and write. This is the latest, by Allison Adams from Emory University. I’m trying, but it’s hard.

## Diversity matters. Everywhere.

Yesterday a colleague posted a link to an article in The Federalist calling out liberals for not listening. I think the author has a point.

At a reader’s request I’m attempting to add disqus comments to my blog posts. Ignore this post!

## Statistical training in ecology

This article made the rounds of twitter recently. I agree. There is a mismatch between statistical practice and training. Almost the first thing I did was flip to the appended data and see how they categorized UNL. I was relieved to see that we have a course “beyond linear models”; mine!

## Should I use sum-to-zero contrasts?

A sum-to-zero contrast codes a categorical variable as deviations from a grand mean. Social scientists use them extensively. Should ecologists?

TL;DR No.

## R vs. ArcGIS

This question arose from these exercises.

## Lists of models in a data.frame

So a couple weeks ago I had a stab at putting a list of fitted models into a data.frame. I didn’t succeed. So, here’s another try.

## How do predators change population growth, part II?

Last week I starting thinking about how predation might affect a species that otherwise experiences logistic growth due to intra-specific competition. I looked at predators with both Type I and Type II functional responses to their prey. What about predators with Type III responses?

## How do predators change population growth?

The logistic model of population growth includes the effects of predation. Predators are one of the factors contributing to death rates, and so if a species has any predators at all, predation is part of the logistic model. This isn’t widely appreciated. What I want to do here is ask what kinds of predation are consistent with the basic logistic model.

## Happy houR!

It’s happy houR. I’m in a happy place, and I’m going to spend an hour trying to learn something new. Earlier today I watched a video of Hadley Wickham explaining his approach to handling many models. Now I want to see if this combination of purrr and broom can make my approach to multi-model inference easier.

## Scaling and Centering

Centering and rescaling covariates is a common task prior to building almost any sort of statistical model. Although function scale() will scale scale and center numeric matrices, it always returns a matrix. Most model fitting functions take data.frames. And although scale() will take a data.frame as an input, it fails with an error if there is even one column that is a categorical variable. That’s always bugged me, and I’ve been musing about a solution for awhile. I’ve also wanted to try making an R package using the fancy automation tools available in RStudio and package devtools. Today those musings and desires collided, and I give you scaler!

## The sex ratio of chickens

I got the following email the other day

Hadley Wickham’s dplyr package makes complex data manipulations easy to describe. However, dplyr functions all return “tibbles” rather than data.frames. Class tbl inherits from data.frame, so you can use tbls everywhere you use data.frames. Except when you can’t.