Tag Info

New answers tagged

1

To answer one of your questions: Yes you can do changepoint analysis on a vector. I think that the only package that can currently do this in R is the ecp package: http://cran.r-project.org/web/packages/ecp/


1

@GregSnow is right that this change doesn't really matter. Let me add a few details to extend that. What you are talking about is sometimes called cell means coding, whereas the default coding scheme is called reference cell coding. Note that there are many possible valid coding schemes. If you have a categorical variable with only two levels, then the ...


3

Things like the predictions, residuals, full-reduced model tests, etc. will not be affected by the change that you propose, but what does change is the interpretation and tests on the individual terms. Most regression routines will provide an automatic test of whether a term is 0 or not. This is meaningful when a term represents the difference between two ...


3

In case anyone else has this problem, check that your all your factor columns, particularly any containing numbers, are classed as a Factor and not as an Integer by using str(yourdata) or class(yourdata$columnname). My particular culprit was the participants column. If it's classed as an Integer, then yourdata$columnname <- ...


1

In (repeated-measures + between-groups) ANOVA the RM factor Intervals and the Intervals*Group interaction are both tested against the usual error term. So they are customarily shown in the same table, within-subject effects. The Group factor, though, is tested against a special error term, which is the mean square of the implied random factor subject as ...


0

This result does not mean that the different blocks are the same on the dependent variable, only that there is not sufficient evidence to reject the notion; more precisely, it says that, in a sample of this size, an effect of this size would have arisen more than 5 percent of the time if, in the population from which the sample was drawn, there really was no ...


0

Being non-Gaussian doesn't mean that you need go all the way over to non-parametric methods. More importantly, the usual non-parametric methods are typically dead ends once you want to start looking at extra covariates. Unfortunately once you add in another predictor in your case, the small size of the dataset bites even harder. Looking at your data I see ...


3

Nothing went wrong. The program did exactly what it was meant to do. It's because you only have a 2x2 factorial design in your example. Mauchly's test for sphericity compares variances of differences between levels of repeated measures factors. Another way of looking at it is the covariance matrix in the repeated measures design. If you have a 2x2 design, ...


1

You can use a likelihood ratio test (LRT) to test whether a random effect is significant. First, fit the random effects model. Then fit the model without the random effect. Extract and store the log-likelihood for each model using logLik and calculate the twice difference between the log-likelhood of the mixed effects model and the normal model. Use a ...


0

I don't feel comfortable enough to comment on your autocorrelated errors issue (nor about the different implementations in lme4 vs. nlme), but I can speak to the rest. Your model m1 is a random-intercept model, where you have included the cross-level interaction between Treatment and Day (the effect of Day is allowed to vary between Treatment groups), but ...


1

I think that your approach is correct. Model m1 specifies a separate intercept for each subject. Model m2 adds a separate slope for each subject. Your slope is across days as subjects only participate in one treatment group. If you write model m2 as follows it's more obvious that you model a separate intercept and slope for each subject m2 <- lmer(Obs ~ ...


0

@Glen_b & @Peter Flom have provided good answers. Let me add one more detail: It is not simply that we lose power when we make an adjustment to control the familywise type I error rate. The existence of multiple comparisons means that power is already compromised. Discussions of the problem of multiple comparisons typically center around th ...


7

Because they can all be written as particular cases of the general linear model. The t-test is a two-sample case of ANOVA. An ANOVA model is basically a regression model where the factor levels are represented by dummy (or indicator) variables. So if the model for a t-test is a subset of the ANOVA model and ANOVA is a subset of the multiple regression ...


14

Consider that they can all be written as a regression equation (perhaps with slightly differing interpretations than their traditional forms). Regression: $$ Y=\beta_0 + \beta_1X_{\text{(continuous)}} + \varepsilon \\ \text{where }\varepsilon\sim\mathcal N(0, \sigma^2) $$ t-test: $$ Y=\beta_0 + \beta_1X_{\text{(dummy code)}} + \varepsilon \\ ...


2

In addition to @Glen_b 's excellent answer (+1) I'd add 1) "Familywise" begs the question of what a family is. All the analyses in one paper? All the analyses on one data set? All the analyses related to one question? All the analyses you do in your life? What about analyses that other people do on the same data? 2) In addition, we default to "5%" and ...


3

If you do a bunch of tests, the chances of at least one Type I error (when the null hypothesis is true) will go up, sometimes dramatically. A Bonferroni adjustment (as with most other multiple comparison procedures) is an attempt to hold the overall Type I error rate from the collection of pairwise comparisons to no more than a prespecified rate of Type I ...


