Home » date » 2010 » Nov » 12 »

minitutorial 2

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 12 Nov 2010 10:06:44 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4.htm/, Retrieved Fri, 12 Nov 2010 11:06:58 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
11 12 7 8 17 8 10 8 12 9 12 7 11 4 11 11 12 7 13 7 14 12 16 10 11 10 10 8 11 8 15 4 9 9 11 8 17 7 17 11 11 9 18 11 14 13 10 8 11 8 15 9 15 6 13 9 16 9 13 6 9 6 18 16 18 5 12 7 17 9 9 6 9 6 12 5 18 12 12 7 18 10 14 9 15 8 16 5 10 8 11 8 14 10 9 6 12 8 17 7 5 4 12 8 12 8 6 4 24 20 12 8 12 8 14 6 7 4 13 8 12 9 13 6 14 7 8 9 11 5 9 5 11 8 13 8 10 6 11 8 12 7 9 7 15 9 18 11 15 6 12 8 13 6 14 9 10 8 13 6 13 10 11 8 13 8 16 10 8 5 16 7 11 5 9 8 16 14 12 7 14 8 8 6 9 5 15 6 11 10 21 12 14 9 18 12 12 7 13 8 15 10 12 6 19 10 15 10 11 10 11 5 10 7 13 10 15 11 12 6 12 7 16 12 9 11 18 11 8 11 13 5 17 8 9 6 15 9 8 4 7 4 12 7 14 11 6 6 8 7 17 8 10 4 11 8 14 9 11 8 13 11 12 8 11 5 9 4 12 8 20 10 12 6 13 9 12 9 12 13 9 9 15 10 24 20 7 5 17 11 11 6 17 9 11 7 12 9 14 10 11 9 16 8 21 7 14 6 20 13 13 6 11 8 15 10 19 16
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
ParentalExpectations[t] = + 6.4398361021299 + 0.752008775996732ParentalCriticism[t] + 0.00286466829855502t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.43983610212990.7885988.166200
ParentalCriticism0.7520087759967320.0821029.159400
t0.002864668298555020.0048270.59350.5537360.276868


