Stats + Web Software
Christopher Browne
cbbrowne-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Nov 1 05:05:05 UTC 2006
On 10/31/06, Chris F.A. Johnson <cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org> wrote:
> On Tue, 31 Oct 2006, Christopher Browne wrote:
> > On 10/31/06, Zbigniew Koziol <softquake-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> >> There is rather no something like that around. I mean - I would rather do
> >> things by myself, using perl and PHP. Perl is excellent for analysis of
> >> text
> >> data (I am not teaching you;) HTML needed, combined with JavaScript, is in
> >> fact simple, though on a bit higher level than what we mostly see around.
> >>
> >> Or perhaps I did not quite understand the question.
> >
> > Definitely not.
> >
> > Perl is perfectly good at text-munging.
> >
> > Which I am totally uninterested in, as the data that I have is
> > *highly* structured, stored in relational database tables.
> >
> > What I'm interested in running various sorts of statistical analyses
> > on that data. The sorts of things for which one would use R, PSPP,
> > Octave, Matlab, and the like.
> >
> > You can generate some pretty impressive summary graphs with R; it
> > generates some mighty elegant Postscript output, from the perspective
> > of looking at the PS code.
> >
> > Of course, that's not my interest; what I want is to turn the results
> > into web pages for deployment via a web server.
>
> Convert (using convert from ImageMagick) the PS to PNG (or
> whatever).
R already does that quite nicely; images are not much of a concern, as
it is usually pretty easy to get those transformed automatically.
The challenge is in transforming an ANOVA analysis
<http://en.wikipedia.org/wiki/Anova> into HTML.
Here, for instance, is a textual example of ANOVA:
<http://www.fiu.edu/~howellip/exanova.htm>
Supposing I have a data set, I might want some summary stats:
> mm$Expt <- factor(mm$Expt)
> mm$Run <- factor(mm$Run)
> fm <- aov(Speed ~ Run + Expt, data=mm)
> summary(fm)
Df Sum Sq Mean Sq F value Pr(>F)
Run 19 113344 5965 1.1053 0.363209
Expt 4 94514 23629 4.3781 0.003071 **
Residuals 76 410166 5397
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Then, doing an ANOVA on that:
> fm0 <- update(fm, . ~ . - Run)
> anova(fm0, fm)
Analysis of Variance Table
Model 1: Speed ~ Expt
Model 2: Speed ~ Run + Expt
Res.Df RSS Df Sum of Sq F Pr(>F)
1 95 523510
2 76 410166 19 113344 1.1053 0.3632
This is a simple (albeit probably common) sort of case, where we want
to compare two categories, and see what statistical evidence there is
that, say, performance seems to vary across different periods of time.
There will, indeed, be only two degrees of freedom.
What I want as "nice HTML" is the output of things like ANOVA
analysis, and other sorts of summary statistics.
It looks like I simply didn't look hard enough when examining the R
docs. There are addons like Rcgi
<http://www.ms.uky.edu/~statweb/cgi-bin/goR3.cgi> and Rpad
<http://www.rpad.org/Rpad> which do the sorts of things I'm after,
particularly Rpad...
--
http://www3.sympatico.ca/cbbrowne/linux.html
Oddly enough, this is completely standard behaviour for shells. This
is a roundabout way of saying `don't use combined chains of `&&'s and
`||'s unless you think Gödel's theorem is for sissies'.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list