Analytical and simulation-based power analyses for mixed-design ANOVAs

May 21, 2013
By
Analytical and simulation-based power analyses for mixed-design ANOVAs

In this post I show some R-examples on how to perform power analyses for mixed-design ANOVAs. The first example is analytical—and adapted from formulas used in G*Power (Faul et al., 2007), and the second example is a Monte Carlo simulation. Read more

Read more »

Analytical and simulation-based power analyses for mixed-design ANOVAs

May 21, 2013
By
Analytical and simulation-based power analyses for mixed-design ANOVAs

In this post I show some R-examples on how to perform power analyses for mixed-design ANOVAs. The first example is analytical — adapted from formulas used in G*Power (Faul et al., 2007), and the second example is a Monte Carlo simulation. The source code is embedded at the end of this post. Both functions require a dataframe, containing the parameters that will be used in...

Read more »

Get your questions answered about Open Data

May 21, 2013
By

The OpenData StackExchange site has just launched in beta, and looks to be a great resource for open data sources. Like StackOverflow for programming and CrossValidated for statistics, OpenData is is a question and answer site for developers and researchers interested in open data. There's no R tag yet (though that would be nice for data sources specifically compatible...

Read more »

Getting to the point – an alternative to the bezier arrow

May 21, 2013
By
Getting to the point – an alternative to the bezier arrow

An alternative bezier arrow to the regular grid-bezier. Apart from a cool gradient it has the advantages of: exact width, exact start/end points and axis...

Read more »

Spatial correlograms in R: a mini overview

May 21, 2013
By
Spatial correlograms in R: a mini overview

Spatial correlograms are great to examine patterns of spatial autocorrelation in your data or model residuals. They show how correlated are pairs of spatial observations when you increase the distance (lag) between them - they are plots of some index…Read more →

Read more »

Pivot Tables for R: Try sqldf

May 21, 2013
By

Pivot tables are a a growing staple for analysis in excel yet they remain limited to the functionality which Microsoft has chosen to include. Typical operations are the inclusion of filters, choice over rows, columns, and maths operations. In R … Continue reading →

Read more »

R Quick Tip: Shutdown Windows after Script Has Finished

May 21, 2013
By

Quite often I have long procedures running and want to do this over night. However, my computer would still be running all night after the script has finished. This is easily circumvented by the following lines that I put at the end of such a script:# set working dir# setwd("C:/Users/Kay/Desktop")# long procedure:for(i in 1:1e+5) {cat(i); cat("\n..................\n")}d # save...

Read more »

Package party: Conditional Inference Trees

May 21, 2013
By
Package party: Conditional Inference Trees

I am going to be using the party package for one of my projects, so I spent some time today familiarising myself with it. The details of the package are described in Hothorn, T., Hornik, K., & Zeileis, A. (1999). “party: A Laboratory for Recursive Partytioning” which is available from CRAN. The main workhorse of

Read more »

Slide: one function for lag/lead variables in data frames, including time-series cross-sectional data

May 21, 2013
By

I often want to quickly create a lag or lead variable in an R data frame. Sometimes I also want to create the lag or lead variable for different groups in a data frame, for example, if I want to lag GDP for each country in a data frame. I've found the various R methods for doing this hard...

Read more »

An R debugging example

May 21, 2013
By

The steps taken to fix an R problem. Task To prepare for the Portfolio Probe blog post called “Implied alpha and minimum variance”, I tried to update a matrix of daily stock prices using a function I had written for the purpose. Error When I tried to do what I wanted, I got: > univclose130518 The post An...

Read more »

Geolocate IP addresses in R

May 20, 2013
By
Geolocate IP addresses in R

This R function uses the free freegeoip.net geocoding service to resolve an IP address (or a vector of them) into country, region, city, zip, latitude, longitude, area and metro codes. Continue reading →

Read more »

R programming challenge: Escape the zombie horde

May 20, 2013
By
R programming challenge: Escape the zombie horde

So when the world is taken over by a Zombie horde, you're going to want to figure out a way to get the human population to safety. This R script by econometrician Francis Smart won't help you do that exactly, but given a list of waypoints to navigate through zombie-infested lands to a safe house, it will tell you...

Read more »

Solving Multiple Supplier Selection Problem using R and LP Solve

May 20, 2013
By
Solving Multiple Supplier Selection Problem using R and LP Solve