2

This comes up frequently on the site. Odour has an effect, colour has an effect, and they interact. Therefore, the degree of odour's effect varies across colour. You know this now. Look at the means and describe the amount of effects. Let's say that you checked the effect of odour for light red and it was significant but it wasn't for colourless. What ...


0

You have correlations among your covariate and predictor variable(s). Probably you have one between factor 1 and the covariate. This is a no no (see the assumptions). Given that it's probably important to be assessing age you need to look at regression techniques instead of ANCOVA and what to do when multi-collinearity is involved.


0

First, whether you focus on the results of the overall ANOVA or the multiple comparisons depends on your research question. The null hypothesis in the overall ANOVA is that all data were sampled from one population with one mean. Multiple comparison tests are pairwise tests of the means of the groups. They are valid to perform even when the overall ANOVA is ...


0

The interpretation will depend on the specifics of your situation but, generally speaking, the negative sign does not fundamentally change anything. Formally, 95% of these confidence intervals should contain the true parameter. Also, with the same data, the corresponding test would yield a p-value under 5% for all values outside of the confidence interval ...


1

Think about how many degrees of freedom there must be (total, residual & regression). Then you can work backwards from the $MSE$ to get the missing $SS$s.


2

If your data are balanced, the sum contrasts (see contr.sum under ?contrasts) are explicitly the differences you're asking about, so you may want to look at testing those. More generally, one problem is that "the mean of all races" includes the present race you're comparing it to, so you lose independence, which can make things more complex. However, note ...


3

I think that the easiest is to center your dependent variable around the grand mean. Given your example: test$Satisfaction <- scale(test$Satisfaction, center=TRUE) This way, the grand mean is now 0, and the mean for each ethnic group is the deviation from the grand mean. Then you run your regression as usual, but the four tests that you get are whether ...


1

GLM Repeated Measures If you have no missing data and everyone is measured at each of the 12 time points, then you could use Analyze - GLM - Repeated Measures. This allows you to include a between subjects factor and the 12 time points. Your data would need to be set out in wide format with one SPSS variable for group and 12 SPSS variables for the 12 time ...


2

