Random assignment failure rates when group size is 1,500 or smaller

Assigning subjects to treatment and control groups randomly is called random assignment. Although random assignment creates a statistical expectation that the characteristics of the two groups will be the same, it has a remarkably high failure rate.

Continue reading “Random assignment failure rates when group size is 1,500 or smaller”

R’s Distribution Functions

R has four standard functions for specific ways that numbers can be distributed. In general, the names of the functions begin with either r, d, p, or q and end with an abbreviation for a kind of distribution. For example, runif is the r function for uniformly distributed numbers while rnorm is the r function for normally distributed numbers.

Continue reading “R’s Distribution Functions”

Installing the data.table package on Amazon Linux – LEMRS v0.6

This week I’ve upgraded the server to LEMRS v0.6, which adds three R packages for meta-analysis, esc, metafor, and robumeta.

The esc package requires another, much larger R package called data.table. That package, however, wouldn’t install. Like many R packages, data.table required the installation to do an automatic compilation of code written in C, but the C compiler couldn’t find some of the files it needed. This is because Amazon Linux uses non-standard folder locations for many of those files.

Continue reading “Installing the data.table package on Amazon Linux – LEMRS v0.6”

LEMRS v0.5 – Adding rvest and aws.signature

I’ve been having problems with the web version of the Open-Meta app crashing with a C stack usage error. I entered an issue on the Shiny Server Github page and with the help of others who have had this problem, now suspect that the error is caused by the rJava package, which is required by mailR, the package I’ve been using to send email.

Continue reading “LEMRS v0.5 – Adding rvest and aws.signature”

Shiny button observer update: ignoring clicks on disabled buttons

In earlier posts, I’ve explained how to add a bit of JavaScript/jQuery code to your project that lets you have one Shiny observeEvent() handler for all your button and anchor clicks. This week I needed disabled buttons, which are easy to do visually by adding the Bootstrap disabled class to the button. But the buttons still responded to being clicked.

Continue reading “Shiny button observer update: ignoring clicks on disabled buttons”

How to source a mysqldump file with syntax statements

MySQL provides an external program called mysqldump that writes a file full of MySQL syntax statements that will recreate a database’s tables and their contents. Back in the Apple II days this kind of file was called an exec file. Windows calls them batch files and Linux calls them shell scripts, of which one common format is the bash file. You can create the same thing with HeidiSQL by right-clicking on the database you want to save or duplicate and selecting Export database as SQL.

Continue reading “How to source a mysqldump file with syntax statements”

Why is my logical && comparison producing NA?

Who knew? I thought the difference between & and && for ANDing logical vectors in R was just that & evaluated the whole expression while && started at the left and went right until it hit a FALSE value. But there’s more. & is vectorized, but && only considers the first value in a vector and only returns a single value.

Continue reading “Why is my logical && comparison producing NA?”

R packages – attached vs loaded – all about those double::colons

It all seems so simple. You install R packages on your system with install.packages(package). This downloads the code and saves it on your computer. You can see what you’ve installed with installed.packages(). And when you want to use a package in your code, you start the code with library(package).

Continue reading “R packages – attached vs loaded – all about those double::colons”

Alternatives to the Open-Meta.app

The vision for the Open-Meta app is that it will unleash the power to discover what’s real to anyone who is willing to work in the open, subject to the review of others.

It should be both useful in itself as a tool and useful for teaching best practices in reviewing and synthesizing research.

It should support the entire process of creating a systematic review and meta-analysis, from writing a project protocol based on the PRISMA-P guidelines, to uploading citations from academic databases, through stage 1 review, data extraction, and statistical analysis, to downloading graphics, tables, and bibliographies for publication.

Continue reading “Alternatives to the Open-Meta.app”