(This article was first published on Enterprise Software Doesn't Have to Suck, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on their blog: Enterprise Software Doesn't Have to Suck. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs,...

Read more »

Non-Verbal Reasoning Test – Concerto

May 20, 2013
By
Non-Verbal Reasoning Test – Concerto

I have just released my first complete test of non-verbal problem solving skills.  It is run on Concerto (an R-based application development platform targeted at primarily test developers)  Try it out by following the link below.Non-Verbal Re...

Read more »

R 3.0.1 is released

May 20, 2013
By
R 3.0.1 is released

R 3.0.1 (codename “Good Sport”) was released last week. As mentioned earlier by David, this version improves serialization performance with big objects, improves reliability for parallel programming and fixes a few minor bugs. Upgrading to R 3.0.1 You can download …Read more »

Read more »

R/Finance 2013 slides

May 20, 2013
By
R/Finance 2013 slides

I have just returned from the R/Finance conference and want to share with you my slides and examples. The Cluster Risk Parity portfolio allocation method is an example of Cluster Portfolio Allocation methods that focuses on diversification or more specifically diversification of your risk bets. (i.e. portfolio that distributes risk equally both within clusters and

Read more »

More on Chutes & Ladders

May 20, 2013
By
More on Chutes & Ladders

Matt Maenner asked about the sawtooth pattern in the figure in my last post on Chutes & Ladders. Damn you, Matt! I thought I was done with this. Don’t feed my obsession. My response was that if the game ends early, it’s even more likely that it’ll be the kid who went first who won.

Read more »

Model fitting exam problem

May 20, 2013
By

Recently I have run an exam where the following question had risen many problems for students (here I give its shortened formulation). You are given the data generating process y = 10x + e, where e is error term. Fit linear regression using lm, ne...

Read more »

qdap 0.2.2 released

May 20, 2013
By
qdap 0.2.2 released

I’m very pleased to announce the release of qdap 0.2.2 This is the third installment of the qdap package available at CRAN. The qdap package automates many of the tasks associated with quantitative discourse analysis of transcripts containing discourse, including … Continue reading →

Read more »

Implied alpha and minimum variance

May 20, 2013
By
Implied alpha and minimum variance

Under the covers of strange bedfellows. Previously The idea of implied alpha was introduced in “Implied alpha — almost wordless”. In a comment to that post Jeff noticed that the optimal portfolio given for the example is ever so close to the minimum variance portfolio.  That is because there is a problem with the example … Continue reading...

Read more »

analyze the new york city housing and vacancy survey (nychvs) with r

May 19, 2013
By

for those interested in the real estate and rental markets of the big apple, the census bureau's nyc housing and vacancy survey might be your key to the city.  if you care about how many new york residents live more than one person per room (a lot...

Read more »

When Does the Kinetic Theory of Gases Fail? Examining its Postulates with Assistance from Simple Linear Regression in R

When Does the Kinetic Theory of Gases Fail?  Examining its Postulates with Assistance from Simple Linear Regression in R

Introduction The Ideal Gas Law, , is a very simple yet useful relationship that describes the behaviours of many gases pretty well in many situations.  It is “Ideal” because it makes some assumptions about gas particles that make the math and the physics easy to work with; in fact, the simplicity that arises from these

Read more »

Playing cards in Vegas?

May 19, 2013
By
Playing cards in Vegas?

In a previous post, a few weeks ago, I mentioned that I will be in Las Vegas by the end of July. And I took the opportunity to write a post on roulette(s). Since some colleagues told me I should take some time to play poker there, I guess I have to understand how to play poker… so I...

Read more »

More tide prediction with R

May 19, 2013
By

In the previous post I outlined how to query the XTide software with R and parse the results into a handy-dandy data frame. The biggest hurdle with that method is getting XTide up and running on your computer. The code outlined here works entirely within R, so you don’t need XTide installed on your computer.

Read more »

R code to obtain and plot rainfall data for the whole world

If you want to create rainfall maps for the whole world in R there is no readily available code or package to do this. Moreover, data publicly available from research institutions is not generally in plain text format or other familiar formats. Hydrological and climatological studies sometimes require rainfall data over the entire world for long periods of time....

Read more »

Exploratory Data Analysis – Computing Descriptive Statistics in R for Data on Ozone Pollution in New York City

Exploratory Data Analysis – Computing Descriptive Statistics in R for Data on Ozone Pollution in New York City

Introduction This is the first of a series of posts on exploratory data analysis (EDA).  This post will calculate the common summary statistics of a univariate continuous data set – the data on ozone pollution in New York City that is part of the built-in “airquality” data set in R.  This is a particularly good data set

Read more »

Update to PSID panel builder for R: psidR

May 19, 2013
By

I just pushed the most recent version of the PSID panel data builder introduced a little while ago. Got some user feedback and made some improvements. The package is hosted on github.News:I added a reproducible example using artificial data which you c...

Read more »

Conversion between Factor and Dummies in R

May 18, 2013
By
Conversion between Factor and Dummies in R

Read more »

Sharing my R notes

May 18, 2013
By
Sharing my R notes

I started working with R 2 1/2 years ago. I remember opening R closing it and thinking it was the dumbest thing ever (command line to a non programmer is not inviting). Now it’s my constant friend. From the beginning … Continue reading →

Read more »

Sponsors

Mango solutions



RStudio homepage



Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



http://www.eoda.de







ODSC

ODSC

CRC R books series





Six Sigma Online Training





Contact us if you wish to help support R-bloggers, and place your banner here.