I honestly have no book on R programming. In fact I have not a single book on programming at all (my coding proves that ;x). I am pretty sure that I am gonna order (just did!) that book.

You can get a look of Matloff’s text here (= pdf for ya)
Posts tagged with R
I honestly have no book on R programming. In fact I have not a single book on programming at all (my coding proves that ;x). I am pretty sure that I am gonna order (just did!) that book.

You can get a look of Matloff’s text here (= pdf for ya)
I was writing earlier today that I am getting really fed to using the same datasets over and over again. Of course using the same data over time with different methods (eg look this) serves really well on a comparison scope but still we can use other data in a web world. For example, you can get interesting sets from BuzzData (or similar services).
Manos Parzakonis - 12:31 μ.μ. - Δημόσιο
Plz don’t make me type
data(BostonHousing)
PS: Of course you can add me to your Google+ circles…
I found time and read Gelman and Hill’s “Data Analysis Using Regression and Multilevel / Hierarchical Models“…Now, please do yourself a favour and get it (of course the paperback version
). Even for experienced or intermediate (myself) this will be a treat for your eyes and neurons.
From the book website :
IPSUR stands for Introduction to Probability and Statistics Using R,
ISBN: 978-0-557-24979-4, which is a textbook written for an
undergraduate course in probability and statistics. The approximate
prerequisites are two or three semesters of calculus and some linear
algebra in a few places. Attendees of the class include mathematics,
engineering, and computer science majors.
Now, there is a new way to read R books (anyway, new to me!)
1 2 3 | install.packages("IPSUR", repos="http://cran.r-project.org") library(IPSUR) read(IPSUR) |
Recently I was in need of testing a mean vector. I wrote a few lines of code in R and had it done perfectly. Hotelling test is one of the least interesting test to me. never really figured out why…
At that time I had some time to search more about it. One of the most common things to search for a test is a robust version of it (at least that’s what I search for!). A little search in the 3rd page of google results leads to the following :
One-sample and two-sample robust Hotelling tests with fast and robust bootstrap
The classical Hotelling test for testing if the mean equals a certain value or if two means are equal is modified into a robust one through substitution of the empirical estimates by the MM-estimates of location and scatter. The MM-estimator, using Tukey’s biweight function, is tuned by default to have a breakdown point of 50% and 95% location efficiency. This could be changed through the control argument if desired.
Robust Hotelling T2 test
Performs one and two sample Hotelling T2 tests as well as robust one-sample Hotelling T2 test.
The first uses MM and S estimators while the latter a Minimum Covariance Determinant one. You can get info on those on the links in the end of the post. What might be crucial to you is that MM/S estimators would be more time comsuming compared to MCD. A little demonstation is the following.. Read the rest of this entry »
is maps and geographical data representation in R.
In case you’re curious too this is a good study material from R-Bloggers :
maps ; geographical ; spatial
Ok. This could be a tweet rather than a post…
The new version is here.
R version 2.11.0 has been released on 2010-04-22. The source code is first available in this directory, and eventually via all of CRAN. Binaries will arrive in due course (see download instructions above).
There is a central notion in Time Series Econometrics, cointegration. Loosely it refers to finding the long run equilibrium of two non-stationary series. As the most know non-stationary series examples comes from finance, cointegration is nowadays a tool for traders (not a common one though!). They use it as the theory behind pairs trading (aka Statistical Arbitrage).
In the following lines we use a simple pairs trading technique, studying the ratio of the two price evolution series. We use the New York versions of two of the greatest players in ATHEX, NBG and OTE.
stock <- "NBG"
stock1 <- "OTE"
start.date <- "2003-10-20"
end.date <- Sys.Date()
quote <- paste("http://ichart.finance.yahoo.com/table.csv?s=",
stock,
"&a=", substr(start.date,6,7),
"&b=", substr(start.date, 9, 10),
"&c=", substr(start.date, 1,4),
"&d=", substr(end.date,6,7),
"&e=", substr(end.date, 9, 10),
"&f=", substr(end.date, 1,4),
"&g=d&ignore=.csv", sep="")
quote1 <- paste("http://ichart.finance.yahoo.com/table.csv?s=",
stock1,
"&a=", substr(start.date,6,7),
"&b=", substr(start.date, 9, 10),
"&c=", substr(start.date, 1,4),
"&d=", substr(end.date,6,7),
"&e=", substr(end.date, 9, 10),
"&f=", substr(end.date, 1,4),
"&g=d&ignore=.csv", sep="")
dataNBG.l <- read.csv(quote, as.is=TRUE)
dataOTE.l <- read.csv(quote1, as.is=TRUE)
X2=dataOTE.l[order(dataOTE.l$Date),];Y2=dataNBG.l[order(dataNBG.l$Date),]
Inspired from a mail that came along the previous random generation post the following question rised :
How to draw random variates from the Von Mises distribution?
First of all let’s check the pdf of the probability rule, it is $$ f(x):=\frac{e^{b \text{Cos}[y-a]}}{2 \pi \text{BesselI}[0,b]}$$, for $$-\pi \leq x\leq \pi $$.
Ok, I admit that Bessels functions can be a bit frightening, but there is a work around we can do. The solution is a Metropolis algorithm simulation. It is not necessary to know the normalizing constant, because it will cancel in the computation of the ratio. The following code is adapted from James Gentle’s notes on Mathematical Statistics .
n <- 1000
x <- rep(NA,n)
a <-1
c <-3
yi <-3
j <-0
i<-2
while (i < n) {
i<-i+1
yip1 <- yi + 2*a*runif(1)- 1
if (yip1 < pi & yip1 > - pi) {
if (exp(c*(cos(yip1)-cos(yi))) > runif(1)) yi <- yip1
else yi <- x[i-1]
x[i] <- yip1
}
}
hist(x,probability=TRUE,fg = gray(0.7), bty="7")
lines(density(x,na.rm=TRUE),col="red",lwd=2)
This is the announcement as posted in the mailing list :
This is to announce that we plan to release R version 2.11.0 on Thursday, April 22, 2010. Those directly involved should review the generic schedule at http://developer.r-project.org/release-checklist.html The source tarballs will be made available daily (barring build troubles) via http://cran.r-project.org/src/base-prerelease/ For the R Core Team Peter Dalgaard