# Blog Archives

## Bayesian Binomial Test in R

Summary: in this post, I implemenent an R function for computing $$P(\theta_1 __ \theta2)$$, where $$\theta_1$$ and $$\theta_2$$ are beta-distributed random variables. This is useful for estimating the probability that one binomial proportion is greater than another. I am working on a project in which I need to compare two binomial proportions to see...

## A Bayesian approach to modelling censored data

For thise case, we can write Bayes formula as: The two components in the numerator are: The probability of the data given a $$\mu$$ and $$\sigma$$, also called the likelihood function: $$p(y|\mu,\sigma)$$ The probability of a given $$\mu$$ and $$\sigma$$, before seeing any data; also called the prior likelihood: \( p(\mu,...

## NHANES made simple with RNHANES Scientists spend a lot of time “munging” data. Finding, cleaning, and managing datasets can take up the majority of the time it takes to complete an analysis. Tools that make the munging process easier can save scientists a lot of time. We are tackling a small part of this problem in the context of the CDC’s National Health and Nutrition...

## NHANES made simple with RNHANES Scientists spend a lot of time “munging” data. Finding, cleaning, and managing datasets can take up the majority of the time it takes to complete an analysis. Tools that make the munging process easier can save scientists a lot of time. We are tackling a small part of this problem in the context of the CDC’s National Health and Nutrition...

## Fitting censored log-normal data Data are censored when samples from one or both ends of a continuous distribution are cut off and assigned one value. Environmental chemical exposure datasets are often left-censored: instruments can detect levels of chemicals down to a limit, underneath which you can’t say for sure how much of the chemical was present. The chemical may not have been present...

## Fitting censored log-normal data Data are censored when samples from one or both ends of a continuous distribution are cut off and assigned one value. Environmental chemical exposure datasets are often left-censored: instruments can detect levels of chemicals down to a limit, underneath which you can’t say for sure how much of the chemical was present. The chemical may not have been present...

## ggplot2 axis limit gotchas Setting axis limits in ggplot has behaviour that may be unexpected: any data that falls outside of the limits is ignored, instead of just being hidden. This means that if you are apply a statistic or calculation on the data, like plotting a box and whi...

## ggplot2 axis limit gotchas Setting axis limits in ggplot has behaviour that may be unexpected: any data that falls outside of the limits is ignored, instead of just being hidden. This means that if you apply a statistic or calculation on the data, like plotting a box and whisker...