Multiple Linear Regression - Regression Statistics
Multiple R0.594441332727225
R-squared0.353360498054519
Adjusted R-squared0.345070248029577
F-TEST (value)42.6236237738787
F-TEST (DF numerator)2
F-TEST (DF denominator)156
p-value1.66533453693773e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.78835056709640
Sum Squared Residuals1212.88422606418


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11115.4668060823893-4.46680608238925
2712.4616356467009-5.46163564670087
31712.46450031499944.53549968500058
41012.4673649832980-2.46736498329798
51213.2222384275933-1.22223842759327
61211.72108554389840.278914456101642
7119.467923884206721.53207611579328
81114.7348499844824-3.73484998448239
91211.72967954879400.270320451205977
101311.73254421709261.26745578290742
111415.4954527653748-1.49545276537479
121613.99429988167992.00570011832012
131113.9971645499784-2.99716454997844
141012.4960116662835-2.49601166628353
151112.4988763345821-1.49887633458209
16159.493705898893715.50629410110629
17913.2566144471759-4.25661444717593
181112.5074703394778-1.50747033947775
191711.75832623177965.24167376822043
201714.76922600406512.23077399593495
211113.2680731203701-2.26807312037015
221814.77495534066223.22504465933784
231416.2818375609542-2.28183756095418
241012.5246583492691-2.52465834926908
251112.5275230175676-1.52752301756764
261513.28239646186291.71760353813708
271511.02923480217133.97076519782872
281313.2881257984600-0.288125798460032
291613.29099046675862.70900953324141
301311.03782880706691.96217119293305
31911.0406934753655-2.04069347536550
321818.5636459036314-0.563645903631373
331810.29441403596597.70558596403412
341211.80129625625790.198703743742101
351713.30817847654993.69182152345008
36911.0550168168583-2.05501681685828
37911.0578814851568-2.05788148515683
381210.30873737745871.69126262254134
391815.57566347773432.42433652226567
401211.81848426604920.181515733950771
411814.07737526233803.92262473766202
421413.32823115463980.671768845360198
431512.57908704694162.42091295305837
441610.32592538725005.67407461275001
451012.5848163835387-2.58481638353874
461112.5876810518373-1.58768105183729
471414.0945632721293-0.0945632721293087
48911.0893928364409-2.08939283644094
491212.5962750567330-0.596275056732956
501711.84713094903485.15286905096522
5159.59396928934314-4.59396928934314
521212.6048690616286-0.604869061628621
531212.6077337299272-0.607733729927176
5469.6025632942388-3.60256329423881
552421.63756837848512.36243162151494
561212.6163277348228-0.616327734822841
571212.6191924031214-0.619192403121396
581411.11803951942652.88196048057351
5979.61688663573158-2.61688663573158
601312.62778640801710.372213591982939
611213.3826598523123-1.38265985231235
621311.12949819262071.87050180737929
631411.8843716369162.11562836308401
64813.3912538572080-5.39125385720801
651110.38608342151960.613916578480359
66910.3889480898182-1.38894808981820
671112.6478390861069-1.64783908610695
681312.65070375440550.349296245594499
691011.1495508707106-1.14955087071059
701112.6564330910026-1.65643309100261
711211.90728898330440.0927110166955656
72911.910153651603-2.91015365160299
731513.4170358718951.58296412810499
741814.92391809218703.07608190781297
751511.16673888050193.83326111949808
761212.6736211007939-0.673621100793941
771311.17246821709901.82753178290097
781413.43135921338780.568640786612217
791012.6822151056896-2.68221510568961
801311.18106222199471.81893777800530
811314.1919619942802-1.19196199428018
821112.6908091105853-1.69080911058527
831312.69367377888380.306326221116174
841614.20055599917581.79944400082416
85810.4433767874907-2.44337678749074
861611.95025900778284.04974099221724
871110.44910612408790.550893875912148
88912.7079971203766-3.7079971203766
891617.2229144446555-1.22291444465555
901211.96171768097700.0382823190230201
911412.71659112527231.28340887472773
92811.2154382415774-3.21543824157736
93910.4662941338792-1.46629413387918
941511.22116757817453.77883242182553
951114.2320673504599-3.23206735045995
962115.73894957075205.26105042924803
971413.48578791106030.514212088939672
981815.74467890734912.25532109265092
991211.98749969566400.0125003043360250
1001312.74237313995930.257626860040738
1011514.24925536025130.75074463974872
1021211.24408492456290.755915075437091
1031914.25498469684844.74501530315161
1041514.25784936514690.742150634853055
1051114.2607140334455-3.2607140334455
1061110.50353482176040.496465178239603
1071012.0104170420524-2.01041704205242
1081314.2693080383412-1.26930803834117
1091515.0241814826365-0.0241814826364516
1101211.26700227095130.732997729048651
1111212.0218757152466-0.0218757152466351
1121615.78478426352880.215215736471152
113915.0356401558307-6.03564015583067
1141815.03850482412922.96149517587077
115815.0413694924278-7.04136949242778
1161310.53218150474592.46781849525405
1171712.79107250103474.2089274989653
118911.2899196173398-2.28991961733979
1191513.54881061362851.45118938637146
12089.79163140194344-1.79163140194344
12179.794496070242-2.79449607024199
1221212.0533870665307-0.0533870665307405
1231415.0642868388162-1.06428683881622
124611.3071076271311-5.30710762713112
125812.0619810714264-4.06198107142641
1261712.81685451572174.18314548427831
127109.811684080033320.188315919966678
1281112.8225838523188-1.82258385231880
1291413.57745729661410.422542703385911
1301112.8283131889159-1.82831318891591
1311315.0872041852047-2.08720418520466
1321212.8340425255130-0.834042525513022
1331110.58088086582140.419119134178617
13499.8317367581232-0.831736758123207
1351212.8426365304087-0.842636530408687
1362014.34951875070075.65048124929929
1371211.34434831501230.655651684987666
1381313.6032393113011-0.603239311301084
1391213.6061039795996-1.60610397959964
1401216.6170037518851-4.61700375188512
141913.6118333161967-4.61183331619675
1421514.36670676049200.633293239507964
1432421.88965918875792.11034081124209
144710.6123922171055-3.61239221710549
1451715.12730954138441.87269045861557
1461111.3701303296993-0.370130329699329
1471713.62902132598813.37097867401192
1481112.1278684422932-1.12786844229317
1491213.6347506625852-1.63475066258519
1501414.3896241068805-0.389624106880476
1511113.6404799991823-2.6404799991823
1521612.89133589148413.10866410851588
1532112.14219178378598.85780821621406
1541411.39304767608782.60695232391223
1552016.65997377636343.34002622363655
1561311.39877701268491.60122298731512
1571112.9056592329769-1.90565923297690
1581514.41254145326890.587458546731084
1591918.92745877754790.0725412224521393


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.9132747720680440.1734504558639120.086725227931956
70.8434570231791910.3130859536416170.156542976820809
80.7811905570494510.4376188859010980.218809442950549
90.679699591603120.640600816793760.32030040839688
100.5794668759136520.8410662481726960.420533124086348
110.4846772979125780.9693545958251560.515322702087422
120.44332634697050.8866526939410.5566736530295
130.4655242690686090.9310485381372170.534475730931391
140.4842807181621990.9685614363243990.515719281837801
150.4223000630279360.8446001260558720.577699936972064
160.4344225625943250.868845125188650.565577437405675
170.5118642432410830.9762715135178330.488135756758917
180.4494093950259030.8988187900518070.550590604974097
190.5745125329341010.8509749341317990.425487467065899
200.6079889589805750.784022082038850.392011041019425
210.6066144005428680.7867711989142640.393385599457132
220.6551365150055990.6897269699888020.344863484994401
230.6064008707273820.7871982585452360.393599129272618
240.6672796144466590.6654407711066820.332720385553341
250.6546505203229630.6906989593540730.345349479677037
260.6059043142988050.788191371402390.394095685701195
270.5751786975614990.8496426048770020.424821302438501
280.5228154514355060.9543690971289870.477184548564494
290.4878236606306020.9756473212612040.512176339369398
300.4386056064096580.8772112128193160.561394393590342
310.5270256806803140.9459486386393730.472974319319687
320.4939357859322740.9878715718645480.506064214067726
330.6453074938949590.7093850122100810.354692506105041
340.624189859789340.751620280421320.37581014021066
350.6121428825931380.7757142348137240.387857117406862
360.700790321820780.598419356358440.29920967817922
370.7509849232405250.4980301535189490.249015076759475
380.7148167870363560.5703664259272880.285183212963644
390.6980828772485770.6038342455028450.301917122751423
400.665365878669410.669268242661180.33463412133059
410.6766807983187160.6466384033625680.323319201681284
420.6331807092897130.7336385814205750.366819290710287
430.596169960381280.807660079237440.40383003961872
440.6486598376007580.7026803247984840.351340162399242
450.709485330014550.5810293399709010.290514669985450
460.7164047272989290.5671905454021430.283595272701071
470.6772309519936390.6455380960127230.322769048006361
480.7117688025311270.5764623949377470.288231197468873
490.6827813649777140.6344372700445710.317218635022286
500.7394209426290380.5211581147419250.260579057370962
510.8672806104841490.2654387790317020.132719389515851
520.8458833287408970.3082333425182060.154116671259103
530.8216671820983890.3566656358032230.178332817901611
540.8665096381173730.2669807237652540.133490361882627
550.8643601319431850.271279736113630.135639868056815
560.8414224770305120.3171550459389760.158577522969488
570.8156711926496490.3686576147007030.184328807350351
580.8090749691348970.3818500617302050.190925030865103
590.8164555108125960.3670889783748070.183544489187404
600.7842965872597190.4314068254805630.215703412740281
610.7608236984365760.4783526031268480.239176301563424
620.7365297843239810.5269404313520370.263470215676019
630.7156915804072410.5686168391855170.284308419592759
640.8176598590522670.3646802818954670.182340140947733
650.7871256456582680.4257487086834640.212874354341732
660.763527055900530.4729458881989390.236472944099469
670.7402712766751960.5194574466496070.259728723324804
680.7018509973683050.596298005263390.298149002631695
690.6686178840148820.6627642319702360.331382115985118
700.6407732144833450.7184535710333110.359226785516655
710.596799007176270.806401985647460.40320099282373
720.5994312465534420.8011375068931150.400568753446558
730.5693919065278710.8612161869442580.430608093472129
740.5786118744191670.8427762511616670.421388125580833
750.6151142440885060.7697715118229890.384885755911494
760.5736419503050860.8527160993898280.426358049694914
770.5480856128664520.9038287742670960.451914387133548
780.5047709317623590.9904581364752830.495229068237641
790.5004973155931990.9990053688136030.499502684406801
800.4754032693077780.9508065386155560.524596730692222
810.4374056975970920.8748113951941840.562594302402908
820.4079073228036160.8158146456072310.592092677196384
830.3648881533766160.7297763067532320.635111846623384
840.3411406498357840.6822812996715690.658859350164216
850.3299122024564490.6598244049128990.67008779754355
860.3804830569270350.760966113854070.619516943072965
870.3419756296217030.6839512592434050.658024370378297
880.3680429696927410.7360859393854830.631957030307259
890.3323469859724410.6646939719448810.667653014027559
900.2919375836584990.5838751673169980.708062416341501
910.263245652010750.52649130402150.73675434798925
920.2700812390927810.5401624781855620.729918760907219
930.2410989052576320.4821978105152630.758901094742368
940.2775403173316900.5550806346633810.72245968266831
950.2849194417421650.569838883484330.715080558257835
960.3973842172262520.7947684344525030.602615782773748
970.3564934940286880.7129869880573770.643506505971312
980.3477475326725280.6954950653450560.652252467327472
990.3073757782750850.6147515565501710.692624221724914
1000.270353124563010.540706249126020.72964687543699
1010.2397462691455270.4794925382910540.760253730854473
1020.2126713689061930.4253427378123870.787328631093807
1030.3146144119293740.6292288238587490.685385588070626
1040.2891078831518620.5782157663037250.710892116848138
1050.2846610064911030.5693220129822060.715338993508897
1060.2562692047650590.5125384095301180.743730795234941
1070.2290307009882250.4580614019764510.770969299011775
1080.1971063829981350.394212765996270.802893617001865
1090.1689563342187390.3379126684374780.83104366578126
1100.1505063913974060.3010127827948120.849493608602594
1110.1282103020217220.2564206040434430.871789697978278
1120.1100125668991490.2200251337982970.889987433100851
1130.1733102185111860.3466204370223720.826689781488814
1140.2032231265935660.4064462531871310.796776873406434
1150.3651546416519620.7303092833039240.634845358348038
1160.3851144917838280.7702289835676550.614885508216172
1170.5161541301556930.9676917396886150.483845869844307
1180.4760055783734730.9520111567469450.523994421626527
1190.4745388073954280.9490776147908550.525461192604572
1200.428551728063910.857103456127820.57144827193609
1210.395619669266650.79123933853330.60438033073335
1220.3554298923503020.7108597847006040.644570107649698
1230.3074667060762440.6149334121524880.692533293923756
1240.3718017505712310.7436035011424630.628198249428769
1250.3921205431418010.7842410862836030.607879456858199
1260.51272628174620.97454743650760.4872737182538
1270.4667021796299540.9334043592599080.533297820370046
1280.4140939455985250.828187891197050.585906054401475
1290.3719164678951180.7438329357902370.628083532104882
1300.3218225237682040.6436450475364070.678177476231796
1310.2794546578362960.5589093156725920.720545342163704
1320.2301898749500540.4603797499001080.769810125049946
1330.1922130500702260.3844261001404520.807786949929774
1340.1522311705646990.3044623411293970.847768829435301
1350.1177688873058600.2355377746117210.88223111269414
1360.3032519686097390.6065039372194780.696748031390261
1370.2825996646592450.565199329318490.717400335340755
1380.2363082871181050.472616574236210.763691712881895
1390.1870639045318050.3741278090636110.812936095468195
1400.2140579865394240.4281159730788490.785942013460576
1410.2764757661554710.5529515323109420.723524233844529
1420.2179347408706870.4358694817413750.782065259129313
1430.1836866716968590.3673733433937190.81631332830314
1440.2313829774316230.4627659548632460.768617022568377
1450.1917647621258600.3835295242517190.80823523787414
1460.1472957242087390.2945914484174790.85270427579126
1470.1522079425353660.3044158850707320.847792057464634
1480.1164629890573310.2329259781146630.883537010942669
1490.1020581680828890.2041163361657780.897941831917111
1500.08139010870071670.1627802174014330.918609891299283
1510.4883957344830360.9767914689660720.511604265516964
1520.6311718983044430.7376562033911140.368828101695557
1530.859329496103660.2813410077926800.140670503896340


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/10x8di1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/10x8di1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/18pz71289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/18pz71289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/28pz71289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/28pz71289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/31ygs1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/31ygs1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/41ygs1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/41ygs1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/51ygs1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/51ygs1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/6uqfd1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/6uqfd1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/74hef1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/74hef1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/84hef1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/84hef1289556390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/94hef1289556390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/12/t1289556418db27g053rdp7se4/94hef1289556390.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by