Home » date » 2010 » Dec » 18 »

Paper MR 3

*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: Sat, 18 Dec 2010 16:44:00 +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/18/t1292690562uoj6xh2j6jpxtrn.htm/, Retrieved Sat, 18 Dec 2010 17:42:53 +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/18/t1292690562uoj6xh2j6jpxtrn.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 «
69 26 9 15 6 25 25 53 20 9 15 6 25 24 43 21 9 14 13 19 21 60 31 14 10 8 18 23 49 21 8 10 7 18 17 62 18 8 12 9 22 19 45 26 11 18 5 29 18 50 22 10 12 8 26 27 75 22 9 14 9 25 23 82 29 15 18 11 23 23 60 15 14 9 8 23 29 59 16 11 11 11 23 21 21 24 14 11 12 24 26 62 17 6 17 8 30 25 54 19 20 8 7 19 25 47 22 9 16 9 24 23 59 31 10 21 12 32 26 37 28 8 24 20 30 20 43 38 11 21 7 29 29 48 26 14 14 8 17 24 79 25 11 7 8 25 23 62 25 16 18 16 26 24 16 29 14 18 10 26 30 38 28 11 13 6 25 22 58 15 11 11 8 23 22 60 18 12 13 9 21 13 67 21 9 13 9 19 24 55 25 7 18 11 35 17 47 23 13 14 12 19 24 59 23 10 12 8 20 21 49 19 9 9 7 21 23 47 18 9 12 8 21 24 57 18 13 8 9 24 24 39 26 16 5 4 23 24 49 18 12 10 8 19 23 26 18 6 11 8 17 26 53 28 14 11 8 24 24 75 17 14 12 6 15 21 65 29 10 12 8 25 23 49 12 4 15 4 27 28 48 25 12 12 7 29 23 45 28 12 16 14 27 22 31 20 14 14 10 18 24 61 17 9 17 9 25 21 49 17 9 13 6 22 23 69 20 10 10 8 26 23 54 31 14 17 11 23 20 80 21 10 12 8 16 23 57 19 9 13 8 27 21 34 23 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Anxiety[t] = + 58.3998859288407 -0.359270126672522Concern[t] + 0.262562939642511Doubts[t] + 0.882346066972115Pexpectations[t] -1.23270117276060Pcriticism[t] + 0.0505647857106037Standards[t] -0.167665890991060Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)58.39988592884079.1855236.357800
Concern-0.3592701266725220.242166-1.48360.1401080.070054
Doubts0.2625629396425110.4446270.59050.5557650.277882
Pexpectations0.8823460669721150.4103042.15050.0331870.016594
Pcriticism-1.232701172760600.512813-2.40380.0174980.008749
Standards0.05056478571060370.3106060.16280.8709090.435454
Organization-0.1676658909910600.317686-0.52780.598470.299235