The difference is not due to different "types of sum of squares" - these only matter in unbalanced factorial designs (see gung's answer). Note that you need to call lm(data ~ factor(f1) * factor(2)) (aov()automatically converts the RHS of the formula to factors). Then note the denominator for the general $t$-statistic in linear regression (see this answer ...


0

This issue is described in this post by John Fox - author of the car::Anova() function that is used internally by ezANOVA(). As a workaround, you can use anova() using a multivariate model specification that is described in this article by Peter Dalgaard as well as in this excellent answer by Aaron. Here's a reproducible example with data in wide format: ...


0

There's no use for a post hoc test here. What could you possibly find in a post hoc that isn't obvious from the ANOVA? There's a main effect of A and a main effect of B and an interaction. Some people do them to test a situation where A1B1 - A1B2 doesn't look significant while A2B1 - A2B2 does. They find that result and report it as somehow important but ...


2

I will address your questions one-by-one: Summary statistics are always useful, it's good to try to understand your data rather than rely merely on tests and p-values. Do report them, look at the data, use graphs and think hard about what it all means. What you should do depends on your objectives (decision to go on with the treatment? publication? student ...


1

A simple way to analyze this data set would be to average response times in each condition across all blocks and trials, as you usually do. It is less than ideal and you will loose power but it would still provide a test of your hypothesis. Alternatively, you could focus only on the last block. You would be throwing away a lot of data but 50 trials should be ...


0

It sound like you have a 2 by 2 by 2 by 2 four-way mixed ANOVA. Expertise :Experts vs Novice (between subjects) Training: Guided Discovery vs Control (between subjects) Disguise: Undisguised vs Disguised (repeated measures) Time: Pre versus Post (repeated measures) In SPSS you can do: analyze - GLM - Repeated Measures then specify your two repeated ...


2

The two approaches (t-test on “gain scores” and F-test for the interaction term in the ANOVA) give exactly the same result, as you can easily verify by running both on the same data set. Whether this is sound is subject to some debate, other approaches (e.g. ANCOVA on T2 measurements, with group as independent variable and T1 measurements as covariate) ...


2

This is of course possible in SPSS in several procedures. As the most handy tool to visually explore importances of variables in separating this or that cluster I recommend you AIM command (available only through syntax). AIM appeared around SPSS version 13. An example: cluster v1 v2 1 .2231 -.5798 1 -.1558 -.3753 ...


1

There is a great deal of disagreement over good statistical style here, and indeed most of elsewhere. But this strikes me as a mishmash of quite different procedures. No tests for differing variances will work as designed if you Winsorize the data first. Perhaps someone has worked on this -- you might find literature references with modified tests -- but ...


2

Your interpretation of a low p-value is a very common one, but it is not quite correct. The phrase "is unlikely to be equal" has no meaning in a Frequentist context. Either all of the population means are equal, or they are not. To the extent that something like a statement of probability can be made in this situation, the correct statement would be ...


5

I guess my comments have become so extensive that I should call them an answer. If it's a situation where you want fixed effects, you can do it with a Poisson glm just as you can do ANOVA via lm. If you want a mixed model (glmm), you could use lme4 (such as the function glmer), though there are other suitable packages (see below). If you do want a fixed ...


1

You can indeed subset the data frame doing something like aov(d.ratings ~ grp*fdback*dur + Error(particip/(fdback*dur))+grp, PDdonly[attrib == "ease",]) Typically however, different ratings would simply be regarded as separate variables, with the data frame formated accordingly. You could then specify your model with something like aov(ease ~ ...


0

You could make the (very naive) assumption that the best features for SVM will also be the best ones for other classifiers as NB. Therefore you can (as you said) select the best features for NB. You can also include the similarity ones in this set. Other (better) option is to apply feature selection weighting to see which features separate the classes ...


1

I don't know about Statistica, but this will work in any program. Generate some random data of the correct sample size, once for each group. Standardize it. Multiply it by the standard deviation. Add the mean. Combine the groups. Run your anova. BUT: You say N=5, that makes me think you've got repeated measures. If that's the case, you don't have enough ...


0

Centering the covariate fixed the problem.


6

As you indicated in the comments, SS type I (aov()) vs. III (SPSS) is indeed one reason for the different results. The other reason is that your formula for aov() is incorrect, as the Error() term you used is the for two crossed within factors - whereas you have one between (group) and one within (phase) factor. Here's a reproducible example on how to ...


1

Harold, Not sure if this is why the difference, but I note that in SPSS you specify METHOD=SSTYPE(3). In base R, the default is a type 1. You will need to load a different package than base in order to estimate type 3.


3

First, the difference between significant and non-significant is not necessarily significant. So if after adding a covariate your interaction p-value changed from .04 to .06, this doesn't mean anything substantial other than you've bounced from one side of a binary .05 decision threshold. However, the other possibility is that the covariate has ...


1

Your data there works fine for me as soon as I put 'Block' in the model instead of 'Year' Check the data reads in okay: > summary(TWP) Block Severity Plot Richness 2003-2004:6 High:9 A:6 Min. : 8.00 2005-2006:6 Low :9 B:6 1st Qu.:14.00 2007-2009:6 C:6 Median :18.50 Mean ...


1

What you presented here already looks very good to me. Using an appendix/supplementary material to provide more details is also generally a good way to proceed. It's a good idea to show the means and some index of variability but it seems you have that covered with the graph. One important thing missing is an explanation of what the error bars represent (SE, ...


1

F distributions have two degrees of freedom, one for the numerator and one for the denominator. http://en.wikipedia.org/wiki/F-distribution#Definition In an ANOVA calculation, the numerator df is the df for the thing your null hypothesis relates to, the denominator df are the degrees of freedom for the residual. You appear to be testing whether the ...


2

You're on the right track--the next thing you need to do is plot your means. An interaction effect means that, for example, A has a different effect depending on what the level of B is. So if A is, mm, size of hammer (large or small) and B is size of mouse (large or small) and your measure is end state of mouse after being hit with hammer, one possible ...


0

Overview ANOVA will test the null hypothesis of no group mean differences Spearman's rho will look at the rank order correlation. General strategy The most common strategy that I've seen in this context where the IV is ordinal in nature and has been experimentally manipulated is to (a) perform a test of the overall ANOVA and then (b) examine polynomial ...


1

I don't really understand what variance you are talking about, is it a variance of variables over one measure ? a variance of a variable over multiple measures ? The more a variable has variance the more it contains information. Think about it in variation: if a variable has little variance it does not evolve much around its mean and then it won't be ...


0

The question may be "is the independent ordinal variable meaningful". In other words, do each of the steps in the ordinal variable efficiently separate the interval measure. If you plotted the interval measure as comparative boxplots with notches, you could visualize whether the 95% confidence intervals of the median overlap from one step of the ordinal ...



Top 50 recent answers are included