[R] MiscPsycho - incorrect levenshtein distance?

2010-04-14 Thread Ben Meijering
For some strings I get a wrong (MiscPsycho) Levenstein distance: > stringMatch("abc", "ab", normalize="NO") [1] 1 > stringMatch("abc", "bc", normalize="NO") [1] 2 I think the lines d <- matrix(0, nrow = n + 1, ncol = m + 1) d[, 1] <- 1:(n + 1) d[1, ] <- 1:(m + 1) d[1, 1] <- 0 should be changed

[R] how specify lme() with multiple within-subject factors?

2009-01-03 Thread Ben Meijering
I have some questions about the use of lme(). Below, I constructed a minimal dataset to explain what difficulties I experience: # two participants subj <- factor(c(1, 1, 1, 1, 2, 2, 2, 2)) # within-subjects factor Word Type wtype <- factor(c("nw", "w", "nw", "w", "nw", "w", "nw", "w")) # withi

[R] How test contrasts/coefficients of Repeated-Measures ANOVA?

2008-12-20 Thread Ben Meijering
Hi all, I'm doing a Repeated-Measures ANOVA, but I don't know how to test its contrasts or where to find the p-values of its coefficients. I know how to find the coefficient estimates of a contrast, but not how to test these estimates. First I do something like: y.aov <- aov(y ~ fac1 * f