There have been no changes to the two.sample.test function for quite
some time, so I doubt that the upgrade is what solved the problem.
Just looking at the generated code, the first case (that gives you an
error) uses the d.sub dataset, whereas the second (that works) uses
the d dataset.
Ian
If you are having data related problems it is best to post the data
with it to get a reproducible error. It is much easier to see what is
going on in that case and to communicate back to you the issue. The
easiest way to do this is paste the result of dput(all)
The problem is that you have one cell of your anova with only one
observation. I can't remember what the official "rule of thumb" is
regarding cell sizes, but you should definitely have more than 5.
Consider pooling some of your groups or if nyha is ordered treating it
as continuous and using simple linear regression.
#all only has one observation with nyha==4 so the following will fail
all <- data.frame(ClimbIndex=rnorm(110),nyha=c(rep(0,18),rep(1,6),rep(2,52),rep(3,33),rep(4,1)))
k.sample.test(formula=d(ClimbIndex) ~
nyha,data=all,test=oneway.test,var.equal=TRUE)
oneway.test(ClimbIndex~factor(nyha),data=all,var.equal=TRUE)
#all2 has two observations in 4, so it will work
all2 <- data.frame(ClimbIndex=rnorm(110),nyha=c(rep(0,18),rep(1,6),rep(2,52),rep(3,32),rep(4,2)))
k.sample.test(formula=d(ClimbIndex) ~
nyha,data=all2,test=oneway.test,var.equal=TRUE)
oneway.test(ClimbIndex~factor(nyha),data=all2,var.equal=TRUE)
Best,
Ian
--
---
You received this message because you are subscribed to the Google Groups "Deducer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deducer+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.