263 search results for "PCA"

Demonstrating the Power of F Test with gWidgets

April 2, 2010
By

e know the real distribution of the F statistic in linear models — it is a non-central F distribution. Under H0, we have a central F distribution. Given 1 – α, we can compute the probability of (correctly) rejecting H0. I created a simple demo to illustrate how the power changes as other parameters vary,

Read more »

Looking for Software Paths in Windows Registry

March 28, 2010
By
Looking for Software Paths in Windows Registry

hen we want to call external programs in R under Windows, we often need to know the paths of these programs. For instance, we may want to know where ImageMagick is installed, as we need the convert (convert.exe) utility to convert images to other formats, or where OpenBUGS is installed because we need this path

Read more »

A Demo for the Ratio Estimation in Sampling Survey (Animation)

March 24, 2010
By
A Demo for the Ratio Estimation in Sampling Survey (Animation)

mber Watkins gave me a suggestion on the animation for the ratio estimation, and I think this is a good topic for my animation package. I’ve finished writing the initial version of the function sample.ratio() for this package, which will appear in the version 1.1-2 a couple of days later. As we know, the benefit

Read more »

Font Families for the R PDF Device

March 24, 2010
By

otivated by the excellent R package pgfSweave, I begin to notice the font families in my graphs when writing Sweave documents. The default font family for PDF graphs is Helvetica, which is, in most cases (I think), inconsistent with the LaTeX font styles. Some common font families are listed in ?postscript, and we can take

Read more »

Guess the Random Seed

March 12, 2010
By

tephanie asked in 511 today if we were able to get the random seed which was set by set.seed() but we were only given the random numbers (without knowing the seed). This kind of “hacker” questions sound interesting. One dirty solution should be the brute-force method, e.g: # x: the random vector; # FUN: the

Read more »

A quicky..

February 22, 2010
By

If you’re (and you should) interested in principal components then take a good look at this. The linked post will take you by hand to do everything from scratch. If you’re not in the mood then the dollowing R functions will help you. An example. # Generates sample matrix of five discrete clusters that have

Read more »

Press Enter in LyX Sweave as You Wish

February 18, 2010
By
Press Enter in LyX Sweave as You Wish

or a long time I’ve been wondering why we are not able to use Enter in the LyX Scrap environment which was set up by Gregor Gorjanc for Sweave. Two weeks ago, I (finally!) could not help asking Gregor about this issue, as I’m using “LyX + Sweave” more and more in my daily work.

Read more »

Updated Tactical Asset Allocation Results

February 6, 2010
By
Updated Tactical Asset Allocation Results

In November, I used the strategy in Mebane Faber's Tactical Asset Allocation paper to provide an introduction to blotter. Faber has updated the strategy's results through the end of 2009. For those interested, he expands on the paper in his book, The...

Read more »

A tale of two visualizations (because it’s Friday)

January 15, 2010
By
A tale of two visualizations (because it’s Friday)

GEEK FIGHT!!! says JD Long on Twitter as the New York Times publishes a widely-reposted interactive graphic about Netflix rental data, and the Wall Street Journal also gets into the interactive-viz game with a graphic on bank bonuses. If it's a fight, it's a knockout in the first round, if you ask me. There's no surprise why the Netflix...

Read more »

Create Animations in PDF Documents Using R

November 11, 2009
By

ince animation 1.0-9, we will be able to create a PDF document with an animation embedded in it; the function is saveLatex(), and its usage is similar to saveMovie() and saveSWF(): you pass an R expression for creating animations to this function, and this expression will be evaluated in the function; the image frames get

Read more »