Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.
63
votes
7
answers
54k
views
Which permutation test implementation in R to use instead of t-tests (paired and non-paired)?
Now, I am looking for an R implementation of a permutation-based equivalent of the t-test, or any other advice on what to do with the data. … I know that there are some R-packages that can do this for me (e.g., coin, perm, exactRankTest, etc.), but I don't know which one to pick. …
27
votes
Accepted
Example reports for mixed-model analysis using lmer in biology, psychology and medicine?
J., Levy, R., Scheepers, C., & Tily, H. J. (2013). Random effects structure for confirmatory hypothesis testing: Keep it maximal. … Analyzing linguistic data : a practical introduction to statistics using R. Cambridge, UK; New York: Cambridge University Press. …
26
votes
2
answers
23k
views
Why do lme and aov return different results for repeated measures ANOVA in R?
I am trying to move from using the ez package to lme for repeated measures ANOVA (as I hope I will be able to use custom contrasts on with lme).
Following the advice from this blog post I was able to …
23
votes
Post-hocs for within subjects tests?
I am currently writing a paper in which I have the pleasure to conduct both between and within subjects comparisons. After discussion with my supervisor we decided to run t-tests and use the pretty si …
21
votes
Accepted
Post hoc test after ANOVA with repeated measures using R
You may also want to see this post on the R-mailing list, and this blog post for specifying a repeated measures ANOVA in R. …
18
votes
Accepted
How to perform a 4 by 4 mixed ANOVA with between- and within-subjects contrasts using R?
A sketch of one solution (for another see below):
Data needs to be in the long format (i.e., on value per row) instead of in the wide format as in SPSS (i.e., one subject per row), see the reshape p …
16
votes
Accepted
How do I vertically stack two graphs with the same x scale, but a different y scale in R?
Great web resources are: Quick-R for Graphs: 1, 2, and 3. …
14
votes
Accepted
Is there an alternative to the Kolmogorov-Smirnov test for tied data with correction?
Instead of using the KS test you could simply use a permutation or resampling procedure as implemented in the oneway_test function of the coin package. Have a look at the accepted answer to this quest …
14
votes
2
answers
7k
views
What is the lme4::lmer equivalent of a three-way repeated measures ANOVA?
My question is based on this response which showed which lme4::lmer model corresponds to a two-way repeated measures ANOVA:
require(lme4)
set.seed(1234)
d <- data.frame(
y = rnorm(96),
subjec …
13
votes
Accepted
Encoding of categorical variables (dummy vs. effects coding) in mixed models
The full quote from our chapter also provides an answer to your second question (i.e., the why):
A common contrast scheme, which is the default in R, is called
treatment contrasts (i.e., contr.treatment …
13
votes
2
answers
10k
views
How to specify specific contrasts for repeated measures ANOVA using car?
I am trying to run a repeated measures Anova in R followed by some specific
contrasts on that dataset. I think the correct approach would be to use
Anova() from the car package. … Update:
I already asked a very similar question on R-help, there was no answer.
A similar questions was posed on R-help some time ago. However, the answers did also not solve the problem. …
12
votes
Finding the column index by its name in R
For me, grep is more R-ish.
Strongly related is the recent package by Hadley Wickhem: stringr, A package for "modern, consistent string processing" including grep like functions. … He recently published a paper on it in the R Journal.
See also my answer on stackoverflow on an identical issue. …
12
votes
Is there a way to maximize/minimize a custom function in R?
Next to optim there is another function in base R that allows for what you want: nlminb. Check ?nlminb and ?optim for examples of the usage.
There are a bunch of packages that can do optimizations. …
11
votes
Interpreting three forms of a "mixed model"
You should note that T is none of your model's a random effects terms, but a fixed effect. Random effects are only those effects that appear after the | in a lmer formula!
A more thorough discussion …
11
votes
2
answers
7k
views
How to deal with quasi-complete separation in a logistic GLMM?
Update: Since I now know that my problem is called quasi-complete separation I updated the question to reflect this (thanks to Aaron).
I have a dataset from an experiment in which 29 human particip …