statistical - survo · ldhen stariing a neg job uith edit0r the upper le{t side corner sf a 100x100...

15

Upload: others

Post on 25-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979
Page 2: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

Inhalt / Contents

On the Investigation of Some Statistical properties of theMost Probable Number (ptplv) -Procedure for Estimating theDensity of Microorganisms by Use of Computer Simulations

DR- GTSELA ARNDT, pRoF. DR. HARTMUT wErss andDR- J. FELrx HAMPE, Free university of Berlin

on Bilinear Models for Time Series Analysis and ForecastingDR. WOLFGAIIG BrRI(ENFELD, university of Bielef eId

Tests auf Gleichverteilung Ein GutevergleichPROF. DR. HERBtrRT BUNING, Freie Universität Berlin

The Classical Ruin Problem and Electronic . Roulette t4achinesPROF - DR. uLRrcH DTETER, university of Graz

Price Formation in the Chemical Ind.ustry of the FederalRepublic of Germany Estjmation of an Econometric Modelwith Parameter Restrictions Across Equations

PROF. DR. JOACHTM FROHN, university of Bierefeld

vektorielle AR-Prozesse in der Makroökonomie

PROF. DR. HERMANN GARBERS, UNiVCrSität ZöriCh

The Robustness of some Distributed Lag EstjmatorsPROF. DR. GERD HANStrN, University of Kiel

Robust trstjmates in Linear Regres sion A S jmulation Approach

PROF. DR. SIEGFRIED HEILER, University of Dortmund

Nichtlineare Regression: Parameterschätzung in linearisier-baren Regressionsmodellen

L9

Statistical Cor

Seppo Mustonen

1. INTRODIETION

It is quite connon thatsutFut frsn the cosrputi$ånuå1ly. This may I'aptof the user nåy change i

[Jne solutisn to t,his Fl

{iles urhich cån subsequrFarallel to this åFproårwithin the interacti,re r

ee00W, (l'lustonen 19S0anodule called EDIT0R anr

5URU0 ?6 E0IT0R works ar

and statistical operatirnain purpose af EDIT0R .

reporf writing, EDIT{prscessing like

1) input and editinge) saving data in SUl

3) editing SURW ?64 ) rnaniFu lat,ing listr5) arithuretical and I

6) data analysis.

blorking in editing $odecessingr ås used for inrand the aFerations or cledit field, the ueer l-rat

