Publications by Daniel Hocking

Model Validation: Interpreting Residual Plots

18.07.2011

When conducting any statistical analysis it is important to evaluate how well the model fits the data and that the data meet the assumptions of the model. There are numerous ways to do this and a variety of statistical tests to evaluate deviations from model assumptions. However, there is little general acceptance of any of the statis...

8316 sym 24 img

Plotting grouped data vs time with error bars in R

31.10.2011

This is my first blog since joiningR-bloggers. I’m quite excited to be part of this group and apologize if I boreany experienced R users with my basic blogs for learning R or offendprogrammers with my inefficient, sloppy coding. Hopefully writing for this mostexcellent community will help improve my R skills while helping other novice Rusers.I ...

13375 sym 16 img

R script to calculate QIC for Generalized Estimating Equation (GEE) Model Selection

23.03.2012

Generalized Estimating Equations (GEE) can be used to analyze longitudinal count data; that is, repeated counts taken from the same subject or site. This is often referred to as repeated measures data, but longitudinal data often has more repeated observations. Longitudinal data arises from studies in virtually all branches of science...

3040 sym R (1578 sym/1 pcs) 2 img

Installing and Running JAGS on Mac OS 10.5.8

26.03.2012

JAGS is an alternative to BUGS (WinBUGS or OpenBUGS) for conducting a Bayesian Analysis. It stands for Just Another Gibbs Sampler, and like WinBUGS, it is essentially an MCMC machine that employs a Gibbs sampler so you don’t have to write your own for every analysis. JAGS code is very similar to the more popular BUGS so it is an eas...

3032 sym 2 img

Plotting 95% Confidence Bands in R

26.07.2012

I am comparing estimates from subject-specific GLMMs and population-average GEE models as part of a publication I am working on. As part of this, I want to visualize predictions of each type of model including 95% confidence bands. First I had to make a new data set for prediction. I could have compared fitted values with confiden...

5443 sym 6 img

Stan for Bayesian Analysis

23.10.2012

Bayesian analysis has been growing in popularity among ecologists recently, largely due to accessible books such as Models for Ecological Data: An Introduction, Introduction to WinBUGS for Ecologists, and Bayesian Methods for Ecology. Most ecologists with limited programming background have chosen to implement Bayesian analyses using WinBUGS, Ope...

2477 sym R (600 sym/1 pcs) 16 img

GEE QIC update

15.11.2012

Here is improved code for calculating QIC from geeglm in geepack in R (original post). Let me know how it works. I haven’t tested it much, but is seems that QIC may select overparameterized models. In the code below, I had to replace Here is a quick example of how to run this function. First, highlight and run the code below in R. That will sa...

1610 sym R (2349 sym/3 pcs) 16 img

Building R packages: missing path to pdflatex

15.12.2012

Recently whiling trying to build an R package for generalized estimating equation model selection (QICpack on github), I was getting an error related to latex creating the PDF package manuals. It seems like this is a relatively common problem on some versions of Mac OS X, but I did not find it easy to find an answer so I thought I’d describe my...

1930 sym R (358 sym/7 pcs) 16 img

Effects of forest management on a woodland salamander in Missouri

25.01.2013

Effects of experimental forest management on a terrestrial, woodland salamander in Missouri by Daniel J. Hocking, Grant M. Connette, Christopher A. Conner, Brett R. Scheffers, Shannon E. Pittman, William E. Peterman, and Raymond D. Semlitsch. This is the first post in what will hopefully becomes a series of brief summaries of my papers as they ar...

3696 sym 20 img

No Statistical Panacea, Hierarchical or Otherwise

13.02.2013

Everyone in academia knows how painful the peer-review publication process can be. It’s a lot like Democracy, in that it’s the worst system ever invented, except for all the others. The peer-review process does a fair job at promoting good science overall, but it’s far from perfect. Sure anyone can point out a hundred flaws in the system, b...

8421 sym 16 img