[R] implicit data frame reference

2011-09-13 Thread Benjamin Polidore
If I create an aggregation like this: aggregate(lastYear[,8:10],list(Stadium=lastYear$STAD),mean) I'll get a new data frame, which I can order if I assign it like this: newFrame <- aggregate(lastYear[,8:10],list(Stadium=lastYear$STAD),mean) newFrame[order(newFrame$TEMP),] But.. if I just want t

[R] Comparing skewness of two distributions

2011-08-26 Thread Benjamin Polidore
I have two distributions. Both are left skewed. Is there a good statistical approach to determining if the skew of distribution 1 is statistically similar to the skew of distribution 2? Thanks, bp [[alternative HTML version deleted]] __ R-hel

[R] pattern recognition with paths

2011-01-05 Thread Benjamin Polidore
I'm trying to identify patterns among various "paths" like the following: http://i.imgur.com/bQPI3.png If I plot these, I can observe intuitively two different patterns: a front loaded (1 and 3) and a backloaded (2,4) progress path: http://i.imgur.com/L5qwZ.png I have thousands of observations

[R] tests on polr object

2010-12-22 Thread Benjamin Polidore
Using ordered probit model, I get errors from dwt and bptest. dwt: Error in durbinWatsonTest.default(...) : requires vector of residuals bptest: Error in storage.mode(y) <- "double" : invalid to change the storage mode of a factor I imagine I have to restate as an individual probit model for