Dear Greg,
I was delighted to come across your TeachingDemos package on CRAN and
I used some of the demos for a staff seminar a couple of weeks ago.
We have recently started a couple of new programs, so there were
quite a lot of young recent graduates in the group. I had made a few
additions and changes and made a couple more in response to questions
from participants.
The first questions were "What graphic?" and "What sliders?" -- these
were folks who'd fired up R for the first time less than an hour
beforehand, indeed part of my agenda was to show them some of R's
graphics capabilities. I've since modified the demos I used so that
an initial graphic and the TK widget are on top when the demo starts.
Unfortunately, that's pretty much incompatible with Hans-Peter's
'slider' function, so lots of direct tcling and tking done.
The next question was usually "Can we use this with our data?" That
was already poss with several of the functions, and I've tried to
make it possible/easier with more, eg in 'put.points' make the axes
adjust to the data and allow clicking outside the plot area to add
points, and making it poss to extract the results from hist.
(Incidently, I was dumbstruck when I first saw the effect on the
histogram of changing the max and min -- I'd never given that a thought!)
I wanted to adapt the power demo to use with real data, cos R's
'power.t.test' is a bit pedestrian, and modified it to use the
noncentral t-distribution, since we're usually struggling to squeeze
power out of small samples. But in R 2.3.0, noncentral t throws up
huge numbers of warnings -- even a few with 'power.t.test' itself.
Shoving 'suppressWarnings' in everywhere may be okay for a demo but
not best practice for a 'real' function, so that's on hold for the moment.
Since these folks were newcomers to R, I put the functions I needed
into a script which, when sourced, creates a pull-down menu from
which default versions can be run. The script is attached.
A few extras I included: a Law of Large Numbers demo (based on an
idea by Richard Royall & Jeffrey Blume); a Max Likelihood demo with
Poisson - originally so people wouldn't think MLE only applied to the
normal disribution, but actually I found it easier to explain MLE
with Poisson probabilities rather than Gaussian probability density;
a demo which explores the difference between probability and
liklihood; and a PCA demo akin to put.points.
I added the Poisson distribution and chi-squared to the 'vis...'
series (chi-sq is worth a look as it changes shape so dramatically at
low d.f.!)
My PCA demo and Prob vs Llh demo are a bit complicated, so I did some
notes to walk folks through them; these have since expanded to a 'lab
guide' covering all the demos I used! Also attached. Background on
the seminar is at http://www.wcsmalaysia.org/stats/
I'd be really happy if you could take a look at this and make
comments and suggestions. We plan a follow-up seminar in the fall so
will have an opportunity to revisit these concepts. Also if any of
this is useful for a future version of TeachingDemos, that would be good too.
Thanks again, both for the TeachingDemos package itself and also the
spur to develop a few additional ideas!
Regards, Mike.
===============================================
Michael E Meredith
Wildlife Conservation Society (WCS) Malaysia Program
7 Jalan Ridgeway, 93250 Kuching, Malaysia
Fax: +60-82-252 799 Mobile: +60-19 888 1533
email: meredith@easynet.co.uk http://www.mered.org.uk
Program website: http://www.wcsmalaysia.org