~ubuntu-branches/ubuntu/natty/ess/natty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
%% Given in Seattle, at the National Research Center for Statistics
%% and the Environment, and at MathSoft, October 1997.

\documentclass[semhelv]{seminar}
%% comment out the above and use below, if you have font troubles
%%\documentclass[semlcmss]{seminar}
%%\documentclass{seminar}

\usepackage{slidesec}
\usepackage[dvips]{graphicx}
%\usepackage{html,heqn,htmllist} % LaTeX2HTML support

\begin{document}

\typeout{ }
\typeout{If you have font troubles, comment out line 5 and
  uncomment line 7}
\typeout{ }

\begin{slide}
  \slideheading{ESS and Literate Programming: \\
    Tools for Efficient Statistical Programming and Data Analysis}

  \begin{center}
    Dr. A.J. Rossini \\
    Statistics Department \\
    University of South Carolina \\
    rossini@stat.sc.edu \\
 %   \htmladdnormallink{http://www.stat.sc.edu/\~{}rossini/rsrch/seattle-nrcse/}
%    {http://www.stat.sc.edu/\~{}rossini/rsrch/seattle-nrcse/} 
  \end{center}
  
  Note: \textbf{ESS} is joint work with: Martin Maechler (ETHZ), Kurt
  Hornik (TU-Wien), and Richard M. Heiberger (Temple).
\end{slide}

\begin{itemize}
\item Thanks also to Bates, Kademan, Ritter (initial versions), and
  David Smith (3.x, 4.x).
\end{itemize}

Recently, I've been giving talks which focus on Computer/Statistician
interfaces, like this one.  They tend to get strange responses.  This
is not too different from the applied/theoretical Comp Sci situation,
where journals focus both on software practice, as well as on theory.
Practitioners from both groups are also very confused.

So for today, we will focus on one area of statistical practice, as
opposed to statistical theory (methods/mathematics/data analysis).

\begin{slide}
  \slideheading{Introduction}
  
  Topics:
  \begin{itemize}
  \item Computing Environments
  \item ESS (=\emph{EMACS Speaks Statistics}), and its capabilities
  \item Literate Programming and Literate Data Analysis
  \item Links between ESS and Lit Prog
  \item Future (planned?) Extensions
  \end{itemize}

\end{slide}

\begin{itemize}
\item Outline of Talk
\end{itemize}

\begin{slide}
  \slideheading{Computing Environments}
  
  Computer / Statistician Interface:
  \begin{itemize}
  \item Command line: keyboard based, minimal mouse usage (SAS (old
    style), S-PLUS 3.x, R, XLispStat, Minitab (old style))
  \item Graphical: pointer (mouse)-based, ``point and click'', minimal
    keyboard usage (S-PLUS 4, ViSta, Minitab)
  \item Mixed Interfaces: S-PLUS 4, SAS, ViSta, Minitab
  \end{itemize}
  
  The \emph{Interface} is dependent on the particular user's practice
  (note the repetition of packages).
\end{slide}


\begin{itemize}
\item Importance to Statisticians. 
\item Issues of efficiency
\end{itemize}

\begin{slide}
  \slideheading{Computing Environments: Design Considerations}
  
  \begin{itemize}
  \item keyboard entry is faster than mouse entry (eventually?)
  \item mouse entry is easier than keyboard entry (initially?)
  \item At present, keyboard interfaces allow for more
    complex/powerful methods, but this is more a function of current
    software than a design limitation.
  \item Keyboard interfaces generally require memorization of some
    commands (at the minimum: those required to find others!).
  \end{itemize}
\end{slide}

\begin{itemize}
\item Not discussing using keyboard as a substitute for a
  mouse/pointer-based interface!  (i.e. keys to move the pointer, and
  to press the pointer buttons).
\end{itemize}

\begin{slide}
  \slideheading{Emacs}

  \begin{itemize}
  \item Text Editor (not a word processor)
  \item Fully Configurable and Extensible:
    \begin{itemize}
    \item Communication with system processes
    \item Automation of procedures (version control, file comparison)
    \item Language-specific customizations
  \end{itemize}
\end{itemize}

  Currently, comes in 2 GNU Flavors:
  \begin{itemize}
  \item Emacs (FSF/RMS developed)
  \item XEmacs (derivative of the above, more features, more bloat)
  \end{itemize}
  
\end{slide}

Some current modes:
\begin{itemize}
\item \LaTeX
\item C, Fortran, SQL
\item Makefiles
\item version control
\end{itemize}

XEmacs features:
\begin{itemize}
\item Embeddable images
\item mixed fonts and rich-text (near-WYSIWYG LaTeX document
  construction)
\end{itemize}

\begin{slide}
  \slideheading{ESS (=\emph{EMACS Speaks Statistics})}
  
  A package for Emacs, with the following features:
  \begin{itemize}
  \item Mode for generating program code for statistical packages
  \item Inclusion of statistical processes as inferior processes
    controlled through Emacs.
  \item Interface for on-line help features for statistical packages
    (via calls to the package, standard WWW documentation, etc)
  \item Interface for generating, documenting, and reusing transcripts
    for data analysis and development sessions.
  \end{itemize}

\end{slide}

\begin{itemize}
\item Discuss the README
\item What are we trying to do
\end{itemize}

\begin{slide}
  \slideheading{ESS capabilities: programming}

  \begin{itemize}
  \item Syntax-based color and font highlighting
  \item Access to on-line help facilities when inferior statistical
    processes are running; to WWW based facilities when not.
  \item Connection to statistical processes, ability to switch
    processes (i.e. different instantiations of the same dialect,
    different dialects)
  \end{itemize}
\end{slide}

\begin{itemize}
\item to improve code readability.
\item on-line help, split off into a different buffer.
\item connection to different processes:
  \begin{itemize}
  \item to compare different results
  \item to get different help information
  \end{itemize}
\end{itemize}


\begin{slide}
  \slideheading{ESS capabilities: inferior process}

  \begin{itemize}
  \item Syntax-based color and font highlighting
  \item Searchable Command History
  \item Separate buffers for help output
  \item Log (Transcript) of commands
  \item Debugging assistance (of source)
  \end{itemize}
\end{slide}

\begin{itemize}
\item to improve code readability.
\item ``Splus -e'' improved.
\item split up output by context (help, etc).
\end{itemize}

\begin{slide}
  \slideheading{ESS capabilities: transcript}

  \begin{itemize}
  \item Reuse of transcripts in different dialects, for different
    sessions. 
  \item Commenting of transcripts
  \item Comparison of output
  \end{itemize}
\end{slide}

\begin{itemize}
\item One use: authors who are targeting a number of dialects of S,
  S-PLUS, and R.
\item Readability
\item comparison of output among different statistical packages.
\end{itemize}

%\begin{slide}
%  \slideheading{ESS: examples}
  
%  %%\includegraphics[height=3\semin,width=3\semin]{ex1.ps}

%  %%\includegraphics[height=3\semin,width=3\semin]{ex2.ps}

%\end{slide}

%Discuss example screen shots.

\begin{slide}
  \slideheading{ESS: future plans}

  \begin{itemize}
  \item Improved support for current languages
  \item Additional support for other languages (Fiasco/SPSS)
  \item Inlined statistical graphics (XEmacs)
  \item Object browser (partial implementation exists for SAS,
    eventually for S and XLispStat languages).
  \item Language independent UI/GUI for data analysis.
  \item Language independent UI/GUI for statistical instruction.
  \end{itemize}
\end{slide}

\begin{itemize}
\item ESS as a general purpose statistical GUI
\item ESS as a general purpose statistical instruction/assistance tool 
  \begin{itemize}
  \item Statistical help via WWW
  \item Download similar Analyses
  \item Guidance via Literate Data analysis
  \end{itemize}
\end{itemize}


\begin{slide}
  \slideheading{Why bother?}

  \begin{itemize}
  \item No real need to have a unifying mode (both too much and too
    little). 
  \item Different languages have different syntax
  \end{itemize}
  \textbf{BUT:}
  \begin{itemize}
  \item Common, generic interface.
  \item Improved documentation is important.
  \item To this goal, want to encourage documentation and revision
    logs:
    \begin{itemize}
    \item Revision and Source Control Systems (not discussed: SCCS,
      RCS, CVS, PRCS) (automated via Emacs, or manually implemented)
    \item Literate Programming (discussed)
    \end{itemize}
  \end{itemize}
\end{slide}

\begin{itemize}
\item Why 2 topics?
\item Single common mode for Literate Programming, Literate Data
  Analysis.
\item Revision/Source control is extremely useful for keeping track of
  document and program changes.  But will not be discussed today.
\end{itemize}

\begin{slide}
  \slideheading{Literate Programming: Introduction}

  \begin{itemize}
  \item Introduced by D.E.Knuth for developing \TeX (1984)
  \item Intent: The task of programming should shift from telling a
    computer what to do, to explaining to human beings what we are
    doing.
  \item Remark: Every use of the word \textbf{programming} (used
    before and after this) can be exchanged for the words \textbf{data
      analysis}.
  \end{itemize}
\end{slide}

\begin{itemize}
\item Origin
\item Goal: a means to document results.
\item \emph{Data Analysis} can be thought of as the implementation of
  a particular type/style of \emph{Programming}.
\end{itemize}

\begin{slide}
  \slideheading{Lit Prog: Example}
{\tiny
\begin{verbatim}
\section{Introduction}\label{intro}

For regression models with interval-censored data, there is generally no simply means of
conditioning out the nuisance parameter.  This nuisance parameter is generally a function of the
baseline cumulative distribution function, such as $\Lambda(t)$, the cumulative hazard function, or
$\Phi(t) = F(t)/S(t)$, the odds function. 

However, with right-censored data under the proportional hazards model, we can condition out the
nuisance parameter.  This simplifies and speeds up the resulting estimation. 

The main body of code will be the simulation routine, given by 

<<bag.sim.S>>=
  bag.sim <- function(beta,N,nobs,numBSsamp)  {
    <<simulation routine.S>> ;
    <<report and summarize results.S>> ;
  }
@ %def bag.sim N nobs beta numBSsamp

This can be divided into dataset generation and analysis sections.

<<simulation routine.S>>=
  for (i in 1:N)  {
    <<Generate data set.S>> ;
    <<Analyse data set using imputation and bootstrap.S>> ;
  }
@ %def i
\end{verbatim}
}
\end{slide}

\begin{itemize}
\item Basic example of literate programming.
\item document chunks start with '@'.
\item program chunks start with '\verb$<<$'
\end{itemize}

\begin{slide}
  \slideheading{Web Processing}

  \begin{itemize}
  \item To get documentation: weave a web  (forms: tex, html, etc).
  \item To get the code: tangle a web
  \end{itemize}
  idea: don't want to read or change raw code (and discourage this!);
  documentation should tell you everything.
\end{slide}

\begin{itemize}
\item Not WWW...
\item basically text processing.
\end{itemize}

\begin{slide}
  \slideheading{Statistical Programming and Data Analysis}
  
  Is there a difference? 
\end{slide}

\begin{itemize}
\item Why literate programming is of interest for data analysis
  documentation. 
\item at the most, differences just in the intended use of the code.

\end{itemize}

\begin{slide}
  \slideheading{Requirements in a Literate Programming Tool}
  (for statisticians)

  Program:
  \begin{itemize}
  \item Language independence 
  \item Platform independence
  \end{itemize}

  Statistician:
  \begin{itemize}
  \item discipline
  \item interest
  \end{itemize}
\end{slide}

\begin{itemize}
\item Language independence (examples: S-PLUS, C, Fortran code mixed
  interchangeably).
\item Flexible and platform independent
\end{itemize}

\begin{slide}
  \slideheading{Relationship between ESS and Lit Prog}
  
  Good:
  \begin{itemize}
  \item Documentation (using AUC-TeX), ease of programmability
  \item Ability to test out real code (dump straight into a running
    process).
  \end{itemize}
  Bad:
  \begin{itemize}
  \item Not fully automated (yet!).
  \item learn yet another language (or meta-language).
  \end{itemize}
  
\end{slide}

lack of automation implies that one needs to access a command line to
actually produce results.
 
\begin{itemize}
\item Current Links
\end{itemize}

\begin{slide}
  \slideheading{Future Extensions: ESS/Lit Prog}

\end{slide}

\begin{itemize}
\item Templates
\item Software packaging
\end{itemize}

\begin{slide}
  \slideheading{Where to find}

  \begin{itemize}
  \item ESS: http://ess.stat.wisc.edu/
    %%\htmladdnormallink{ESS} {http://www.stat.sc.edu/~rossini/projects/}:
  \item Literate Programming:
    \begin{itemize}
    \item General Information:
      http://www.desy.de/ftp/pub/userwww/projects/LitProg.html 
      %%\htmladdnormallink{General Information} {http://www.desy.de/ftp/pub/userwww/projects/LitProg.html} 
      %%\htmladdnormallink{http://www.desy.de/ftp/pub/userwww/projects/LitProg.html} {http://www.desy.de/ftp/pub/userwww/projects/LitProg.html}
    \item %%\htmladdnormallink{Frequently Asked Questions about Lit
      %%Prog}{http://shelob.ce.ttu.edu/daves/faq.html}:
      Frequently Asked Questions about Lit Prog: http://shelob.ce.ttu.edu/daves/faq.html
      %%\htmladdnormallink{http://shelob.ce.ttu.edu/daves/faq.html}  {http://shelob.ce.ttu.edu/daves/faq.html}
    \item %% \htmladdnormallink{Noweb} {http://www.cs.virginia.edu/~nr/noweb/intro.html}:
      %%\htmladdnormallink{http://www.cs.virginia.edu/~nr/noweb/intro.html}      {http://www.cs.virginia.edu/~nr/noweb/intro.html}
      Noweb: http://www.cs.virginia.edu/~nr/noweb/intro.html
    \end{itemize}
  \end{itemize}
\end{slide}

\begin{itemize}
\item Where to get it.
\end{itemize}

\end{document}