Home » date » 2010 » Dec » 01 »

*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: Wed, 01 Dec 2010 15:02:43 +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/Dec/01/t1291215676od2msrl37ea6iq7.htm/, Retrieved Wed, 01 Dec 2010 16:01:30 +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/Dec/01/t1291215676od2msrl37ea6iq7.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 etc...
 
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 time13 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
ParentalExpectations[t] = + 5.84398572246927 + 0.089509001211471ConcernoverMistakes[t] -0.125900164013591Doubtsaboutactions[t] + 0.665601272609036ParentalCriticism[t] + 0.118116470483093PersonalStandards[t] -0.0820356250087837Organization[t] + 0.00239657305847147t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.843985722469271.8923913.08810.0023950.001197
ConcernoverMistakes0.0895090012114710.0483231.85230.065920.03296
Doubtsaboutactions-0.1259001640135910.087456-1.43960.1520430.076022
ParentalCriticism0.6656012726090360.0865197.693100
PersonalStandards0.1181164704830930.0634461.86170.0645790.032289
Organization-0.08203562500878370.063311-1.29580.1970250.098512
t0.002396573058471470.0048260.49660.6201670.310084


Multiple Linear Regression - Regression Statistics
Multiple R0.639019153846926
R-squared0.408345478983241
Adjusted R-squared0.384990695258896
F-TEST (value)17.4844470324754
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.44249065417534e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.70203430228648
Sum Squared Residuals1109.75038435138


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11114.9210803410870-3.92108034108703
2713.0925046624711-6.09250466247109
31713.43484114830363.56515885169635
41011.6361358131956-1.63613581319558
51213.4902262264019-1.49022622640187
61210.91024567370431.08975432629569
7119.956366345265971.04363365473403
81114.2259452167972-3.22594521679716
91210.32471943386711.67528056613286
101311.09346683268811.90653316731189
111414.554926132076-0.554926132076005
121614.4707970824631.52920291753700
131113.5496229211280-2.54962292112802
141011.9620371324013-1.96203713240129
151112.0743727841591-1.0743727841591
161510.00739054312184.99260945687818
17913.5795763177156-4.57957631771556
181112.2165710111153-1.21657101111529
191711.96141558138145.03858441861858
201715.30167424463891.6983257553611
211113.4068964786110-2.40689647861104
221815.08696112539692.91303887460311
231415.8199758100445-1.81997581004447
241012.4777674916039-2.47776749160386
251111.6098113580877-0.609811358087718
261513.0694746036461.930525396354
271511.54343614067583.45656385932416
281312.92344670987430.0765532901256664
291613.68797026156852.31202973843147
301311.00978506977631.99021493022365
31911.3749801486981-2.37498014869810
321817.89579206050390.104207939496127
331812.14214761764445.85785238235564
341213.544038263138-1.54403826313799
351713.53699241436273.46300758563734
36912.0662067965594-3.06620679655941
37912.9976392204493-3.99763922044935
38128.615472501287383.38452749871262
391816.78063083699541.21936916300456
401212.8645388840027-0.864538884002747
411814.04137616519633.95862383480374
421413.83724218181170.162757818188252
431511.88303388814043.11696611185961
441610.73208523143525.26791476856481
451012.9920289324247-2.99202893242469
461111.4223100984825-0.422310098482495
471412.79745657883181.20254342116819
48912.9546956639666-3.95469566396657
491213.6890797650787-1.68907976507872
501712.14929165222254.85070834777747
5159.6892712670686-4.68927126706859
521212.2830691280004-0.283069128000386
531211.89232456895000.107675431050019
5469.32418084441337-3.32418084441337
552422.68965502899551.31034497100449
561212.4492980602770-0.449298060277039
571212.8716633115142-0.871663311514152
581411.52105784540212.47894215459789
5979.14216034017986-2.14216034017986
601311.01827443022931.98172556977065
611213.1530443433647-1.15304434336469
621311.47280856443711.52719143556287
631411.38184557961942.61815442038062
64812.828178032706-4.8281780327060
65119.321251270270651.67874872972935
66911.7415669730691-2.74156697306911
671113.7266513741233-2.72665137412327
681313.3657289960723-0.365728996072311
69109.365158091843760.634841908156243
701112.6438553743722-1.64385537437222
711212.7299476991651-0.729947699165084
72911.8369439427810-2.83694394278103
731514.61773402225600.382265977744032
741814.88006414833353.11993585166653
751512.11349002974252.88650997025748
761212.7902221279907-0.790222127990724
77139.852699458113.14730054188999
781413.01992428220640.980075717793585
791011.8856399256721-1.88563992567208
801312.29879744445700.701202555543015
811313.7281754848096-0.728175484809554
821112.0961296798454-1.09612967984536
831312.17602771345800.823972286541976
841614.46834605945851.53165394054155
8589.7010565910997-1.7010565910997
861611.59756154450354.40243845549648
871111.1033545592561-0.103354559256068
88911.2973727503253-2.29737275032526
891617.7555095598081-1.75550955980811
901211.44578746190510.554212538094875
911411.99064078497222.00935921502778
92810.5990252105176-2.59902521051758
9399.5632762181969-0.563276218196896
941511.73091746258863.26908253741136
951113.5607264409179-2.56072644091785
962117.22385021004133.77614978995873
971413.25679643088580.743203569114156
981815.78282181142442.21717818857561
991211.71137325392810.288626746071948
1001312.68606918923390.313930810766051
1011514.53568841111990.464311588880138
1021211.06484249415880.935157505841179
1031914.45368343121064.54631656878938
1041514.02886488629010.971135113709867
1051113.0310396357798-2.03103963577984
1061110.67859718688980.321402813110238
1071012.3636065048675-2.36360650486749
1081314.7876214558746-1.78762145587455
1091514.77776314408220.222236855917844
110129.909266051022032.09073394897797
1111211.02058365545970.979416344540331
1121615.75590936662380.244090633376160
113915.5029829815267-6.50298298152667
1141817.5347037737850.465296226215006
115815.0299439185223-7.02994391852226
1161310.38652814750612.6134718524939
1171714.19887800207352.80112199792651
118911.0607927299636-2.06079272996360
1191513.22441945442241.77558054557755
12089.66830879116794-1.66830879116794
121711.2734798663308-4.27347986633081
1221211.35921075474920.640789245250816
1231415.0612088247332-1.06120882473319
124610.7816409078796-4.78164090787956
125810.1787563197468-2.17875631974677
1261712.46966883373184.53033116626818
127109.775896647811870.224103352188126
1281112.5827045162717-1.58270451627169
1291412.84323511208061.15676488791943
1301113.6916827520720-2.69168275207196
1311315.4220010557674-2.42200105576742
1321211.95130149286600.0486985071339531
1331110.46304041764660.536959582353384
13499.49175140350906-0.491751403509056
1351212.1160648040677-0.116064804067659
1362014.78270876620055.2172912337995
1371210.74388419576701.25611580423302
1381313.6794670666938-0.679467066693817
1391213.1935634194986-1.19356341949856
1401216.5328463645447-4.53284636454472
141914.6631617883371-5.6631617883371
1421515.6353737848601-0.635373784860084
1432421.54442448495362.45557551504644
144710.0198760511055-3.01987605110552
1451714.66798477882912.33201522117086
1461111.9891411384082-0.98914113840824
1471715.22260586388961.77739413611037
1481112.3546993714627-1.35469937146269
1491212.6052306846408-0.605230684640808
1501414.5430980313602-0.543098031360179
1511114.3714030662813-3.37140306628126
1521612.89086470931643.10913529068361
1532113.93265506932007.06734493067996
1541412.30254759873151.69745240126849
1552016.46763210194833.5323678980517
1561311.12147511371201.87852488628796
1571113.1546479026359-2.15464790263593
1581514.00493148670860.995068513291384
1591918.00230511188590.997694888114128


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5685567672945950.862886465410810.431443232705405
110.5881478258663740.8237043482672510.411852174133626
120.6146633404593940.7706733190812120.385336659540606
130.6122101565599090.7755796868801820.387789843440091
140.5735876366778760.8528247266442470.426412363322124
150.6360412209590630.7279175580818740.363958779040937
160.5593670190677810.8812659618644390.440632980932219
170.7132071093083570.5735857813832870.286792890691643
180.6363065925473140.7273868149053710.363693407452686
190.6626307949591740.6747384100816520.337369205040826
200.6142024564239770.7715950871520460.385797543576023
210.6533696275372550.693260744925490.346630372462745
220.6587421838333460.6825156323333080.341257816166654
230.6106820443634250.778635911273150.389317955636575
240.7191999098545560.5616001802908870.280800090145444
250.7061223173048420.5877553653903160.293877682695158
260.6478815319027970.7042369361944070.352118468097203
270.5977422450502390.8045155098995220.402257754949761
280.5402405023789140.9195189952421730.459759497621086
290.4805921850204660.9611843700409320.519407814979534
300.4262231332001420.8524462664002840.573776866799858
310.5928803749931270.8142392500137460.407119625006873
320.5383133063213710.9233733873572580.461686693678629
330.5608530413830250.878293917233950.439146958616975
340.6658486094141250.668302781171750.334151390585875
350.6444935085813960.7110129828372090.355506491418604
360.729833087248920.540333825502160.27016691275108
370.8061854515017620.3876290969964770.193814548498238
380.7813992387856240.4372015224287520.218600761214376
390.7502938130805660.4994123738388690.249706186919434
400.7319659548601880.5360680902796250.268034045139812
410.7622626493781090.4754747012437830.237737350621891
420.7291158241869440.5417683516261130.270884175813057
430.7029684378983040.5940631242033910.297031562101696
440.7404265653036230.5191468693927550.259573434696377
450.8184459490207750.363108101958450.181554050979225
460.8095397723096080.3809204553807840.190460227690392
470.7733563332198440.4532873335603120.226643666780156
480.8228570485236220.3542859029527560.177142951476378
490.8079591287540090.3840817424919820.192040871245991
500.849576586753070.3008468264938590.150423413246929
510.9162090006149440.1675819987701110.0837909993850557
520.903157844270720.1936843114585600.096842155729280
530.8818592051034160.2362815897931670.118140794896584
540.9185902407682290.1628195184635420.0814097592317711
550.9005152127095330.1989695745809340.0994847872904668
560.8786533949823120.2426932100353760.121346605017688
570.8595056158104020.2809887683791960.140494384189598
580.848070253775120.3038594924497590.151929746224880
590.852384722244540.2952305555109210.147615277755460
600.8317084649139950.3365830701720110.168291535086005
610.8133704265795420.3732591468409160.186629573420458
620.7888630863694020.4222738272611960.211136913630598
630.7816916502675250.436616699464950.218308349732475
640.8636737373020630.2726525253958750.136326262697937
650.84779699066210.3044060186758010.152203009337900
660.8446411969486240.3107176061027520.155358803051376
670.8443726195890090.3112547608219830.155627380410991
680.8175749285527550.3648501428944900.182425071447245
690.792981400627210.4140371987455780.207018599372789
700.7705146885110350.4589706229779290.229485311488965
710.7427355439494640.5145289121010720.257264456050536
720.745320455335980.5093590893280420.254679544664021
730.7141166963735760.5717666072528470.285883303626424
740.729383682877140.5412326342457210.270616317122860
750.7331857321997850.5336285356004290.266814267800215
760.6983759280372960.6032481439254090.301624071962704
770.725776286100430.5484474277991410.274223713899571
780.6909315992567750.618136801486450.309068400743225
790.6678297631666560.6643404736666890.332170236833344
800.6268390250810210.7463219498379570.373160974918979
810.5844608497252820.8310783005494360.415539150274718
820.548768565172630.902462869654740.45123143482737
830.5056868999079090.9886262001841810.494313100092091
840.4726793024995210.9453586049990430.527320697500479
850.4438132076632660.8876264153265330.556186792336734
860.5205927479517030.9588145040965940.479407252048297
870.4764957433600390.9529914867200780.523504256639961
880.4583581527149020.9167163054298050.541641847285098
890.4360922610810660.8721845221621320.563907738918934
900.3912713201490860.7825426402981720.608728679850914
910.3694963032647350.738992606529470.630503696735265
920.3647898116034860.7295796232069710.635210188396514
930.3227310818182380.6454621636364760.677268918181762
940.3429200968279710.6858401936559410.657079903172029
950.3379700996571100.6759401993142190.66202990034289
960.3714366890430090.7428733780860180.628563310956991
970.3302631351893160.6605262703786330.669736864810684
980.3084648028825510.6169296057651010.69153519711745
990.2682202929800020.5364405859600040.731779707019998
1000.2303106533655780.4606213067311570.769689346634422
1010.1973785451709420.3947570903418850.802621454829058
1020.1734476373741760.3468952747483520.826552362625824
1030.2482712570831820.4965425141663630.751728742916818
1040.2252346754784190.4504693509568390.77476532452158
1050.2030118131397490.4060236262794980.796988186860251
1060.1759049670645410.3518099341290820.824095032935459
1070.1651245116222890.3302490232445780.834875488377711
1080.1473552655030630.2947105310061250.852644734496937
1090.1220091253399460.2440182506798920.877990874660054
1100.1235514524136750.2471029048273500.876448547586325
1110.1107932002191010.2215864004382020.889206799780899
1120.08919525742935470.1783905148587090.910804742570645
1130.2116166195627400.4232332391254810.78838338043726
1140.1872704634427170.3745409268854330.812729536557283
1150.3898182056016540.7796364112033090.610181794398346
1160.3979969443358360.7959938886716710.602003055664164
1170.4539404341671910.9078808683343810.546059565832809
1180.4123794342364810.8247588684729620.587620565763519
1190.3961801249889360.7923602499778730.603819875011064
1200.3630183840341830.7260367680683660.636981615965817
1210.3756973623076310.7513947246152630.624302637692369
1220.3725536830361600.7451073660723210.62744631696384
1230.32218898505430.64437797010860.6778110149457
1240.4082995218922640.8165990437845290.591700478107736
1250.3600549465428250.720109893085650.639945053457175
1260.5006496962503150.9987006074993710.499350303749685
1270.4538629738470970.9077259476941930.546137026152903
1280.4051681770585730.8103363541171450.594831822941427
1290.3543311421102830.7086622842205670.645668857889717
1300.3514696766855750.702939353371150.648530323314425
1310.3200235005884720.6400470011769440.679976499411528
1320.2636552676204670.5273105352409350.736344732379533
1330.2145076217910960.4290152435821920.785492378208904
1340.1683795156430700.3367590312861400.83162048435693
1350.128657214543670.257314429087340.87134278545633
1360.2558489335491640.5116978670983290.744151066450836
1370.3105530562230920.6211061124461840.689446943776908
1380.3130881347647820.6261762695295640.686911865235218
1390.2473497863242180.4946995726484350.752650213675782
1400.2484295799373880.4968591598747770.751570420062612
1410.4144364341598390.8288728683196770.585563565840161
1420.3682947785164810.7365895570329630.631705221483519
1430.2971531873033250.594306374606650.702846812696675
1440.2488994799308820.4977989598617630.751100520069118
1450.27588355162730.55176710325460.7241164483727
1460.2071661400043660.4143322800087320.792833859995634
1470.1349621109710910.2699242219421820.865037889028909
1480.085655525656050.17131105131210.91434447434395
1490.04293947039038290.08587894078076580.957060529609617


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 level10.00714285714285714OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/10p8c81291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/10p8c81291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/1i7xw1291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/1i7xw1291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/2i7xw1291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/2i7xw1291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/3byeh1291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/3byeh1291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/4byeh1291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/4byeh1291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/5byeh1291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/5byeh1291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/6lpwk1291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/6lpwk1291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/7egd51291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/7egd51291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/8egd51291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/8egd51291215749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/9egd51291215749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215676od2msrl37ea6iq7/9egd51291215749.ps (open in new window)


 
Parameters (Session):
par1 = 3 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 3 ; 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