Multiple Linear Regression - Regression Statistics
Multiple R0.243095200709022
R-squared0.0590952766077596
Adjusted R-squared0.0198909131330829
F-TEST (value)1.50736477703384
F-TEST (DF numerator)6
F-TEST (DF denominator)144
p-value0.17973315446958
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.2487068800742
Sum Squared Residuals25276.0656951542


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16954.333385428144414.6666145718556
25356.6566720791707-3.65667207917067
34346.9857566349114-3.98575663491143
46046.954095094620513.0459049053795
54951.2101152421977-2.21011524219767
66251.454142771498610.5458572285014
74560.1141710608863-15.1141710608863
85050.635821331768-0.63582133176802
97551.525348131562823.4746518684372
108251.548687233656330.4513127663437
116051.06689963701548.93310036298456
125949.32785643500639.67214356499369
132145.2209183985484-24.2209183985484
146256.33124146624575.6687585337543
155452.02395629509071.97604370490928
164753.2394754797964-6.23947547979641
175950.88375470867678.11624529132335
183745.1267338027659-8.12673380276593
194354.1402405953095-11.1402405953095
204852.06159931917-4.06159931916995
217946.02894233478632.971057665214
226247.068853282326614.9311467176734
231651.4968585869687-35.4968585869687
243852.8782765931134-14.8782765931134
255853.21756418896964.78243581103044
266054.34217115727655.65782884272353
276750.531217586008516.4687824139915
285552.49803699767992.50196300232014
294748.0471716399238-1.04717163992383
305950.97915783677828.02084216322176
314950.4545713793986-1.45457137939855
324752.0605126432358-5.06051264323576
335748.50037331828868.49962668171144
343949.879804001012-10.8798040010119
354951.1500456477889-2.15004564778891
362649.8528868325116-23.8528868325116
375349.04997436488283.95002563511721
387556.397608772351618.6023912276484
396548.74102922331416.258970776686
404960.1138867473164-11.1138867473164
414852.1381959248921-4.13819592489212
424546.0273979230087-1.0273979230087
433151.8023825193945-20.8023825193945
446156.30406874782394.69593125217614
454955.9857618591032-6.98576185910325
466950.260333015133118.7396669848669
475450.18823564666983.81176435333024
488051.160107165298728.8398928347013
495753.38997497077223.61002502922785
503449.6931818994059-15.6931818994059
516953.651451208557215.3485487914428
524449.7296990521499-5.72969905214989
537049.722716605900120.2772833940999
545153.029226641001-2.02922664100097
556653.285247005165212.7147529948348
561847.8241912392161-29.8241912392161
577451.844453084494522.1555469155055
585956.774405743582.22559425642002
594853.4865523397392-5.48655233973921
605550.90430674147184.09569325852823
614446.9601349290329-2.96013492903292
625649.18438495764826.81561504235184
636552.454976240983812.5450237590162
647749.987039318012427.0129606819876
654647.1870874119503-1.18708741195033
667051.171110063288418.8288899367116
673956.7761102910232-17.7761102910232
685556.9426904827073-1.94269048270728
694449.8288553505976-5.82885535059765
704553.5899831019140-8.58998310191404
714554.7447079724858-9.74470797248582
724955.6875872054548-6.68758720545485
736550.025062392171514.9749376078284
744547.7042360489941-2.70423604899415
754852.8254350985071-4.82543509850708
764147.8504964310968-6.85049643109675
774051.3124880493052-11.3124880493052
786454.70832520754659.2916747924535
795650.80111477735335.19888522264669
805252.5197347620798-0.519734762079786
814149.5922666441831-8.59226664418313
824255.2642270326336-13.2642270326336
835455.3113774646975-1.31137746469753
844047.8509513548666-7.85095135486657
854051.019345454055-11.0193454540550
865152.3396784185856-1.33967841858559
874857.9266650315225-9.92666503152247
888060.01719558991219.982804410088
893854.8922899979350-16.8922899979350
905754.03195655651532.96804344348475
912846.2956567755890-18.2956567755890
925155.4804675910415-4.48046759104147
934653.9868305790284-7.98683057902839
945855.41812528921652.58187471078350
956752.345650515457914.6543494845421
967250.622793979201321.3772060207987
972650.360933596059-24.360933596059
985455.7898215207578-1.78982152075781
995350.88330697985842.11669302014162
1006448.35885222878215.6411477712180
1014749.3607677858263-2.36076778582625
1024356.7196639723006-13.7196639723006
1036648.870976681494617.1290233185054
1045451.60961875639072.39038124360933
1056259.52598001151742.47401998848256
1065252.3149173409705-0.314917340970525
1076455.0013380106578.99866198934296
1085551.83292682014833.16707317985171
1095752.24121631820364.75878368179641
1107456.1457007398717.8542992601300
1113250.2802577635798-18.2802577635798
1123854.9809277821275-16.9809277821275
1136653.584718862245712.4152811377543
1143752.3629910596434-15.3629910596434
1152650.9245186575052-24.9245186575052
1166453.183042191770410.8169578082296
1172849.5499682906021-21.5499682906021
1186658.0795303671387.92046963286203
1196556.09243742641968.90756257358043
1204849.2899549814081-1.28995498140812
1214456.3944881870575-12.3944881870575
1226454.32065084137999.67934915862008
1233951.1415687140846-12.1415687140846
1245054.4623814138904-4.46238141389043
1256653.497245159097112.5027548409029
1264849.1316650836027-1.13166508360275
1277052.886939359678817.1130606403212
1286656.44649449502749.55350550497262
1296151.04342404821849.95657595178162
1303150.5058076389855-19.5058076389855
1316152.3233382686078.67666173139299
1325446.65213365658237.3478663434177
1333447.3403340549265-13.3403340549265
1346246.685793725455815.3142062745442
1354756.2193487974417-9.21934879744167
1365249.45844586515512.54155413484487
1373756.7643877364826-19.7643877364826
1384648.7562220956256-2.75622209562558
1393849.4904902675992-11.4904902675992
1406353.21756418896969.78243581103044
1413452.35294682904-18.3529468290400
1424648.8915391456998-2.89153914569980
1434047.0697358359429-7.06973583594288
1443047.8509513548666-17.8509513548666
1453549.74089719584-14.74089719584
1465149.28995498140811.71004501859188
1475657.0969395421922-1.09693954219220
1486854.816227980923613.1837720190764
1493952.8344638819052-13.8344638819052
1504451.1500456477889-7.15004564778891
1515852.83446388190525.16553611809477


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.9111465019057940.1777069961884120.0888534980942058
110.837206554694730.3255868906105400.162793445305270
120.7495750719209950.5008498561580110.250424928079005
130.9424446721597390.1151106556805220.0575553278402612
140.9068142218843360.1863715562313270.0931857781156637
150.8622924535952720.2754150928094550.137707546404728
160.8706231751362930.2587536497274140.129376824863707
170.8223655396328490.3552689207343020.177634460367151
180.777679500245340.4446409995093210.222320499754660
190.8216277982132320.3567444035735370.178372201786768
200.8132894377500620.3734211244998760.186710562249938
210.901569707678880.1968605846422410.0984302923211203
220.8988984448004120.2022031103991770.101101555199588
230.975653969920410.04869206015918110.0243460300795905
240.9826110834190820.03477783316183590.0173889165809179
250.9743329780657640.05133404386847270.0256670219342364
260.963835792722790.0723284145544190.0361642072772095
270.9652697795883750.06946044082325010.0347302204116251
280.9515677060935540.0968645878128920.048432293906446
290.9344091380824390.1311817238351230.0655908619175613
300.9145667838237430.1708664323525150.0854332161762574
310.8979977952821290.2040044094357430.102002204717871
320.876682361253010.2466352774939810.123317638746990
330.8497683728217940.3004632543564130.150231627178206
340.8573212715060890.2853574569878220.142678728493911
350.8270573704575430.3458852590849140.172942629542457
360.8906134579198860.2187730841602280.109386542080114
370.8623383126751160.2753233746497680.137661687324884
380.8814932324114850.2370135351770290.118506767588515
390.8863733777608560.2272532444782890.113626622239144
400.8703793678940770.2592412642118470.129620632105923
410.8462136712351320.3075726575297360.153786328764868
420.8158847308931070.3682305382137860.184115269106893
430.858082787060890.283834425878220.14191721293911
440.8291855023638440.3416289952723120.170814497636156
450.8025300961448020.3949398077103950.197469903855198
460.8210802959288960.3578394081422070.178919704071104
470.7857341627888180.4285316744223650.214265837211182
480.891937403254020.216125193491960.10806259674598
490.8669034568365550.2661930863268890.133096543163445
500.870402614018920.2591947719621580.129597385981079
510.8668852538052130.2662294923895740.133114746194787
520.8659151045168750.2681697909662490.134084895483125
530.887844328857940.2243113422841190.112155671142060
540.8646200497492790.2707599005014420.135379950250721
550.8573858491136620.2852283017726750.142614150886338
560.9544590481833430.09108190363331470.0455409518166574
570.9708262679664080.0583474640671830.0291737320335915
580.9621532117196140.07569357656077120.0378467882803856
590.9526859263850160.0946281472299670.0473140736149835
600.9402418520678720.1195162958642550.0597581479321277
610.9358751563762240.1282496872475510.0641248436237756
620.9241971587598040.1516056824803920.0758028412401958
630.9207234800418350.1585530399163310.0792765199581653
640.965090518229450.06981896354110150.0349094817705508
650.9554671357835280.08906572843294380.0445328642164719
660.965755280218610.06848943956278020.0342447197813901
670.9733050772483330.0533898455033340.026694922751667
680.9652522742328080.06949545153438480.0347477257671924
690.958724132631820.08255173473635920.0412758673681796
700.9523172424326030.09536551513479410.0476827575673971
710.9475872085122520.1048255829754960.0524127914877478
720.9380518696952950.1238962606094110.0619481303047053
730.9430320788090060.1139358423819880.0569679211909942
740.9309943968548090.1380112062903830.0690056031451913
750.915575501470130.1688489970597390.0844244985298694
760.9000777421894840.1998445156210320.0999222578105162
770.8951599779999860.2096800440000270.104840022000014
780.8972774578354770.2054450843290450.102722542164523
790.8783842798926820.2432314402146360.121615720107318
800.8525472521565520.2949054956868950.147452747843448
810.833270881586320.333458236827360.16672911841368
820.8312178654167030.3375642691665930.168782134583297
830.7995031181642380.4009937636715230.200496881835762
840.7758496234606140.4483007530787730.224150376539386
850.7640688053424190.4718623893151620.235931194657581
860.7346339403676070.5307321192647850.265366059632393
870.7275822018361360.5448355963277270.272417798163864
880.7582018272395920.4835963455208150.241798172760408
890.7956608870618150.408678225876370.204339112938185
900.7600436683500470.4799126632999050.239956331649953
910.7815914874784680.4368170250430640.218408512521532
920.7487245642312690.5025508715374630.251275435768731
930.7294497668802040.5411004662395930.270550233119796
940.6888748452229710.6222503095540580.311125154777029
950.6849362218715950.630127556256810.315063778128405
960.7509230125418480.4981539749163030.249076987458151
970.8372914883012370.3254170233975270.162708511698763
980.8041245092248160.3917509815503680.195875490775184
990.7665720768721580.4668558462556840.233427923127842
1000.813730692595260.3725386148094790.186269307404739
1010.7794567461241350.4410865077517290.220543253875865
1020.7939419222419180.4121161555161640.206058077758082
1030.8242431113689340.3515137772621310.175756888631066
1040.7942584824654360.4114830350691280.205741517534564
1050.7607009371643530.4785981256712940.239299062835647
1060.7164359533578290.5671280932843430.283564046642171
1070.6852237707758140.6295524584483720.314776229224186
1080.6485752102299060.7028495795401880.351424789770094
1090.6006133823197440.7987732353605120.399386617680256
1100.645895610023560.708208779952880.35410438997644
1110.6803431889032770.6393136221934450.319656811096723
1120.675774521511770.648450956976460.32422547848823
1130.6534527500288580.6930944999422840.346547249971142
1140.6512923988080890.6974152023838230.348707601191912
1150.7922708879177160.4154582241645690.207729112082284
1160.776832501058980.446334997882040.22316749894102
1170.8582757974119420.2834484051761150.141724202588058
1180.82677901240360.3464419751927990.173220987596399
1190.8007239594152970.3985520811694060.199276040584703
1200.7533311304662520.4933377390674960.246668869533748
1210.7309875316876660.5380249366246670.269012468312334
1220.7050033154719480.5899933690561040.294996684528052
1230.7017914082850960.5964171834298080.298208591714904
1240.6402779236213330.7194441527573340.359722076378667
1250.6301498288836180.7397003422327640.369850171116382
1260.5598121578097270.8803756843805450.440187842190273
1270.617657651083440.7646846978331190.382342348916560
1280.589780584564260.8204388308714810.410219415435740
1290.6741694078543430.6516611842913140.325830592145657
1300.7178107141440860.5643785717118280.282189285855914
1310.7279260855367770.5441478289264450.272073914463223
1320.6523560554388030.6952878891223940.347643944561197
1330.7163000880174660.5673998239650680.283699911982534
1340.659359938264910.681280123470180.34064006173509
1350.6058678795867210.7882642408265580.394132120413279
1360.6093794091428750.781241181714250.390620590857125
1370.6208246557688530.7583506884622930.379175344231147
1380.513548807103780.972902385792440.48645119289622
1390.3948021158405470.7896042316810930.605197884159453
1400.3605300275108840.7210600550217680.639469972489116
1410.418486070761540.836972141523080.58151392923846


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0151515151515152OK
10% type I error level170.128787878787879NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/10vwud1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/10vwud1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/1h5em1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/1h5em1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/2h5em1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/2h5em1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/3h5em1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/3h5em1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/49wvp1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/49wvp1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/59wvp1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/59wvp1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/69wvp1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/69wvp1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/725ua1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/725ua1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/8vwud1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/8vwud1292690628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/9vwud1292690628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292690562uoj6xh2j6jpxtrn/9vwud1292690628.ps (open in new window)


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