Does pairwise.t.test, with paste(group, quiz) as the factor, do
what you are looking for?
Regards, Mike
--
Michael A. Miller [EMAIL PROTECTED]
Imaging Sciences, Department of Radiology, IU School of Medicine
__
R-help@r
It represents the subset of the data frame partitioned by 'x$quiz'.
On 10/22/07, Matthew Dubins <[EMAIL PROTECTED]> wrote:
> Yes!! That did it!
>
> Does .sub represent the different levels of the x$quiz indice?
>
>
>
> jim holtman wrote:
> Is this what you were expecting?
> by(x, x$quiz, functi
Yes!! That did it!
Does .sub represent the different levels of the x$quiz indice?
jim holtman wrote:
> Is this what you were expecting?
>
>
>> by(x, x$quiz, function(.sub) t.test(percent ~ group, data=.sub))
>>
> x$quiz: 1
>
> Welch Two Sample t-test
>
> data: percent by group
Is this what you were expecting?
> by(x, x$quiz, function(.sub) t.test(percent ~ group, data=.sub))
x$quiz: 1
Welch Two Sample t-test
data: percent by group
t = 6.3228, df = 6.231, p-value = 0.0006306
alternative hypothesis: true difference in means is not equal to 0
95 percent confiden
Hi,
Following please find *some* of my data.
percent quizgroup
100 1 High
100 1 High
100 1 High
25 1 Low
50 1 Low
75 1 High
50 1 Low
75 1 High
100 1 High
100 1 High
50 1
I think what you want to write is:
by(your.df, quiz, function(.sub){
t.test(percent ~ group, data=.sub)
}
On 10/22/07, Matthew Dubins <[EMAIL PROTECTED]> wrote:
> I've tried to use by(), but the closest i got to it doing what I wanted
> was using the following:
>
> by(percent, quiz, functio
Could you post some of your data and your initial test, and explain why
it didn't worked? It is difficult to figure out what is the problem
with your call to by().
Julian
Matthew Dubins wrote:
> I've tried to use by(), but the closest i got to it doing what I wanted
> was using the following:
I've tried to use by(), but the closest i got to it doing what I wanted
was using the following:
by(percent, quiz, function(percent) {t.test(percent~group,
data=marks.long)})
But the results it gave me weren't t.tests of percent by group according
to quiz number.
Julian Burgos wrote:
> See
See by()
Matthew Dubins wrote:
> Hi all,
>
> I wrote a simple function that gives me multiple t.test results
> according to a subset variable and am wondering whether or not I
> reinvented the wheel. Observe:
>
> t.test.sub <- function (formula, data, sub, ...)
> {
> for(i in 1:ma
Hi all,
I wrote a simple function that gives me multiple t.test results
according to a subset variable and am wondering whether or not I
reinvented the wheel. Observe:
t.test.sub <- function (formula, data, sub, ...)
{
for(i in 1:max(sub))
{
print(t.test
10 matches
Mail list logo