For the t-test, you used the two-tailed t-test. It is the default. Here I
think you should set alternative="less" in the t.test function.



2014-06-29 8:41 GMT-05:00 dhs <bravo0...@me.com>:

> Trying to understand how to analyze my data, sample data follows. I want
> to know if the student scores increased from sem1 to sem2 (semesters), and
> whether the inGroup scores increase more.
> Here’s what I did with sample data:
>
> students <- c("s1”, “s2”, "s3")
> inGroup    <- c(T, F, T)
> score   <- c(4, 3, 4,  6, 4, 6)
> time <- as.factor(c("sem1","sem1","sem1", "sem2","sem2","sem2"))
>
> data <- data.frame(students, inGroup, score, time)
>
> #to determine if scores for all students increased over time I did a t.test
> t.test(data[data$time=="sem1","score"],data[data$time=="sem2","score"],
> paired=T)
>
> #to determine if the inGroup had a greater increase I did a mixed effect
> anova
> library("lme4")
> mixedEffect  <- lme(score~time, data=data,random=~ 1 | inGroup, na.action
> = na.exclude); summary(mixedEffect)
>
>
> Is this right?  in the above the t-Test p-value <.05 so there was a
> significant change. the mean of differences was -1.66 so the change was an
> increase?
>
> For the mixed effect the difference was significant, p < 0.5 timesem2  is
> this right? If so how do I know if the inGroup scores increased more?
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to