Home » date » 2010 » Nov » 24 »

Workshop 7 mini-tutorial Concern over mistakes - interactions gender

*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, 24 Nov 2010 15:35:46 +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/24/t1290612879fgdmbsnwt3q54ys.htm/, Retrieved Wed, 24 Nov 2010 16:34:51 +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/24/t1290612879fgdmbsnwt3q54ys.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 0 11 0 12 0 24 0 26 0 25 11 0 7 0 8 0 25 0 23 0 17 6 0 17 0 8 0 30 0 25 0 18 12 12 10 10 8 8 19 19 23 23 18 8 8 12 12 9 9 22 22 19 19 16 10 10 12 12 7 7 22 22 29 29 20 10 10 11 11 4 4 25 25 25 25 16 11 11 11 11 11 11 23 23 21 21 18 16 16 12 12 7 7 17 17 22 22 17 11 11 13 13 7 7 21 21 25 25 23 13 0 14 0 12 0 19 0 24 0 30 12 0 16 0 10 0 19 0 18 0 23 8 8 11 11 10 10 15 15 22 22 18 12 12 10 10 8 8 16 16 15 15 15 11 11 11 11 8 8 23 23 22 22 12 4 4 15 15 4 4 27 27 28 28 21 9 0 9 0 9 0 22 0 20 0 15 8 8 11 11 8 8 14 14 12 12 20 8 8 17 17 7 7 22 22 24 24 31 14 0 17 0 11 0 23 0 20 0 27 15 0 11 0 9 0 23 0 21 0 34 16 16 18 18 11 11 21 21 20 20 21 9 9 14 14 13 13 19 19 21 21 31 14 14 10 10 8 8 18 18 23 23 19 11 11 11 11 8 8 20 20 28 28 16 8 0 15 0 9 0 23 0 24 0 20 9 9 15 15 6 6 25 25 24 24 21 9 9 13 13 9 9 19 19 24 24 22 9 9 16 16 9 9 24 24 23 23 17 9 9 13 13 6 6 22 22 23 23 24 10 10 9 9 6 6 25 25 29 29 25 16 0 18 0 16 0 26 0 24 0 26 11 0 18 0 5 0 29 0 18 0 25 8 8 12 12 7 7 32 32 25 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Concernovermistakes[t] = -1.39516119998399 + 1.06623615242496DoubtsaboutactionsFemale[t] -0.390338094465476DoubtsaboutactionsMale[t] + 0.444393868835153ParentalexpectationsFemale[t] -0.326763214979501ParentalexpectationsMale[t] + 0.0512374544788622ParentalcritismFemale[t] + 0.189757003967310ParentalcritismMale[t] + 0.435719552669018PersonalstandardsFemale[t] + 0.208567624539643PersonalstandarsMale[t] -0.174498633537879OrganizationFemale[t] + 0.0726673983649172OrganizationMale[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.395161199983993.096072-0.45060.6529210.32646
DoubtsaboutactionsFemale1.066236152424960.2410714.42291.9e-059e-06
DoubtsaboutactionsMale-0.3903380944654760.281008-1.38910.16690.08345
ParentalexpectationsFemale0.4443938688351530.21822.03660.043470.021735
ParentalexpectationsMale-0.3267632149795010.268122-1.21870.2248930.112446
ParentalcritismFemale0.05123745447886220.3070680.16690.8677080.433854
ParentalcritismMale0.1897570039673100.3679590.51570.6068320.303416
PersonalstandardsFemale0.4357195526690180.1849972.35530.0198210.00991
PersonalstandarsMale0.2085676245396430.2142220.97360.3318420.165921
OrganizationFemale-0.1744986335378790.205662-0.84850.3975460.198773
OrganizationMale0.07266739836491720.2150990.33780.7359680.367984


Multiple Linear Regression - Regression Statistics
Multiple R0.6540902092735
R-squared0.427834001867451
Adjusted R-squared0.389174137128765
F-TEST (value)11.0666192124395
F-TEST (DF numerator)10
F-TEST (DF denominator)148
p-value5.86197757002083e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.47268914595107
Sum Squared Residuals2960.73233305366


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.9556317369705-0.955631736970475
22520.73361343972194.26638656027814
31721.6759718622179-4.67597186221789
41819.7192156596422-1.71921565964220
51819.8320656662796-1.83206566627956
61619.6835605135766-3.68356051357659
72021.1831329567002-1.18313295670024
81622.6647428100575-6.66474281005745
91821.2303316215009-3.23033162150092
101720.2401269888749-3.2401269888749
112323.3929766947813-0.39297669478128
123024.16004517229625.83995482770383
132315.13992552489067.86007447510942
141818.6010040093999-0.601004009399916
151521.8399281995460-6.83992819954597
161218.5813478732644-6.58134787326438
172118.75750356962762.24249643037235
181515.0319617825192-0.0319617825191914
192019.42907384280070.570926157199318
203128.18202974406042.81797025593958
212726.30492914097890.695070859021141
223425.68090455760018.31909544239991
232119.57067886376311.42932113623686
243120.426724598352510.5732754016475
251919.2960792568822-0.296079256882225
261620.0953556487311-4.09535564873111
272021.5615776662287-1.56157766622867
282118.18357667060392.81642332939608
292221.85973575338710.140264246612860
301719.4952860620643-2.49528606206434
312421.02253562518942.97746437481057
322531.6242473139953-6.62424731399534
332628.0836050118374-2.08360501183738
342525.1819611104361-0.181961110436063
351722.8253160547974-5.82531605479738
363227.96056638729994.03943361270013
373324.34411386098568.65588613901437
381320.7483427046086-7.74834270460857
393227.5246545543234.47534544567698
402526.1563542809939-1.15635428099394
412926.29123751754862.70876248245137
422222.2687616228845-0.268761622884495
431816.34512433799601.65487566200404
441721.5400450968111-4.54004509681111
452021.4362784464713-1.43627844647134
461520.2774710203606-5.27747102036060
472021.2774048954945-1.27740489549451
483328.74529427335284.2547057266472
492921.88934663147267.11065336852737
502325.7228174277025-2.72281742770246
512623.92511890738502.07488109261505
521819.1135259127194-1.11352591271941
532018.83825570043811.16174429956186
541111.6173838989214-0.617383898921388
552828.9470387379516-0.947038737951617
562623.24082350031852.75917649968147
572221.62707164999010.372928350009873
581720.3274242475508-3.32742424755080
591214.0840671864101-2.08406718641008
601419.5911845552550-5.59118455525504
611721.1855506676186-4.18555066761861
622121.3579272392682-0.35792723926819
631922.6610235267971-3.66102352679714
641823.5204515192069-5.5204515192069
651018.6769230831868-8.67692308318678
662922.86151569520456.1384843047955
673118.964284378112912.0357156218871
681922.4879407202966-3.48794072029661
69919.7094623303634-10.7094623303634
702022.8230088484444-2.82300884844441
712817.756008689451010.2439913105490
721917.69581320738731.30418679261273
733022.55547274475647.44452725524362
742929.1691638647069-0.169163864706898
752621.70481990951964.29518009048036
762320.05974613520332.94025386479671
771322.0268267043072-9.02682670430719
782122.261763029964-1.26176302996401
791921.6853769574391-2.68537695743908
802822.88177494478235.11822505521774
812325.3642907765806-2.36429077658059
821814.18738990580473.81261009419526
832122.0263941226815-1.02639412268147
842021.9672880959095-1.96728809590953
852319.70544215181953.29455784818049
862120.05056300840620.949436991593838
872122.1702458275280-1.17024582752803
881522.9195424195024-7.9195424195024
892827.12709498629540.872905013704601
901917.27677450891701.72322549108303
912620.15112880139355.8488711986065
921014.1688477941492-4.1688477941492
931617.9829323926034-1.9829323926034
942220.71193913325401.28806086674598
951919.1723904702372-0.172390470237221
963128.69557416811382.30442583188620
973127.13491326041973.86508673958027
982923.79237360699485.20762639300516
991918.07083342296140.929166577038564
1002218.48334926877343.51665073122662
1012322.21837290907440.781627090925593
1021516.3228432163017-1.32284321630167
1032023.0792351412715-3.07923514127152
1041819.4761712035652-1.47617120356515
1052321.70393111248011.29606888751994
1062519.99173458104475.00826541895532
1072116.74132920318724.2586707968128
1082419.34105224560674.65894775439326
1092524.51867242214990.481327577850142
1101718.4507979278914-1.45079792789142
1111314.1957793317179-1.19577933171794
1122817.939266772341210.0607332276588
1132118.66518143149842.33481856850155
1142528.9233362224049-3.92333622240485
115917.7434171205448-8.74341712054482
1161617.8322751332771-1.83227513327707
1171921.2694460686835-2.26944606868348
1181719.4953101488352-2.49531014883523
1192523.73118979973861.26881020026137
1202014.99666774866445.00333225133562
1212922.33828928196476.66171071803534
1221418.4618287427413-4.46182874274126
1232226.5375657702661-4.53756577026611
1241516.5037366023520-1.50373660235205
1251927.7595806428129-8.7595806428129
1262021.1553065330896-1.15530653308961
1271517.181479479492-2.18147947949202
1282022.0768904360628-2.07689043606279
1291820.0620172664905-2.06201726649045
1303325.49499019953157.50500980046847
1312223.8497850004963-1.84978500049630
1321616.197583732195-0.197583732194997
1331719.3578237675966-2.35782376759664
1341615.28972776295530.710272237044736
1352117.96787065745153.03212934254853
1362629.3558991345934-3.35589913459335
1371820.4538798139395-2.45387981393953
1381822.6199887858023-4.61998878580227
1391718.6786223132061-1.67862231320610
1402224.5828587305535-2.58285873055353
1413024.6880054055435.31199459445701
1423027.37485229599972.62514770400032
1432428.2221548425602-4.2221548425602
1442121.8577776158595-0.857777615859544
1452124.6204916139374-3.62049161393738
1462927.11091581093981.88908418906023
1473123.02897852514337.9710214748567
1482019.16222574110940.837774258890564
1491616.0835409788700-0.083540978870048
1502219.09303511051932.90696488948072
1512021.3101919577802-1.31019195778019
1522826.24819646548441.7518035345156
1533825.928144696697612.0718553033024
1542220.91459096066281.08540903933719
1552024.9515260240323-4.95152602403229
1561718.8997093899867-1.89970938998675
1572824.30824708028723.69175291971283
1582223.4999486705712-1.49994867057124
1593128.84515974296092.15484025703915


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
140.1361889103645650.2723778207291310.863811089635435
150.0725353777968890.1450707555937780.927464622203111
160.09419797919756170.1883959583951230.905802020802438
170.06407793086112520.1281558617222500.935922069138875
180.05510652478079020.1102130495615800.94489347521921
190.09179379293951260.1835875858790250.908206207060487
200.05835799821312670.1167159964262530.941642001786873
210.0662362286067970.1324724572135940.933763771393203
220.2934184858870960.5868369717741920.706581514112904
230.2262553504652300.4525107009304590.77374464953477
240.6291316794128370.7417366411743270.370868320587164
250.5515627253684690.8968745492630630.448437274631531
260.4817799748266310.9635599496532630.518220025173369
270.4205011549950570.8410023099901140.579498845004943
280.3546043767472890.7092087534945790.645395623252711
290.2933895550101020.5867791100202040.706610444989898
300.2375228032641760.4750456065283510.762477196735824
310.3639989088880210.7279978177760430.636001091111979
320.4423706198661430.8847412397322860.557629380133857
330.4243793188962760.8487586377925520.575620681103724
340.5117735943771290.9764528112457420.488226405622871
350.510218824556590.979562350886820.48978117544341
360.5397346830910270.9205306338179470.460265316908973
370.706070406493550.5878591870129010.293929593506450
380.8084586516962050.3830826966075890.191541348303795
390.8018237257070520.3963525485858970.198176274292949
400.7628206983514230.4743586032971550.237179301648577
410.7342002561283160.5315994877433690.265799743871684
420.6851512701845390.6296974596309220.314848729815461
430.645545154777030.7089096904459390.354454845222969
440.6213380095394170.7573239809211650.378661990460583
450.5713277608663530.8573444782672950.428672239133647
460.6031992640783460.7936014718433070.396800735921654
470.5592777925357840.8814444149284320.440722207464216
480.5351316623073780.9297366753852450.464868337692622
490.604717603665370.7905647926692590.395282396334629
500.5674568774440680.8650862451118650.432543122555932
510.5756519377608530.8486961244782930.424348062239147
520.5256162732268350.948767453546330.474383726773165
530.4732814074735050.946562814947010.526718592526495
540.4223061541525610.8446123083051230.577693845847439
550.3889552402241470.7779104804482930.611044759775853
560.355355809939210.710711619878420.64464419006079
570.3082941905998760.6165883811997520.691705809400124
580.2826891664103760.5653783328207510.717310833589625
590.2541943446819650.508388689363930.745805655318035
600.2778638088935850.555727617787170.722136191106415
610.2783760702810720.5567521405621440.721623929718928
620.2407385939152820.4814771878305640.759261406084718
630.2261168627975590.4522337255951170.773883137202442
640.2764186191311570.5528372382623130.723581380868843
650.3951308546159230.7902617092318450.604869145384077
660.4322634373670720.8645268747341450.567736562632928
670.7295782710291460.5408434579417080.270421728970854
680.7072526359572420.5854947280855150.292747364042758
690.8664779970601440.2670440058797130.133522002939856
700.8509300563630870.2981398872738270.149069943636913
710.942558889510240.1148822209795200.0574411104897602
720.9294146955667430.1411706088665150.0705853044332574
730.9549999910166520.0900000179666970.0450000089833485
740.9424207667908740.1151584664182520.0575792332091261
750.9435520511770670.1128958976458660.0564479488229332
760.9376236274345970.1247527451308060.062376372565403
770.9760484484571550.04790310308569040.0239515515428452
780.9694313817106560.06113723657868860.0305686182893443
790.9641361134285010.07172777314299750.0358638865714987
800.9663051126807760.06738977463844840.0336948873192242
810.9598688508019870.0802622983960260.040131149198013
820.9581144242486140.08377115150277150.0418855757513858
830.9462977005969890.1074045988060230.0537022994030114
840.9349905501657950.130018899668410.065009449834205
850.9268059628976580.1463880742046830.0731940371023417
860.9129967103361820.1740065793276350.0870032896638177
870.8966183705380670.2067632589238660.103381629461933
880.9446172571725840.1107654856548310.0553827428274157
890.9311937359979720.1376125280040560.0688062640020281
900.9156508220259230.1686983559481530.0843491779740767
910.9238587382353360.1522825235293280.076141261764664
920.9220692198010660.1558615603978680.0779307801989338
930.9040552837378180.1918894325243650.0959447162621824
940.8834396076246370.2331207847507260.116560392375363
950.8569067832286610.2861864335426770.143093216771339
960.8308198534479070.3383602931041860.169180146552093
970.8407741670488420.3184516659023150.159225832951158
980.8509678262332960.2980643475334090.149032173766704
990.8234531891215040.3530936217569930.176546810878496
1000.8086451694256260.3827096611487470.191354830574374
1010.7725399164408820.4549201671182370.227460083559118
1020.7328767207033470.5342465585933060.267123279296653
1030.73895911792190.5220817641562010.261040882078100
1040.6995721214819930.6008557570360140.300427878518007
1050.6555201492212310.6889597015575380.344479850778769
1060.6551672807187190.6896654385625620.344832719281281
1070.6541411913723050.6917176172553910.345858808627696
1080.6853887609520750.6292224780958510.314611239047925
1090.6376401224381820.7247197551236360.362359877561818
1100.5981516570726040.8036966858547930.401848342927396
1110.5469975799502510.9060048400994990.453002420049749
1120.8608272255432690.2783455489134630.139172774456732
1130.8791635512632940.2416728974734110.120836448736705
1140.90252846630660.1949430673867980.0974715336933991
1150.9475691370151130.1048617259697740.0524308629848868
1160.9406731791256730.1186536417486540.0593268208743271
1170.9601951984088140.0796096031823720.039804801591186
1180.956089014722850.0878219705542980.043910985277149
1190.9447204758510030.1105590482979940.0552795241489971
1200.9568360104601450.08632797907971010.0431639895398551
1210.9503846703495060.0992306593009880.049615329650494
1220.9493445471641770.1013109056716470.0506554528358233
1230.9565124610572470.0869750778855060.043487538942753
1240.9392528220096710.1214943559806580.0607471779903289
1250.9386533586369660.1226932827260680.061346641363034
1260.9202814814283650.1594370371432700.0797185185716349
1270.8981508506014710.2036982987970580.101849149398529
1280.8699617743232460.2600764513535080.130038225676754
1290.8279571243276610.3440857513446780.172042875672339
1300.8998909224768680.2002181550462640.100109077523132
1310.8661992612496230.2676014775007530.133800738750377
1320.8561232302082680.2877535395834640.143876769791732
1330.867530046724450.2649399065511020.132469953275551
1340.8169359639521320.3661280720957350.183064036047868
1350.7919238189102930.4161523621794130.208076181089707
1360.811120375934080.3777592481318410.188879624065920
1370.7589859427631620.4820281144736760.241014057236838
1380.8998103448264340.2003793103471310.100189655173566
1390.8853313043617850.2293373912764300.114668695638215
1400.8345153929096070.3309692141807850.165484607090393
1410.8031300117674310.3937399764651380.196869988232569
1420.7147790522616610.5704418954766770.285220947738338
1430.7730872127340410.4538255745319180.226912787265959
1440.661895486399240.676209027201520.33810451360076
1450.5059730444598400.9880539110803190.494026955540160


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/18mbm1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/18mbm1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/28mbm1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/28mbm1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/31dtp1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/31dtp1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/41dtp1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/41dtp1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/51dtp1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/51dtp1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/6b4aa1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/6b4aa1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/7mw9d1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/7mw9d1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/8mw9d1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/8mw9d1290612933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/9xn8g1290612933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290612879fgdmbsnwt3q54ys/9xn8g1290612933.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