[R] read.xlsx

2012-07-25 Thread Sam Stewart
ect;", "invokeMethod", cl, : org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException I'm not sure if my java has been updated recently, my current version is: java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.11.04.1) OpenJDK Server V

Re: [R] Create order of numbers based on a given vector

2011-10-13 Thread Sam Stewart
I think you can use the cumsum function. If you think of your falses to 1 and your trues to 0 then you're just sequentially adding the numbers in the vector. x = c(FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE) y = rep(1,length(x))*(1-x) cumsum(y) Hope that helps, Sam On Thu, Oct 13, 2011

Re: [R] Wilcox Test / Mann Whitney U Test

2011-10-06 Thread Sam Stewart
And I figured it out, sorry to bother the list. The normal approximation I was using is not accurate in the presence of ties. Sam On Thu, Oct 6, 2011 at 10:56 AM, Sam Stewart wrote: > So I checked it with the wilcox_test in the coin library, and got the > same result.  That makes m

Re: [R] Wilcox Test / Mann Whitney U Test

2011-10-06 Thread Sam Stewart
th(remain wilcox_test(value~group,data=d) Sam On Thu, Oct 6, 2011 at 10:35 AM, Sam Stewart wrote: > Hello List, > > I'm trying to prepare some lecture notes on non parametric methods, > and I can't manually reproduce the results of the wilcox.test function > for o

[R] Wilcox Test / Mann Whitney U Test

2011-10-06 Thread Sam Stewart
p page that there is some controversy about how exactly to calculate the test statistic, but that's not what is causing the problem, as I can get the same W value. Am I calculating the test statistic incorrectly? Thanks, sample code below Sam Stewart #Ordinal example dropouts = c(rep(0,25),re

Re: [R] Maximum Likelihood using optim()

2011-09-02 Thread Sam Stewart
I think the following pdf will explain the details of how to use the optim function. http://www.unc.edu/~monogan/computing/r/MLE_in_R.pdf Hope that helps, Sam On Fri, Sep 2, 2011 at 7:06 AM, Thiem Alrik wrote: > Dear mailing list, > > I would like to use the optim() command in order to maximiz

Re: [R] Plotting NLS profiles

2011-06-10 Thread Sam Stewart
Wow, that's really clever, I didn't know you could manipulate the palette like that. Thanks Dr Ripley, Sam On Fri, Jun 10, 2011 at 3:45 PM, Prof Brian Ripley wrote: > On Fri, 10 Jun 2011, Prof Brian Ripley wrote: > >> On Fri, 10 Jun 2011, R Help wrote: >> >>> Hello list, >>> >>> I'm trying to pl

[R] SEM Model Not Converging

2011-05-16 Thread Sam Stewart
thinkIMP, e80, NA takeriskFthinkbrave<->takeriskFthinkbrave, e81, NA takeriskFthinkexciting<->takeriskFthinkexciting, e82, NA reSELF<->reSELF, e83, NA reNORISK<->reNORISK, e84, NA reNOPERSON<->reNOPERSON, e85, NA reNOCONSE<->reNOCONSE, e86, NA reWRONG<->reWR

[R] cross-validation in rpart

2008-07-03 Thread Sam Stewart
lidation is set to 10-fold. I guess I just need conformation that cross-validation doesn't work with custom functions, and if someone could explain to me why that is the case it would be greatly appreciated. Thanks, Sam Stewart -- Sam Stewart, MMath Research Statistician, Diagnostic Imag