Sample Size Calculators. New R package for K-S goodness-of-fit tests. This is a re-post from the R packages mailing list Greetings, We wanted to announce a new R package ‘KScorrect’ that carries out the Lilliefors correction to the Kolmogorov-Smirnoff test for use in (one-sample) goodness-of-fit tests.
It’s well-established it’s inappropriate to use the K-S test when sample statistics are used to estimate parameters, which results in substantially increased Type-II errors. This warning is mentioned in the ks.test Help page, but no general solution is currently available for non-normal distributions. The ‘KScorrect’ package corrects for the bias by using Monte Carlo simulation, a solution first recommended by Lilliefors (1967) but not widely heeded.
Using Google Analytics with R - ThinkToStart. For the most part, SMB’s tend to utilize free analytics solutions like Google Analytics for their web and digital strategy.
A powerful platform in its own right, it can be combined with the R to create custom visualizations, deep dives into data, and statistical inferences. This article will focus on the usage of R and the Google Analytics API. We will go over connecting to the API, querying data and making a quick time series graph of a metric. To make an API call, you’ll need two things. A Client ID and a Secret ID. Login to your GA analytics accountGo to the Google Developers page: a New Project and enable the Google Analytics APIOn the Credentials screen (under the API’s and auth menu), create a new Client ID for Application Type “Installed Application”Copy the Client ID and Client Secret.
Multilevel models. Formulae in R: ANOVA and other models, mixed and fixed. R’s formula interface is sweet but sometimes confusing.
ANOVA is seldom sweet and almost always confusing. And random (a.k.a. mixed) versus fixed effects decisions seem to hurt peoples’ heads too. So, let’s dive into the intersection of these three. I’m aware that there are lots of packages for running ANOVA models that make things nicer for particular fields. I’m just going to ignore them all here and focus on the builtin function aov and the standard mixed model package lme4. In the following, assume that Y is a dependent variable and A, B, C, etc. are predictors, all contained in data frame d. Formula Recap If you use R then you probably already know this, but let’s recap anyway. Lm(Y ~ A + B, data=d) Interactions are expressed succinctly with the asterisk lm(Y ~ A * B, data=d) or equivalently but more explicitly by specifying component parts using the colon notation, like lm(Y ~ A + B + A:B, data=d) This is useful for more complex interaction structures, e.g.
Sensitivity Analysis. Fitdistrplus: An R Package for Fitting Distributions. Nparcomp: An R Software Package for Nonparametric Multiple Comparisons. Dynamical Systems - Kalman Filter. Big Data. Quality control. Bayesian. Risk Analysis / Decision making. MOOCs. Data Analysis Examples. The pages below contain examples (often hypothetical) illustrating the application of different statistical analysis techniques using different statistical packages.
Each page provides a handful of examples of when the analysis might be used along with sample data, an example analysis and an explanation of the output, followed by references for more information. These pages merely introduce the essence of the technique and do not provide a comprehensive description of how to use it. The combination of topics and packages reflect questions that are often asked in our statistical consulting. As such, this heavily reflects the demand from our clients at walk in consulting, not demand of readers from around the world.
Many worthy topics will not be covered because they are not reflected in questions by our clients. For grants and proposals, it is also useful to have power analyses corresponding to common data analyses. Resources to help you learn and use R.
Machine Learning. Clustering. Classification. Neural Networks. GLM - GAM. Finding the Best Subset of a GAM using Tabu Search and Visualizing It in R. The famous probabilist and statistician Persi Diaconis wrote an article not too long ago about the "Markov chain Monte Carlo (MCMC) Revolution.
" The paper describes how we are able to solve a diverse set of problems with MCMC. The first example he gives is a text decryption problem solved with a simple Metropolis Hastings sampler. I was always stumped by those cryptograms in the newspaper and thought it would be pretty cool if I could crack them with statistics. So I decided to try it out on my own. The example Diaconis gives is fleshed out in more details by its original authors in its own article. The decryption I will be attempting is called substitution cipher, where each letter of the alphabet corresponds to another letter (possibly the same one).
The strategy is to use a reference text to create transition probabilities from each letter to the next. To create a transition matrix, I downloaded War and Peace from Project Gutenberg.