Monthly Archives: October 2010

Convert decimal to IEEE-754 in R

October 6, 2010
By

For some theory on the standard IEEE-754, you can read the Wikipedia page. Here I will post only the code of the function to make the conversion in R.


First we write some functions to convert decimal numbers to binary numbers:


decInt_to_8bit q r xx for(i in 1:precs){
xx q r xx }
rr return(rr)
}

devDec_to_8bit nas nbs xxs for(i in 1:precs)
{
xxs...

Read more »

How fast is JAGS?

October 6, 2010
By
How fast is JAGS?

From Martyn Plummer, on the JAGS news blog. Key graph below, showing a few outlying cases in which JAGS is substantially slower than OpenBUGS, but generally, JAGS performs quite favorably. Key point from Martyn: Incidentally, these figures are for JAGS with the glm module loaded. The glm module is not loaded by default. If you

Read more »

Typos…

October 5, 2010
By
Typos…

Edward Kao just sent another typo found both in  Monte Carlo Statistical Methods (Problem 3.21) and in Introducing Monte Carlo Methods with R (Exercise 3.17), namely that should be I also got another email from Jerry Sin mentioning that matrix summation in the matrix commands of Figure 1.2 of Introducing Monte Carlo Methods with R

Read more »

The Data Science Venn Diagram

October 5, 2010
By
The Data Science Venn Diagram

Whenever I'm asked, "Who uses R?", I usually rattle off a long list of job titles: statistician, analyst, quant, researcher ... and that's before all the domain-specific titles. It would be nice if there were a simple, succinct phrase to describe the process of working with, analyzing, and communicating with real data. At the new blog, "dataists", the inaugural...

Read more »

Arctic Sea Ice Extent Trends: 1979-2010; Update 1

October 5, 2010
By
Arctic Sea Ice Extent Trends: 1979-2010; Update 1

Now that the 2010 Arctic sea ice melt season is over, we can see how 2010 fits into the long-term trends Arctic  Sea Ice Extent. This post shows an R Climate chart that I have made to look at the … Continue reading →

Read more »

Example 8.8: more Hosmer and Lemeshow

October 5, 2010
By
Example 8.8: more Hosmer and Lemeshow

This is a special R-only entry.In Example 8.7, we showed the Hosmer and Lemeshow goodness-of-fit test. Today we demonstrate more advanced computational approaches for the test.If you write a function for your own use, it hardly matters what it looks l...

Read more »

India Australia test cricket matches over the years

October 5, 2010
By
India Australia test cricket matches over the years

If you're like me - chewing your nails, sitting in the same position for the last 2 hours to watch India battle Australia in the Mohali test match and enjoying the fascinating duel, watch how closely these two teams have fought in the past. This plot s...

Read more »

India Australia test cricket matches over the years

October 5, 2010
By
India Australia test cricket matches over the years

If you're like me - chewing your nails, sitting in the same position for the last 2 hours to watch India battle Australia in the Mohali test match and enjoying the fascinating duel, watch how closely these two teams have fought in the past. This plot s...

Read more »

Why R is better than Excel for teaching statistics

October 4, 2010
By
Why R is better than Excel for teaching statistics

This was the topic of a recent conversation on the Australian and New Zealand R mailing list. Here is an edited list of some of the comments made. R is free. R is well-documented. R runs (really well) on *nix as well as Windows and Mac OS. R is open-source. Trust in the R software

Read more »

S4 classes in R: printing function definition and getting help

October 4, 2010
By

I’m not very familiar with S4 classes and methods, but I assume it’s the recommended way to write new packages since it is newer than S3; this of course is open to debate. I’ll outline my experience of programming with S4 classes and methods in a later post, but in the mean time, I want... Read more »