Re: [S] Difficult newbie question

Marc Feldesman (feldesmanm@pdx.edu)
Thu, 19 Feb 1998 15:23:08 -0800


Wow!!! 15 minutes later and you've posted a suggestion that solves the
problem.

Many thanks.

P.S. S-Plus 4 and Stata give roughly similar results. I'm happy.

At 11:04 PM 2/19/98 +0000, you wrote:
>Marc Feldesman wrote:
>>
>> I've picked a tough problem to hone my skills in S-Plus. I published a
>> paper several years ago with a statistician in which we used approximate
>> randomization to put empirical confidence limits on the F-statistic from a
>> one-way ANOVA based on samples where the assignment of individuals to one
>> of three groups was not certain from the outset. We used STATA's
>> programming language and bootstrapping primitives to achieve this. It
>> turned out to be fairly easy to program because Stata's language allowed
>> access to all the various pieces of the anova, including the F-statistic.
>>
>> I'm trying to replicate the analysis using S-Plus. I can't seem to figure
>> out at this point (and I'm only three days new to S-Plus, so this probably
>> isn't a surprise) how let the bootstrap function know that the statistic I
>> want to bootstrap is the F. If I supply the aov.obj to the anova()
>> function, the anova.object has the F Ratio as a column vector, but the
>> bootstrap function claims that it the statistic doesn't evaluate to a
>> vector or matrix. I may be in way over my head on this problem at this
>> stage in my S-Plus learning, but I thought it would be worth a try.
>>
>
>Try summary(aov.obj)$"F Value". This gives you the appropriate
>column of the printout of anova(aov.obl), which is really summary(aov.obj).
>You will have to do something like (in 4.0)
>
>bootstrap(dataset, Fstat, ...)
>where
>
>Fstat <- function(data)
> summary(aov(y ~ group, data=data))$"F Value"
>
>I think you actually only want part of the column vector, but I hope
>this has given you enough of an idea.
>
>--
>Brian D. Ripley, ripley@stats.ox.ac.uk
>Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
>University of Oxford, Tel: +44 1865 272861 (self)
>1 South Parks Road, +44 1865 272860 (secr)
>Oxford OX1 3TG, UK Fax: +44 1865 272595
>
>
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news