Publications by denishaine

Publishing in Veterinary Academic Journals

10.05.2011

Following the post by Arthur Charpentier (Freakonometrics), I wondered what would be the outcome considering my current engagement (veterinary medicine, epidemiology, bovine mastitis). Briefly, Arthur Charpentier’s post looked at clusters of journals publishing the same kind of papers. So I looked at 25 journals (Journal of Dairy Science, Canad...

4425 sym R (419 sym/3 pcs) 30 img

R, JAGS and ggplot2

24.05.2011

Last week a question was asked on the ggplot2 list about using ggplot2 and jags in R (). Here’s what was my answer (a bit updated): Using as an example the school dataset from R2WinBUGS package: Than you can use the mcmcplots package which give a “feel” of ggplot2: If you really want to use […] Related To leave a comment for...

705 sym 2 img

Beeswarm Plot with ggplot2

16.09.2011

A colleague showed me results of his study project with beeswarm plots made by GraphPad. I was wondering if it could be implemented in R and more specifically with ggplot2. There is a R package allowing to draw such graphs, the beeswarm package (beeswarm, cran). An implementation was shown on R-statistics blog but not with […] Rela...

738 sym 2 img

Reproducible Research Using Sweave and LaTeX

08.06.2012

Here are the slides given during the Montreal R User Group workshop on April 30, 2012. RR-MtlRUsers.beamer Related To leave a comment for the author, please follow the link and comment on their blog: denis haine » R. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Clic...

516 sym 2 img

Veterinary Epidemiologic Research: Linear Regression

14.02.2013

This post will describe linear regression as from the book Veterinary Epidemiologic Research, describing the examples provided with R. Regression analysis is used for modeling the relationship between a single variable Y (the outcome, or dependent variable) measured on a continuous or near-continuous scale and one or more predictor (independent o...

3551 sym R (7834 sym/10 pcs) 26 img

Veterinary Epidemiologic Research: Linear Regression Part 2 – Checking assumptions

06.03.2013

We continue on the linear regression chapter the book Veterinary Epidemiologic Research. Using same data as last post and running example 14.12: tmp <- tempfile() download.file("http://ic.upei.ca/ver/sites/ic.upei.ca.ver/files/ver2_data_R.zip", tmp) # fetch the file into the temporary file load(unz(tmp, "ver2_data_R/daisy2.rdata")) # extract the ...

3521 sym R (6577 sym/7 pcs) 40 img

Veterinary Epidemiologic Research: Linear Regression Part 3 – Box-Cox and Matrix Representation

11.03.2013

In the previous post, I forgot to show an example of Box-Cox transformation when there’s a lack of normality. The Box-Cox procedure computes values of which best “normalises” the errors. value Transformed value of Y 2 1 0.5 0 -0.5 -1 -2 For example: lm.wpc2 <- lm(wpc ~ vag_disch + milk120 + milk120.sq, data = da...

1077 sym R (2438 sym/10 pcs) 42 img 1 tbl

Veterinary Epidemiologic Research: GLM – Logistic Regression

14.03.2013

We continue to explore the book Veterinary Epidemiologic Research and today we’ll have a look at generalized linear models (GLM), specifically the logistic regression (chapter 16). In veterinary epidemiology, often the outcome is dichotomous (yes/no), representing the presence or absence of disease or mortality. We code 1 for the presence of th...

6001 sym R (4935 sym/9 pcs) 50 img

Veterinary Epidemiologic Research: GLM – Logistic Regression (part 2)

17.03.2013

Second part on logistic regression (first one here). We used in the previous post a likelihood ratio test to compare a full and null model. The same can be done to compare a full and nested model to test the contribution of any subset of parameters: mod1.nest <- glm(casecont ~ dcpct, family = binomial("logit"), + data = nocardia) lr.m...

2125 sym R (3175 sym/4 pcs) 8 img

Veterinary Epidemiologic Research: GLM – Evaluating Logistic Regression Models (part 3)

19.03.2013

Third part on logistic regression (first here, second here). Two steps in assessing the fit of the model: first is to determine if the model fits using summary measures of goodness of fit or by assessing the predictive ability of the model; second is to deterime if there’s any observations that do not fit the model or that have an influence on ...

4792 sym R (6242 sym/11 pcs) 30 img