bility to csntrol each {

in sther {orms sf inter;rience frsn the user tlnCIre scope {or inaginat:genersl. There arer hr

where edit,orial nsde isanalysiE sf variance ån{in EDIT0R tl'lustonen 198(

It nay be reassnable tcEane interactive gtåt ig'ifor å particu lar Frob lelcal speratisns both in r

In t,his päper He shall r

The main eurphasis rgill t

activities will not be {

EDIT0R is siven in l{ustr

5:J

B9

99

11s

PRoF. DR.. MÄ.X-DETLEV JöHNK, universität Hannover

A Test for Independence of Dichotomous Stochastic Variables 151Distributed Over a Regular Two-Dimensional Lattice

PROF. DR. PETER KUHBIER and DIPL. KFM. JOACHIM SCHi,1IDTFree University of Berlin

continued on inside badr cover

Page 3: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

Statistical Computing with a TextEditor

Seppo Mustonen

1. IIITR(IDIJCTION

Il is quite cg$son that uhen uritinE a research report containing nulerical tables theoutput {ron the conputer cannot be used ag such, but the results have to be retypednanually. This nay happen even if lhe csnputer output is sell designed, since the needso{ the user nay change during the reporting phase.

(Jne solutisn to this problpn is to have the posEibility o{ saving results in output{iles uhich can subsequently be treated as tert {iles using a text editing progrår.Parallel to this approach se have develsped another Eolution to these editorial problensuithin the interaciive ståtistical systea StIRU{l ?6 sperating on the desk corputer UanE

P?00UP, {l{ustonen 1980a}. Our Eolutisn has been realiued as a nes extensive SURtf0 76nodule called EOITOR and it is slosely connected to other paris of the systen.

SURVtl ?6 EOITOR uorks as a nornal text, editor, but it also includes several nunericaland statisiical operations thus forning a ssåll scEle statisiical operating systeu. Thenain purpose o{ EDIT0R is to lessen the burden of a ståtistician in data nanagetent End

repont writing. EOITUR can be ssed fsr various tasks encountered in ståtistical dataprocessing like

1) input and editing un{ornatted data"P) saving data in SURtÄl ?6 files,3) editins SURW 76 {iles and results,4) nranipulating lists and multiuay tEbles,5) ariihnetiral and ståtistical ronputations,6) data analysis.

tlorking in editing node di{{ers considerably {rom conversatiolal inieractive data pro-ceEsing, as used for instance in i,he najority sf SURUI ?6 uodules. Since both the daiaand the operations or connands are displayed and handled together xithin the {rane o{ anedit field, the user has an extrenely close contEct sith his uork and he has the possi-bility to rontrol each detail o{ the conputatisnal and editorial activities betier thanin other forns of interactivB analysis. An editsrial operaiing sysien deaånds nore expe-rience frou the user then a sinple conversatj,snal systen, but. at the såle iire givesnorp ecope {or inagination. Edilorial node is no subEtitute for conversatisnal node, ingeneral. There are, hosever, geveral {crne of interactive data analysis and trånagenentuhere editorial node is Bore natural than conversational use. For exanple, problens inanalysis of variance and log-linear ltodels for contingency tables can be easily handledin EOIT{IR (i,lustonen 19S0b).

It gray be reasonahle io have di{ferent interactive norking principles avEilable in thesane interactive ståtistical systeil and let the user select the devices nost suitåble{or a perlicul:r problen. In the SURftl 76 systen we try to provide nany ef the ststisi,i-caL operations both in conversåtional and ediiorial node.

In thj.s pap€r $e shall describe principles and applications o{ the editoriel approach.The sain enphaEis will be on statistical and nunerical operations. Pure text prEcessingactivities uill not be discussed in this cortext, A conprehensive accsunt of SURITU ?6EDIT0R is given in l{ustonen tlgg0b}.

Page 4: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

338

blhen qorking uith EI}IT{IR the uhol.e editing process is controlled by thE norel kertca:dkeyE ånd 3P progrannable 'soft keys' {F-keys) uhich are used {or sinple text edilirg.For nore conplicåted tasks various editing operåtions are available.

A1l the infornåtion is represented in an edit fietfl Hhich consigts, for exånple, of 100coluuns and ?50 rnls. The field is ahays partiålly visible on the CRT_.ghich is like arindou to the field. The user can eaeily Ecroll the text on the CRT to any direction bypressing cprtåin F-keye Bilh arrsE indicåting the direction. The editing operations arealso typed in the edit, {ield and they cån be ireated as roruål texi. Any operation isactivated by uoving the cursor to the corresponding line and by pressing key C0t{TIt{tE.Shenever needed the contents sf lhe edit, field (iables, iext and operations) cal besåved in ån pdit file by aciivating a SAIG operation.

The edit {ield is like e notebook {or the user, but ii is nuch nore flexible, since textänd dåtå in that notebook can be worked upon by editing operåiions and the results ofthese operaiions car be direcied io any part of the {ield. Since the editins sperationsthenselves åre typed a$ong ihe text and datE, the user cår pLace theu as he likes, usu-ally .near the object o{ operation.

If the user likes he can put the operations on adjEcent lines and carry thel out Etep bystep as an Editing progrån, but usually this is unneresiåry. 0n the contrary, it. isiypical lhåt durins the editing procesg the field is {illed $ith a trixture o+ text, dåtaand operatisns, and the user scratches unesseniial ingredients Ehen needed.

ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit fieldis displayed on the fl4x80 EEreen:

0isp. 1SURV0 76 E0IT0R tC )1979 S,l{uEtonen (100x100}

jie!-i:-t-ie3-L-qss-*:

The sire of the {re ld r

0bserve that there r,s lthe Eize o+ a paEP :'r I

and let E0IT0R aut,snet:ulith a FRINT oFPråi:rr,

In digplay i. reF!''es€r,:,:tion and the rlser na"|/ ,

EAn in Eany :'e5Fe::g Ifinuou S ly on t hre Scr gET ,

Typical text editr"mg l;fsr inserticn and Ce1el

The leadi.ng Frj.ficr-FIF i

number Bf toLrches $t-t|;

A. EXA}IF'LE OH DATfr Å;Iqftl

AEsume nCI# t,|mt $E 'd'r'!

Diqp. ä

1 5JF-E TE i1*?*3*4*5*6*7*B*9*

10*11 *H*13*14*t5*tA *

1?*18*19*e0*Pl *PP*33*

,$emmar rF !,r n 'i r!,r,,,iL tr t -gdu

Fin'lrlllI ttt åg![s

Fn=n r ot ! atrLL

Gerns:lylJnT"l:nrllq4^ql!s

Tnol=n'ill L åglrE

t t q { rr

Nors*e,.E^ -i -.LJH{3Å l;r

fuesenSry lt"; e- ;er I

I+ tge iike iJ s::'i, i.';tthis Hili le :ar*:e :rl

CIn line 19; :: it-;€ i!-l

'l gi

:r

1

e?

4q

67

B

Itn1tle{FrI{}

14

15tÄ

L7

1B

19e0PT

??e3

********if*************tf

Page 5: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

i-!e!-ii-t-i93-1--99-pgllls--ti!ll-1-T,'::t---E9-Ll9:------ ----13:3-

The sire o{ the {ield can be altered by usinE a redinensioning speration REDI}I n'n.gbserve that there is no strict correspondence befuteen the size o{ the edit field and

the sire of a page in lhe final report. It is typiEal !o have rather large edil +ieldE

and let EDIT0R auisilaticallv split the fields into pages when the docurent is printed

with a PRINT oPeration.

In display 1 representing an enpty edit field, the cursor is blinking in the {irst pssi-

lion and the user uay start. tyPing texi, data velues and editing oPerations. The svsteu

can in nany respects be operated like a nsrual lypenriter ånd the text aPpears conti-nuously on the screen.

Typical texi ediiing tasks are acconPlished si$ply by F-keys. bte thus have sPecial keys

{or insertion and deletion o{ characiers and lines, {or noving the cursor, etc.The leading principle in all editorial activities is thåt nininun efforl (i.e. nininunnunber o{ touches tlith the kevboard) is needed {or then.

E. EXAI4PLE IIII OATA AI{ALYSIS

Assume nql that ue have iyped the {oll$aing sBall datå set in ihe edit field:

0isp.31-' 9URtIl ?6 EOIT0R (C)19?9 $'ltustonen t100x100)

I7

4

567oIJ

q

10

11

$t?lur

14

t516

1?

1g

19

e0l1äe5?Lur

** Year Iy cCInsunption CIf certain beverages Fer inhabitant* in s$ne EursPean counirieg in f9?4-19?B:* f,of f ee Tea Beer hline $Pirile* (.!ts l..-.-lkg ) --.iÅ).. t 1) . , Lll--- .

*Oenrnark 11"4 0'43 116'3 1l'5 1'7* England 1.5 3'49 118'3 5'? 1.6* Finland le'0 0.1? 55.e B.? 3.?* Franre 5'3 0'11 45,8 101.8 e.5* Germeny 5. g 0. 1? 148- 0 gE.9 3- 0* Holland 8.7 0.54 E1'5 ll'e e'9* Ireland 0'e 3.?B 1e?.9 4"5 e-l* Italy 3.5 0.06 l4.P 99' t 1.0* Norway 9'0 0"13 45.1 3.e I.8* Spain e.5 0.03 4?'6 ?1.8 ?'8* Sweden 11. ? 0'34 56' 0 8"6 :i- 0* Switrerland S'? 0'15 70.9 44'8 g-0-******

If $e like is sorl this datå set in ascending order lrith resFect to 'Hine congunption"this uill be csrried out by a SllRT operation trhich nay be typed on any edilor line (here

on line 19) in the {orsl

Page 6: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

34C-

1,1t-

4tr

f1

'7t

IJIJ

I1n

1tlat?

14

15

16

1?

1g

19fl0

Iat-

-t

4trJ

Ä

1oIJ

s10Ll1l{A'lut

14

15IA

t.7II

{ciJ.L.l

13pn

Seppo Mustonen 9_tgLf S_tå.SJ__c_SF_::J

The lines ar e n H J.r srt! iscending order se El rr:4rr -rr gign

19 *-SRT E, l-" :[

and reactivat,icr -.j Jr,,g

oåsP, ä 1 sUF,'-[l lE t ::

1*? * '*eår,

3 * l-'fi s{

4*[,:5*r6 * France7 * ItalyI * SpainI * fuitzerl.ard

10 * Geraany.11 r Denmark :

lä * Hoiiare13 *FinLerC :

14 * Sryeden :

15 * Eng iel:16 * Ineler i1? * Norrlre1g*19 r-wFr E':-.:!E0*

As an exarpl,e E,{ frrsi ir? j.

nate å U.n ear - E,g. E"g :::ilstånt teru :.:'l tlrp rcr,tå;by a ET Bppratlc:r :i :.*E

Disp,6

f5 * fng;n:16 * Ire lan;n

1? * Norr*a'r

lg*1g *sET 8'1--:!e0*

saying t,llat t"he il tt -i -en *

å{ter the scti,-,atl;l -r i

L, ,,FURUO. 18.FOIT0R ,_ .tC)19Ji_$=i'tu"gjsne[_ t]00x100] ,.. ., ,,, , _ , , ,_** Year ly cgnsugtption o{ certain beverages per inhabitant* in EBnB European csuntries in lg?4-lg?B:* fnf f ee Tea Beer hline Spirits* ,!hr)..(ks) t1). (1),,(11,.,.* Sennark 11.4 0.43 116.:: 11"5 l.?* England 1.5 3.4e 118.3 5.7 1.6* Fin land 1e.0 0,17 55.1 8,7 3.9* France 5.3 0.11 45.9 101.8 e,5* Germany 5.9 0.17 148,0 eE.g 3,0* Hnlland S. ? 0.54 81.5 11.e e.g* Ire land 0. e 3. ?8 1e?.9 4.5 e. I* Italy 3"5 0.06 14.e 99,1 e.0* Norway 9, 0 0. l9 45.1 3,3 1. I* Spain 1.5 0.03 47.6 71.8 e,B* Sweden 11, 7 0.34 56. 0 8.6 g. 0* Switrerland 8.7 0.e5 ?0.9 44.9 e.0

s0RT has three paraneters. The fuio first paranel,ers 6,1? re{er to ihe lines nhich are tobe sorted and the last paraneier 18 is also a line nunher indicaiins the line uith thesort, key uhich is given as a uask '11111, in ihe colutn corregponding to ,lline,.

l{otl in order to start sorting tle have lo activate the SIRT speration by pressing the keyC0NTINUE urhen the cursor is on line lg. llhen cONTlNuE is pressed EDIT0R alsays tries tointerpret the csntents o{ l,he current editor line as an editing operation. If thB linecorresponds t'o a valid operation, it is ilnrediately executed. 0theruise ån errsl nesgågeis displaved. In lhis case activation with C0t'lTINtE leads to the folloring display

Disp.4I

-. ". 5URV0

-, ?SJF lT0 R... ..- ,,( C, )_reH ..s._S u slslr,en . {.100.x r00 ) . ._.

it* Year ly conEunptisn of Eertåin beverages per inl-rabitant* in eogie Eurspean countries in Ig?4-J.g?B:* Cof{ee Tea Beer Hine $pirits* .{kg}.. tkg}.. . t1-} ,,.il) , "tU .._ir Nsrway 9.0 0.13 45,1 3.e 1.B* Ireland 0.e 3.78 1e?.9 4,5 e.l* England 1.5 3.4e 118.3 5.? 1,6* Sweden ll,? 0.34 56.0 8.6 3.0* Fin land 1e,0 0,17 55,3 B. ? e.9* Holland 8. ? 0"54 81,5 ll,l e.9* Dennark 11,4 0.4:i 116, -3 11,5 l. ?* Grrmany 5"S 0.1? 148.0 ee"9 3.0* Switzerland S,? 0.lE ?0"9 44.8 1.0* $pain e"5 0"0:r 4?.6 ?1.B LB* Ita ly :i,5 0" 06 14. e 99" 1 P, 0* France 5":: 0,11 45" B 101. B ä-5

**stlRT 6,17,1S*

**$0RT 6,1?,lB*

11111

11111

Page 7: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

g_tjf!!g_t_ic_el_-c_gggr_t_i_pg_y_i_!!_rlJe5_t__Eqt_t_o_t 34t

The lines are R{u in an ascending order arcording to ,!line,. To display ther in de-scending order ce sinply chanEe i,he SIRT operation tc a -S0RT operation by inserting å"-, sign

19 *-s0RT 6, l?,18

ånd resctivatisn of line tg by C0NTIN[E leads norg lo

Q+,sF'ä

+ ,,.FUR!I! . ?6 Ep IT0R tc ) 1979 s, t{ustsn-en ( t00x 100 }*Iegl

4

567

II

10

11u{11ril14

15

161?18

19

a0

***** France* Italy* Spain

Year Iy cgnsunption of certain beverages per inlabitantin sone EuroFean countries in 1g?4-lg?g:

Csf {ee Tea Beer hline Spirits

1trl-rJ

e,0a. g

e"03.01'7

å. I

,TTl-r J

utl

3,01.65tLrÅ

1.9

1.5 3.4e 11S,3 5. ? 1.60.e 3.79 1e7.9 4.5 e,19,0 0,19 45.1 3,e l- B

lr fuitzer land* Gersrany* Dennark* Holland* Fin land* fueden* Eng land* Ire land* Norulay**-g0RT 6,17,19*

5.3 0. 11 45. g 101. B

3.5 0, 06 14. e gg. 1e.5 0. 03 4?,6 ?1. B8. 7 0. e5 70.9 44. g

5. B 0.1? 148.0 ee.g11.4 0.43 116.3 11.5

g. ? 0,54 gl.5 11,e1e.0 0.17 55.e B. ?11. ? 0.34 56. 0 s.61.5 3.4e 118.3 5. ?0.e 3.?B 1P7"9 4.59,0 0,19 45.1 3.e

t 1111

As an exanple of hsr typical data analytic prohlens are Eolved in EDIT0R ue try to esti_aate a linear regresgion nodel uhere ,Uine, is the dependent variable. To have a con_stant tern in ihB nodel ne first create a new colunn of plain l,s and this takes placeby a SET operation of the forn

Oisp.6

15 * Eng land16 * Ireland1? r Norway18*19 *sET S,1?,19_e0*

saying tlrat the non-b lank characters on line lBAfter the activation o{ this Bperation r*e have

I

ought ta be inserted $n lines 6-l?.

Page 8: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

342 Seppo l'lustonen

Oisp, ?

I _ sllBlQ ?.6. E[IT.[L".. l[]1..?l_9 g.l,lgplolp.n_.--(l!0x!!91... __ . -** Yearly consunptisn cf cgrt€in bevErages per inhabitant* in sCI$e European csuntries in lg?4-lg?B:* f,of {eE Tea Beer tdine Spirits* {ks.l l}g,1._ t 1} .. , . t 1} . !.t"1-._

Lrtt-

3

4trJ

r;

'7I

t{

q

tn

11

ffi11

14

15

161?

1B1q

lP-t5!-i_._11_9g_:__*

D!+r.915 * Eng i:l:tå * ?-:':*-L'iJ .. :

L7 r f{i**: "

18+13 iCA r,l l:li;ilil,

*T JI i"

e 0 * Fi -- t.i1a I I iljlrlr, -T s

e1 +

REGRAN '.ås i,*r: *s r sr mtittrq

tr-Fe:Ljrl'! -.*€ mfiltg- ..i;j

(eIi. -',lf !,i,]r,I,,f;- :;,1 !tr19:.,,,Er iå: -: r-T I t- [ 1' ;Sp:r :'- - 3' : I :i :';å: :eg e i8li::-tm,if ['; S*]i:RE[FS]+ i:'rr:: S:".*ri i".'nil

l'li cn 1,*V4JN'.åu

I _ :t;_S fi a{ Il+

* n g,åf

+ :r:{'

+

rsA:r ii $-1:[irof,--irlt ll.l*--+l:r RF

" ;f, ::: ::pe qflqhtt

l Tlr**U ,itl $ l4rif EE:I-IåL ,&rl

* iiJ$ a:årR!* [c{;*gT Tea* Eee:* Qr*: . " * =vr4r 5s:

* [-n:t*;:rl

The greåf ed','entage ;j :

resu ltE and cpEt'ei.:-:t':cations ånd operetiti":.Here it eeeng tc be rlåiThis LE done by rerrreli:ing the REGRAH line 3i.

* Franre* Ilaly* Spain* Suritzer land* Gernany* 0ens!årkr Holland* Fin landr Sweden* Eng land* Ireland* I'lorway**5ET 6,17,18--

****i(

* France* Italy* Spain* Sr*itzer land* Germany* Dennark* Ha l lsnd* Fin landi+ Sweden* Eng land* Ire land* Nsrway

5,3 0. 11 45. B 101, B 1.53.5 0"06 14.A gg,l 9"0e,5 0, 03 4?.6 ?1" 9 P, g

8.7 0,a5 70.9 44.8 A.05.8 0.1? 148.0 ee"9 :i,0

11.4 0.43 116.3 11.5 1.7B. ? 0,54 Bl.5 1l, e P, g

19.0 0"17 55.e g.? A.gll. ? 0.34 56, 0 9.6 3. 01,5 3,4e 118.3 5.7 1,50.e 3. ?B 1e7,9 4.5 1.19,0 0"19 45.1 3,e 1.9

i.

IIIIIIIIIIIt

In staiisticEl operations our data set can nou be referred i,o by a nane IBH,ITRIES byinserting (here on line tg) a DATA specification

l9 *DATAC0U}ITRIES,6,l?,4

where 6-17 are t'he lines {or the data values and 4 refers to the line telting the nanesa{ the variebles (colunns). Thus our dala eet ready for statisiical analysis looks likå

Disp. II SURtJtl 76 EDIT{]R {C}19?9 S,l'lustonen (100x100)

.*

l E6-,?--,L gir'!E

I ?a-.X,l !g !.f

* Qn:r.r ngr 94 d:

* Qrri+;11r. 1:--W4 v- ! tU. r

* f-'ora='r ",vgr rufr '

* D on;r=r i,vL.lögr \

Y Un'i i;1+!l9l4gr s

i iti; ier:t Er* el er# f;--::r*

!.r5*ul.-

$ T*-:-*-4 L 4!rr -

f f{::s.;.

IC.

;,

4trJ

51

II

tn11

lP{Fr

t415

15

1718

19

EO

l1ee1al- gr

e4

e5e6?7EB

t9

IåLrJLt

-4

5F.

1I

olJ

I1n

t1ulrtIJ

14

15

l6t?II

IB19

Yearly consunptisn o{ certain beverages per inl'rabitantin sone European countrieg in 1974*1978:

Csf{ee Tea Beer trline Spirits Ionstånt,_ihs ) -.. llrq L. tll -( U._. .{ 1}

5.3 0. 11'-!, q n nA,L'tJ Vr gg

e,5 0,03B.? 0,e55.8 0" 17

11.4 0,438"7 0,54

le.0 0,1?Ll- ? 0.::41.5 3" 4e0. e 3.799.0 0"13

45.8 101.8 9,5 I14.e 99.1 e.0 I4?.6 71.8 e. B I70"9 44. B 9.0 1

148.0 eA.9 3.0 1

116" 3 11"5 l. 7 I81.5 11.e 3.9 Itrtr? $-lAfr{JJrl- lJr I LrJ -L

56.0 8,6 3.0 I11s.3 5. ? 1.6 I1e7.9 4,5 e.l I45.1 3,e l.g I

I**NATA ICIUIITRIE5, 6, 1?, 4-

0bserve that rle have also added the label 'Constant, above the låst colu$n.To ronPute the Paramelers o{ a linear regression nodel a REGRAI{ operation is enlered:

Page 9: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

Statistical Computing with a Text Editor 343

0isp.915 * Ensland 1.5 3.4e 118.3 5.7 1.6 116 *Ireland 0.9 3.78 H7.9 4.5 e.l I r

1? * lloruåy 9.0 0.19 45.1 3.e 1.8 1

1S * XXXX XXXX XXXXX yyyyy XXX X -1å3.119 *DATå C{ltSlTRIEs,6,l7,4e0 *RE6RAN C0t_htTRIEs,18,21el *

REGfiAN has three paramelers: the nålre of ihe data sei tC0tl{TRIES}, nuuber s{ the linesPeci{ying the nodel (18} and number o{ the the first line to be u.*ed for lhe resul.te(P1). The nodel is specified (on line 18) by plscins Y's to the colunns of the dependentvariable ttline) and X's !o the colunns sf ihe independent variables (Co{{ee, Tea, Beer,Spirits and Constant). Furthernore, åE ån option, it is possible to obtain the residualsas a neu colunn by giving a nunerical for$at as an inage (-1P3.1). Activation o{ theREGMN line !0 sives the results

Disp. 101 SURV{] ?6 EDIT0R (C)19?9 S.llustonen t100x100)

1*g I Yearly cEnsunpiion of certain beveraEes per inhabitani,3 * in Eone European cauntries in 19?4-19?8:

[s{fee Tea Beer lrline Spirits Cc'nstånt(ke) tkq) {1} tl} tl)

6 * France 5,3 0-11 45.S 101"8 e.5 1 :6.47 * Itely 3,5 0"06 l4"e 39.1 3.0 L 5.7I * Spain e,5 0.03 4?"6 ?1.8 e.B I -15.:i9 * Switzerland 8.7 0,35 ?0.9 44,8 3.0 I 10"9

10 * Gernany 5. B 0.1? 148.0 3e.9 3,0 I -?,::11 * Oenmark 11.4 0.43 116,3 1i..5 1. ? 1 ll,5H * Ho I land B. ? 0.54 gl.5 ll, e e,9 I *6. S

13 * Finland ll,0 0"1? 55,e g-? e.9 I 0.514 * Sweden ll, ? 0,:i4 56.0 9"6 3.0 I 1.9t5 * England 1.5 3,4e 118.3 5,? 1""6 I -1,716 * lreland 0.P 3, ?B 1e?.9 4"5 ä" I I 1,31? * I'lorwey 9,0 0,19 45,1 3.7 1" B 1 -38.018* XXXX XXXX XXXXX YYYYY XXX ;{ *1ä. 1

19 *DATA [0ul.lTRIES.'6,17,4EO *REGMN COLINTRIES, 18.'31-Pl *REGRESSIOI'I Ai'IALY5I5: REGRESSANS:,bline, DATA:,IOUI{TRIES'ee * TOTAL UARIANCE= 1"401.6ä3 DF= lLA3 * RESIDUAL UARIAI{CE',, 4$0,eel DF= ? RfE=0"?819A4 * VARIABLE REGR"IOETF, STD.DEUIATIOT{ T

e5 * Co{{ee -?"689164 A,05534 -:t" 741

4*5*

eg * Tea

27 * Beer-ee.69446ä $"186:!0 -e" ?:lB-0. e6B1?? 0" r0304 -1":iä0

eå * Spiri{s -?.0S?441 13.6e378 -0,5e0e9 * f,onstant 139.644319 37.98P59 3.676

The greal advantage s{ ihe editorial approEch is that lle hsve a}l the ingredients {d.:ta,results and oPerations) on thp same level end inrnediately gvailable *or new mcdi{i-cations and oFeratione. For exanple, it is easy to alter the data values or the nodel.Here it seeos to be reassnable ta sinplify the $sdel by dropping lhe variable'Spirits,,This is done by cancelling the X'e {or 'Spirlts' on ihe inage line l8 and by reactivat-ins the REGRAI'I line ?0.

Page 10: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

344

D*:.r.' 1l5URU0 7å

15 * England 1,5 3,4e 118,3 5.? 1.6 I -1.? 0.:i16 * Ireland 0.1 3.?B 1e?.9 4.5 A.l I 1'3 -0.41? * Norway 9. 0 0. 19 45. 1 3,4 1. 8 I -3S. 0 -33. S

18 * XXXX XXXX XXXXX YYYYY X -18.119 *DATA IOUI{TRIES,6,17,4a0 *REGpsH [0ul,lTRIE$, 18,3l_r1 *REGRE55lON ANåLYSI$: REGRESSAND:,hIiNE, DATA:,COI$ITRIE5,

et * T0TAL UARIAI'IIE= 1401,613 DF= LlI:t tr RESIDUAL IJARIAi{IE- 4B0,ttl DF= 7 Rt?=0.?819E4 * IJARIABLE REGR" IOETF. sTD " NEUIATIOI'I T

e5 * Cs{f ee -7.689164 e ' 055:14 -3" ?41

P6 * Tea -ee,69446e 8.19630 -P.738* *Beer' -0"eGB1?? 0,10304 -1.3e0AB * Spirit,g -?' 087441 13'6ä:178 -0.5P0eg * f,ongiant l:9,644319 :r?.98e59 :!.6?630*31 *REGRI$Sl0iq AilALYSIS: REGRESSAI.ID:'ljine, DATA:,COLIilTRIES,

3ä * T0TAL tsSRIAitl[E= 1401.613 DF= 11

33 t( RESIDUAL UåRIANCE= 4?,6'439 DF= B Rfl=0"??:r534 * UARIAELE RGR,ITIEFF" STD,DEUIATION T

:t5 ir [s{{ee -?"6363?1 1.95?0e -3.90e3å * Tea -el. 00e946 ?, e659? -e. 890

3? ir Beer' -0. e891tl 0' 185?3 -1.5e:l38 * f,snstant lä3. B555Bg l9' 03494 6.4333g tt

altered the first line ofss$e st,eps ts the right.

them as r,Je like, {or in-labels and csmmentg"

9-tg!i:_t:_qel_!-":lgy-t_Ll

DiEp. lP

{ su_Rvg ?F-gr1*g*3 * (lli4*

and acti,rate by FresEin!

Oisp. 13

r suBr€..76 E!1*?*:r * tl.+4*

In srder ts avoid repeatit ig possib Ie to uge tywritten Es followg:

Disp, 14

1_._SURjJ0., 76 Ep

1*e*3 * X=lE4 * arithuretic uieå

If the exFressian on linof X,Y and 7 and insert,i

The definitisns sf varivariab le may be defined ,

csnstruction sf general ,

For instånce, to co$puteto a well-known polynonii

Disp.15! suRt/o 76 ED

** For X) 0, thE* is apprexinål* F=l-fx (bl*t+l* where* {=(l/gqr {Z*p:* l=L/ (l+r*X ) ,

* bl=, -3193815I+* b3=1.7814?79:* b5=1.:fi0e?44i* pi=3.141-59!65** T,o corrpute F t

** X=_ p=

*

Seppo Mustonen

0bserve that in srder to pregerve the pre,lious resultg t,Je have

t,he reEults frcrn 11 ts 3t and moved the inage of the residuals

Befsre teking a printnut nf the results oblained t'le säy editgtance, by renoving technirel lines and ineerting neu text åE

To have a Frintout on paper lhe sinplest $ay is to tyPe FRIilT I'l+9 and aclivatE thisoperation by pressing C0I{TINIE and we get a lis! o{ Iines ?-39 (without line nunbers snd

other control infsrnation) on Fåper. The edit field can also be saved on disk {ar subse-quent usp by typing a SA{,€ {{ile nane} operatisn on any ediior line and by activaiingthis line, Sinilarly any edit file nay be called io the edit {ield by a L0AD 4{ile nane}

operatj-sn. EDITOR al."g provides mesns for conbining edil fields.

3. NTJTIERICAL COI.IPUTAIIONS TN THE EDIT FIELD

blhen working nith ståiistical data in the edit, field ii is natural to expeci simplearithnetic operations to be readily available, As a natter o{ {acl, standard calcu-laiions enriched with vari.cus mathenatical, stålistical and user-de{ined {unctisns Eår

easily be carried out in the edit {ield,

The arithnelic expregsions are writlen in the edil field in nornal fashion and they areevaluated by lyping a "=" gign a{fer the expreseion itsel{ end bv Pressirg the acti-vatian key C0l'lTINtE. The value oblained will then be displaved after lhe u=" eign.

For inst€nce, to conpute the neän of ihe nurnbers 1?, 1? and P5, ue tyPe

re13

14

15

1g

17

IB19

a0alefle3E4

e5e6e?

Page 11: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

g-t-{ie-t-i-93!-S-9spv-t:tg-v3!!-g--!9}-t--E-9}!-"-'------ -----3-f-

0isp.lP1 SURtJt] ?5 EOITOR (C)1979 $.l,lustonen (100x100)

,

1*e*3 * (le +1?+eS)./3=

4*

and activate by Fressing C0NTINIE, This leads to the display

Disp. 13

I $uRV0 76 EDIT0R (C)1979 S.ilustonen (100x100)

1*Pxg * (le +t?+15)/g=184*

In order io avoid repeating various constånts and variablee appearing in the expressionsit is possible to use Eytrbolic notation. For instance, the Freceding exanple could he

uritten as follo$s:

Disp. 14

1 SURVU ?6 EDITOR (C)19?9 S.l,lustonen (100x100) -

1*e*3 * X=lP, Y=l?, Z=€5

4 * arithnei.ic nean (X+Y+Z)./s=_

If the expression on line 4 is activated, EDIT0R is capable o{ findins the definitionso{ X,Y and Z and inserting their values in the expression.

The definitions of variables and constants in the edit {ield can be nested, i.e. avariable nay be defined as a func,tion o{ other variables, ThiE property enahles iheconstruction sf general arithnetic coslu!€!lp!! Echenes,For instance, to conpute values o{ the standard nornal diEtrihution {unciion according.i.o a t,tell-knoun polyno$ial approxinaiion, lhe {ollwing schene will be su{ficiEnt:

0isp. 15

I SURUU ?ti EDITOR - (C)1979 9.1{ustonen (100x100}

rer13 * Fsr Xl0, the standard nornal distribution {unction F(X}14 * is approxinsted by15 * F=1-{*(b1*t+bP*i+e+b3rt+3+b4*tf4+b5*t,+5},16 * where1? * {=(l,/sqr{?*pi})*exp(-Xt?/l) (density function) and18 * t=l/(l+r*X), r=0.?315419l9 * b1=,31938153, b?=-.S6563?8?e0 * b3=1.?81411937, b4=-1.8P13559?8el * b5*1.330ä744?9 ,Pe * pi=3.14159e6$59 .p3*?4 * To compute F(I) enter X on line ä6 and aclivate F

P5{e6 * x=_ F=?7*

Page 12: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

346 Seppo Mustonen

The schene needs no {uriher explanations. The reader imrediaiely sees the essential de-tEils and EDIT0R can interprei all the conpsnents provided i,hat eveiyihing is unanbigu-ously de{ined. Thus, inserting X=3 sn line !6 and activating F on the såne line givesthe resuli

Disp. 15e4 * To conpute FtX) enter X on line 36 and activate F

e5*e6 * x=3 F=0.s865003???7*

0bserve that this conputalion schene included nested de{initions as F depends on t whichdepends on r, etc. $oae elenentary functions like square root and expsnential {unctionuere used, too.

In Eddition io the standard functionE several statistical functions are readily avail-able. For exanple, the distribution {unction, the density {unrtion and lhe inverse dis-tribution funci.ion of the nornal distribution l{{u"sfP} are N.F(u,sf?,x), N.{(u,stp,x)and l{.G{u,sfP,y), respect.ively. Hence the preceding schene csuld bE replaced siuply bythe {unction call l,l.F(0,l,X)=_. Sinre lhe arEulents may be functions, we nay genersterandorr noroål deviates in the edit field as ihe values o{ the function N.G(0,.1,rnd(1}).

The SURtÄl 76 EOIT(IR cotputation schemes cån be considered sinple prograns involvingarithretic oPerations in a {ree forn. Since ihe scheuEs and ihE results uay easily beedited by nornal editing operations, the results uill hp printed or påper precisely inthe ray the uEer likes. The posgibility io conbine conputation schenes sith other åc-tivities provided by EOITIIR sirEngly increases the versEtiliiy of lhe systen.

l{ore advanced exanpLes of ihe possibilities ot{ered by the editorial approach åre pre-sented in the folloling scheues,

Disp, 17

1 SURUI ?6 EDIT0R (C)19?9 S.lluslonen (100x100)5P*53 * The rCIots of the equation a*zfl+b*r*c=0 are conputed ås {o11s$E:54*55 * Let the roots be rl=xt+i*yl, 1t=sl+i*y?56 * ånd the discri$inant=bfl-4*a*c.5?*58 * it dismininant)=O flSl59 r x1=(-b+sqr (discrisrinant) )/{P*a}, y1=0

60 * xP=t-b-sqrtdiscrirrinant))/t?*a), yl=0 endif61 *6e * if disnininant.i0 th,eg63 * x1=-b/(P*a), yl=sqrt-discri$inant)/(ä*a)64 * xp=xl, yfl=-yl endif65*66 * Let a=1, b=4 and c=13.67 * Then68 * xt:=-e y1:=369 * xe:=-e ye:=-!?0 * discri$inantt=-i67L*

Statistical Computi

The Eche$e in display{ if -!hg!-e.ndif Etructuractivated, all the exFr

A:* lg1 SURVO 76 E

e * Generatin:!*4 * f=sS+st*l5 * Hhere eps6 * a0=100, å7*B *C0l'tP 11, eä, 10,9 * XXXXXXXX

10 rf xl1l * L *0,35449

u * a -0.4931513 * 3 0,4Beg314 * 4 -0,55?4?15 * 5 1.94?5316 *5 1.elg4517 * 1 *0.07194

tg * B 1.544e813 *g 0.078:fig0 *10 -.1.0614:lel *11 -0,944?3ae *ffi -0,5a181e3*

In display 18 tge Ere u

funct.isns. Hhen [0]{F on

Xe values 0n lines ll-eto be EonFuted. EDtrT

t def init,i"rn sf epE åndinferestion the Y colug

lli cn 1CY..å=n

a

I'tA

1t€{?

lg!

14

15

16t?1B

19t0e1eeACtLgl

*}}isi*;r4r5*g*?*8*9x10*11*le*

Page 13: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

Statistical Computing with.a Text Editor 347

The scheme in displåy 1? illustrales the possibility o{ usinE condilional de{initions(i{-then-endi{ structure} and nultiple åctivåtions. I{ an exPreEeion tailed with := iea.tivat"a, atf tn" expressions having lhe sane tail uill be aclivated sinultaneouslv,

Oisp. 181 SURV0 ?6 EDIT0R (ClE79 S.l{ustonen t100x100)

1*a*3*4*5*6*1*I *C0l.lP

9*10 lf

11 *tre *er? * a,ÅL.

t4 *41"5 1516 *61? *718 *Bt5 *93S *10

et xllee *He3*

In display 18 ue are using a C0t{P operation whirh enables conctructicn of tables of

{unctions. hlhen C0llP on line $ is activat.ed the Y valu*s $ill be conPuted *or the Xl and

Xl values on lines 11-ee. The auxiliary lires 9 and 10 indicaie that Y is the functionts be csnputed, E0IToR {inds the definilion o{ Y on line 4 and further exPlanalions(de{inition o{ eps and values of s,a0'a1 ånd åe} on lines 5 and 6. Bn ihe basie of thisin{ornation the Y colurnn is created and displayed according tE the fornat on the line 9:

Disp. 191 SURV0 ?5 EDIT0R (C)19?9 $.I{usionen (100x100}

-g *c0flF 1l, ee , 10, 9_9 * XXXXXXXX XXX

10*xlxt11 *l -0.35449 68

ra *7 -0,49315 110

13 *3 0.48e93 33

14 *4 -0.5574? 86

15 *5 1.94?59 136

t6 *6 1.e1945 30

1? *7 -0,0?194 34

18 *B 1.544e8 144

19 n g 0" 0?K{3 150

a0 *10 -1.06143 B9

el *lt -0. s44?3 130

2E *le -0.5e181 S4

e3*

S. gtr.f,1 a-!: I q . dgleic,c p t dålg . tg-g *l i.v e.L, r e q I e-s-g i ql n

... $ g d q}, :

Y =a0+al*X l+a|*Xä +ep s,where epE:"N,G{0,s+e'rnd(l} }, e=3,

a0=L00, a1=10 ånd åä=1.

11, ee , 10, 9_XY,XXXXXX XXX

xl xe

-0.35449 68-0.49315 110

0.48e93 33*0,55?4? 86

1. 94 ?59 136

t.41945 30

-0.0?194 94

1.54448 144

0,0?B-3;l 150

-.1.06143 S9

-0.844?3 130

-0,5a181 E4

tD? tå..LLurr IL'

Y

la3,1äY

165,65t tltr n?r-LJJr Lur

137 " 54

179,11åtrc 1aI-Jl- r urd

141.19pnn tqLVVIL'J

PA? qALgL.- JU

l5e ,531 -tn -t-ll-tLr I I

ä19" 60tt -l-7 tr qiII IrJur

Page 14: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

348 Seppo Mustonen

To "check' this result ue can easily per*orm a REGRåN operation (after inserting aco!.unn C o{ l's as a canstånt terr)!

Disp,?01 SURtfil 76 EOIT0R (Cll9?9 S.l'lustonen (100x100)

1*e * Eeneratinq data accordinq to a qiven reqression nodel:3*4 * |=Eg+6t*lt+sl*Xg+eps,5 * nhFre eps=l{.G(0,sfP,rnd(1}}, s=3,6 * a0=100, al=10 and a!=1.7*g *Cgilp ll,ee,l0,9I * XXXXXXXX XXX 1e3. n10*xlxeYc11 * I -0,35449 68 165.65 I e.761e * e -0.49315 110 196.P3 I -8.0913 * 3 0.4H93 33 13?.54 I 0.1314 * 4 -0.55?4? 86 179.11 1 0.5e15 * 5 1.94?99 136 Pse.* 1 -4,??16 * 6 1.p1945 30 141.f I -1.66l? * ? -0.07194 94 e00.35 I B.e318 * I 1.544e8 144 e$.96 1 3.4419 * 9 0.07833 150 ese,53 1 e.69e0 *10 -1.06143 89 t1?.7? I -3.08el *11 -0,844ri 130 e18.60 I -0.?eP? *te -0.5e181 s4 t77.53 I 0,54e3 * xxxxxxxx xxx YYYYYY X -le.Up4 I0ATA TEST,11,ee,l0e5 *REGRAN tEST,e3,e6_E6 *REGRESSIOI.I AI{ALYSIS: REERESSAI{O:'Y' OATA:'IEST'e7 * T0TAL iJARIAI{CE= 18?1.113 0F= 11eS * RESII}UåL UARIANCE= P1,808 0F= 9 Rf?=0.9902E9 * VARIABI.E REGR.C(IEFF. STO.DEVIATI{]N T

30 * x1 11.3?8313 1.44394 7.8S03l * xe 1.000e56 0.0€636 eB.eBl3e * c 98.906e59 3.64851 e?.10S33*

REFEREI{CES

l'lustonen S.(1980), Interactive analysis in SURUU ?6, ProceEdingr of ConputationalStatistics (Ed. l{.ll,Barritt, D. ilishart), Physica-Uer las, Hien, e53-e89.

l{ustonen 5.t1980), SURUI 76 Editor, å nes tool for interactive stEtistical couputing,text and data nanagenent, Research report. No.19, Oept.of Statistics,University sf HelEinki.

Cornput.ational Experiences !Autcr-ratic Transf er Functior

PROF. DR. HAIVS-JOACHII

Vergleiche zwischen empirirvon ARMA-Modellen iin Zeitbrder Modell-Validierung

DR. WAI-.,TER MOHR, Univr

AFL and tha Teaching of St:

PROF. DR.. PETER NAEVE

Cpti-r:ale S chi chtabgr enzungunter Annahme einer bivarit

PROF. DR. KARL-AUGUST

Nichtparametrische Tests alStufen der Diskretisierung

DR. RAINER SCHLITTGEN

A Linear Combination of EslMode1 A Monte Carlo Studl

PR.OF' . DR. HANS SCHNEE\t-ln iver si ty of Munich

The R.obustne ss of Sampling

DF.. HELI'IUT SCHNEIDER i

I-ni"-ersity of Berlin

Uber eine Verallgemeinerun<

DR. tsEFJiD STREITBERG,

On a GeneralizeC IterationDR. CÖlZ ]F:NKLER, Un.

Statistical Cc:cr-t-rinq withPROF. DF.. SIFPO }IUSTCI

Page 15: Statistical - Survo · ldhen stariing a neg job uith EDIT0R the upper le{t side corner sf a 100x100 edit field is displayed on the fl4x80 EEreen: 0isp. 1 SURV0 76 E0IT0R tC )1979

Vergleiche ^zwischen empirischen und theoretischen KenngröBen 1g5von ARMA-Modellen im zeitbereich - Eine zusåtzliche Möglichkeit

der uodell-Validierung

DR. WALTER MOHR, Universität KieI

XVIII

computational Experiences with an Algorithm for theAutqnatic Transfer Function Modelling

PROF. DR- HAI{S-JOACHIM LENZ, Free University of Berlin

AFL and the Teaching of StatisticsPROF- DR- PETER NAEVE, university of Bielefel-d

optimale schichtabgrenzung bei optimaler Aufteirungunter Arrnahme einer bivariaten Lognormalverteirung

PROF. DR. KART,-AUGUST SCH:{FFER, UNiVCrSität KölN

Nichtparametrische Tests auf Zufälligkeit bei verschiedenenstufen der Diskretisier.ung von Beobachtungsforgen

DR. RÄINER scHLrrrGEN, Frei-e universität Berlin

Inhal- t/ ConLents

167

2t5

231

249

263A Linear combination of Estimators in anDlodel A Monte Carlo Study

PROF. DR. HANS SCHNEEWEISS ANd DIPL.University of Munich

Errors -.in-Variables

MATH. HORST WITSCHEL,

The Robustness of sampling prans for rnspection by variabres 2glDR. HELMUT SCHNEIDER and PRoF. DR. PETER-THEoDoR WILRjICH,University of Berlin

öber eine verallgemeinerung der spektralanalyseDR. BERND STREITBERG, Freie Universität Berlin

On a Generalized Iteration EstimatorDR. cörz TRENKLER, university of Hannover

Statistical computirrg with a Text EditorPROF- DR. sEppo MUSTONEN, university of Helsinki

297

315

337