Home » date » 2010 » Dec » 04 »

p_Stress_MR2v2

*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, 04 Dec 2010 14:03:11 +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/04/t1291471320iyqt3g67iw1h1yv.htm/, Retrieved Sat, 04 Dec 2010 15:02:00 +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/04/t1291471320iyqt3g67iw1h1yv.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 «
23 10 53 7 6 7 15 11 12 2 4 2 2 3,4 21 6 86 4 6 5 15 8 11 4 3 1 2 4 21 13 66 6 5 7 14 12 14 7 5 4 3,666666667 3,2 21 12 67 5 4 3 10 10 12 3 3 1 2,333333333 3,2 24 8 76 4 4 7 10 7 21 7 6 5 4 2,6 22 6 78 3 6 7 12 6 12 2 5 1 2,666666667 3,2 21 10 53 5 7 7 18 8 22 7 6 1 2,333333333 3,8 22 10 80 6 5 1 12 16 11 2 6 1 3,666666667 3,6 21 9 74 5 4 4 14 8 10 1 5 1 2,666666667 3,6 20 9 76 6 6 5 18 16 13 2 5 1 3 4 22 7 79 7 1 6 9 7 10 6 3 2 3 3,4 21 5 54 6 4 4 11 11 8 1 5 1 2 2,6 21 14 67 7 6 7 11 16 15 1 7 3 3 4,4 23 6 87 6 6 6 17 16 10 1 5 1 1,666666667 4 22 10 58 4 5 2 8 12 14 2 5 1 3 3,8 23 10 75 6 3 2 16 13 14 2 3 1 1,333333333 3,6 22 7 88 4 7 6 21 19 11 2 5 1 3 3,8 24 10 64 5 2 7 24 7 10 1 6 1 2 3,6 23 8 57 3 5 5 21 8 13 7 5 2 2,666666667 3,8 21 6 66 3 5 2 14 12 7 1 2 4 4 3,6 23 10 54 4 3 7 7 13 12 2 5 1 2,333333333 4 23 12 56 5 5 4 18 11 14 4 4 2 2,666666667 2,8 21 7 86 3 5 5 18 8 11 2 6 1 1 5 20 15 80 7 6 5 13 16 9 1 3 2 3 4,4 32 8 76 7 4 5 11 15 11 1 5 3 2,333333333 3,2 22 10 69 4 4 3 13 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PStress[t] = + 8.27819374754516 -0.0998455093402849AGE[t] -0.0296434868412883BelInSprt[t] + 0.18758282353857KunnenRekRel[t] -0.147444084185755ExtraCurAct[t] -0.0155460018121020VerandVorigJr[t] -0.049878292885695VerwOuders[t] + 0.0277617502408969KenStudenten[t] + 0.40099080714446Depressie[t] -0.195498581354292Slaapgebrek[t] + 0.22382136308123Toekomstzorgen[t] + 0.0934682172168758Rookgedrag[t] -0.131850122994891MateAlcCon[t] + 0.236074957597958MateGEzGevarEten[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.278193747545162.5988163.18540.0018160.000908
AGE-0.09984550934028490.071276-1.40080.1636820.081841
BelInSprt-0.02964348684128830.018261-1.62340.1069740.053487
KunnenRekRel0.187582823538570.112261.6710.097170.048585
ExtraCurAct-0.1474440841857550.133048-1.10820.2698530.134926
VerandVorigJr-0.01554600181210200.102639-0.15150.8798490.439925
VerwOuders-0.0498782928856950.05016-0.99440.321910.160955
KenStudenten0.02776175024089690.0504720.550.5832480.291624
Depressie0.400990807144460.0652146.148800
Slaapgebrek-0.1954985813542920.097284-2.00960.046580.02329
Toekomstzorgen0.223821363081230.1189471.88170.062150.031075
Rookgedrag0.09346821721687580.1868320.50030.6177370.308868
MateAlcCon-0.1318501229948910.251493-0.52430.6009980.300499
MateGEzGevarEten0.2360749575979580.3389430.69650.4873770.243688


Multiple Linear Regression - Regression Statistics
Multiple R0.628342873454682
R-squared0.394814766621287
Adjusted R-squared0.333350641356261
F-TEST (value)6.42349931637188
F-TEST (DF numerator)13
F-TEST (DF denominator)128
p-value2.96510604957945e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.94846738382742
Sum Squared Residuals485.955218667425


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.3295093560924-0.329509356092414
267.96839101570389-1.96839101570389
31310.14961765808742.85038234191258
4129.713774607598962.28622539240104
5812.3252593338968-4.3252593338968
668.94400060000302-2.94400060000302
71013.2107401298339-3.21074012983387
8109.751210110384550.248789889615448
999.32282574240838-0.322825742408377
10910.3210675439694-1.32106754396936
1178.65996596086844-1.65996596086844
1259.38604194230615-4.38604194230615
131412.72014162559351.27985837440649
1468.89811127563807-2.89811127563807
151011.2153874744951-1.21538747449513
161010.6352843988103-0.635284398810316
1778.31195271637543-1.31195271637543
18109.353151011759530.646848988240468
1988.91043435879894-0.910434358798939
2067.4096708874879-1.40967088748789
211010.8620475742288-0.862047574228807
221210.09129985443741.90870014556261
2379.20900373023911-2.20900373023911
24158.97125871144136.0287412885587
2589.40627224121629-1.40627224121629
261010.2402977039064-0.240297703906412
271310.35722043488162.64277956511844
2888.56121615871997-0.56121615871997
291111.3994650494006-0.399465049400585
3079.60994731360776-2.60994731360776
3198.487541236025440.512458763974561
32109.482251659603130.517748340396871
3388.23901338905743-0.239013389057431
341513.21588490214131.78411509785868
35910.3341923065893-1.33419230658930
3678.04282624466055-1.04282624466055
37119.692210597600051.30778940239995
3897.936292771065041.06370722893496
3989.65070677964992-1.65070677964992
4087.742671962201760.257328037798243
41128.606697533096233.39330246690377
42139.744864732273483.25513526772653
4399.30831986535724-0.308319865357237
44119.368598534397051.63140146560295
4588.69165359250469-0.691653592504686
461010.9096033768969-0.909603376896922
471312.72030001779920.279699982200848
481210.89774550236251.1022544976375
491210.10353960487651.89646039512346
5098.90557018966440.0944298103356004
51810.0563203608934-2.05632036089338
5298.550159742273560.449840257726438
53128.466337626294413.53366237370559
541211.44170670439510.558293295604887
551614.33908902149921.66091097850075
56118.740417270389352.25958272961065
57139.65481140654613.34518859345391
581010.7282845843357-0.728284584335746
59910.9177623409140-1.91776234091404
601410.17985236014973.82014763985035
611311.79403722935931.20596277064073
621210.24827181336611.75172818663389
63910.9401867149500-1.94018671494997
64910.4289121158514-1.42891211585138
651011.1293997846369-1.12939978463687
66810.3355384310652-2.33553843106519
67910.3539654331024-1.35396543310244
6899.1596020957055-0.159602095705508
69118.602683104414342.39731689558566
7079.1983165082478-2.1983165082478
711111.4247175610532-0.424717561053238
7299.4664149141439-0.466414914143892
73118.839056634474422.16094336552558
7499.1680379298611-0.168037929861102
75810.1334861404498-2.13348614044980
7698.100370007513950.899629992486047
7789.53261001659409-1.53261001659409
7899.46000198095027-0.460001980950268
79109.797870290467690.202129709532314
80910.0102282385258-1.01022823852581
811713.88184979566813.11815020433193
8279.60246315239215-2.60246315239215
831111.1791700963881-0.179170096388071
84910.0473574021618-1.04735740216184
85109.920435969971060.0795640300289396
86118.424673102185652.57532689781435
8788.49119790548052-0.491197905480517
881212.0506247904276-0.0506247904276325
891010.0625426656147-0.0625426656147502
9079.04301720231648-2.04301720231648
9198.674920758837950.325079241162049
9278.25373171181212-1.25373171181212
931210.48837434402611.51162565597386
9489.18993403148611-1.18993403148611
951310.33831273279782.66168726720224
96911.1635887738345-2.16358877383446
971512.77902299040092.22097700959914
9889.10329991550478-1.10329991550478
991411.93424525259592.06575474740409
1001413.76748919014140.232510809858569
101910.3858399157176-1.38583991571757
1021311.44272286732201.55727713267797
103119.290960715260471.70903928473953
1041011.7568778947816-1.75687789478165
10569.91527672190481-3.91527672190481
10688.35810579320368-0.358105793203678
1071011.4763057351964-1.47630573519640
108108.057151449780851.94284855021915
109109.314006331573940.685993668426065
1101212.1091247890297-0.109124789029656
111109.4721978143220.527802185677994
11299.19204743917179-0.192047439171790
11397.420830997370231.57916900262977
114119.225570623506721.77442937649328
11578.17452156666495-1.17452156666495
11678.92838174917736-1.92838174917736
11757.84981479877876-2.84981479877876
11898.98474784985870.0152521501412979
1191111.7714294450356-0.771429445035647
1201512.04445466509332.95554533490672
12197.904912457585541.09508754241446
12299.4405031891988-0.440503189198792
12389.21943442324335-1.21943442324335
1241315.4242750118656-2.42427501186561
1251010.3885123000406-0.388512300040590
1261311.34306882028361.65693117971635
12797.866148026997641.13385197300236
128119.37776754196871.62223245803131
129810.3226206044035-2.32262060440353
130109.252394549618050.747605450381946
13198.74359781609120.256402183908801
13288.61205217478287-0.612052174782866
13387.905857772968540.0941422270314624
1341310.6468963344732.35310366552699
1351110.94583678841600.0541632115840376
13689.40627224121629-1.40627224121629
137129.83542129796582.16457870203421
1381511.67111371921063.32888628078939
1391111.1791700963881-0.179170096388071
1401010.5120409386982-0.512040938698177
14157.84981479877876-2.84981479877876
142117.062168466573923.93783153342608


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.9338340524218350.1323318951563290.0661659475781645
180.9205177532778350.158964493444330.079482246722165
190.8922833953499440.2154332093001110.107716604650056
200.9636474454116440.07270510917671240.0363525545883562
210.9374599656844020.1250800686311970.0625400343155983
220.9489228168425760.1021543663148470.0510771831574237
230.9296873374342210.1406253251315570.0703126625657785
240.9842398265118080.03152034697638380.0157601734881919
250.9748904387137720.05021912257245510.0251095612862276
260.962381979884820.07523604023035850.0376180201151792
270.9822936116830970.03541277663380540.0177063883169027
280.9817539108252990.03649217834940220.0182460891747011
290.9725158325631250.05496833487375010.0274841674368751
300.9751225637356080.04975487252878430.0248774362643922
310.9759526160397360.04809476792052810.0240473839602641
320.9646392545845740.07072149083085230.0353607454154261
330.9490575874568190.1018848250863630.0509424125431813
340.9687994323070.06240113538600160.0312005676930008
350.9596308229254780.0807383541490450.0403691770745225
360.948563545207130.1028729095857390.0514364547928693
370.9405816967710450.1188366064579100.0594183032289549
380.9223230580227390.1553538839545220.0776769419772612
390.9088833652866810.1822332694266370.0911166347133187
400.8836458353456030.2327083293087940.116354164654397
410.9381834373606450.1236331252787110.0618165626393554
420.9561895710849930.08762085783001390.0438104289150069
430.9423351933326110.1153296133347770.0576648066673887
440.9329175875503180.1341648248993650.0670824124496825
450.9142081135578840.1715837728842320.0857918864421161
460.8964673184563590.2070653630872820.103532681543641
470.8753786219469920.2492427561060160.124621378053008
480.8509332903221790.2981334193556420.149066709677821
490.8505778052803510.2988443894392980.149422194719649
500.8156809251580680.3686381496838630.184319074841932
510.807115112672640.3857697746547190.192884887327359
520.7713374053629380.4573251892741240.228662594637062
530.8497638079351240.3004723841297530.150236192064876
540.8189299367305820.3621401265388360.181070063269418
550.8216892729021290.3566214541957430.178310727097871
560.8702139155808080.2595721688383830.129786084419192
570.9054701233867720.1890597532264550.0945298766132277
580.8824074989658580.2351850020682840.117592501034142
590.8744270735765780.2511458528468440.125572926423422
600.9427494708940810.1145010582118370.0572505291059186
610.9319871301071080.1360257397857840.0680128698928922
620.9301990873864830.1396018252270340.0698009126135168
630.9383097510050650.1233804979898710.0616902489949353
640.9311942306662930.1376115386674140.0688057693337072
650.9326970011093480.1346059977813050.0673029988906523
660.9344093374059830.1311813251880330.0655906625940166
670.9274491400768730.1451017198462550.0725508599231275
680.9097996801412450.1804006397175100.0902003198587548
690.9211875765445230.1576248469109540.0788124234554771
700.9326847590578390.1346304818843220.067315240942161
710.9151971612299750.1696056775400510.0848028387700255
720.8949247761496720.2101504477006570.105075223850328
730.9088038393611630.1823923212776730.0911961606388365
740.8853041605596050.2293916788807910.114695839440395
750.8843066048251590.2313867903496830.115693395174841
760.8684688770052390.2630622459895230.131531122994761
770.8586368187851140.2827263624297720.141363181214886
780.8399005803652140.3201988392695720.160099419634786
790.8057063685417870.3885872629164260.194293631458213
800.7770378245795050.445924350840990.222962175420495
810.8297554162676130.3404891674647740.170244583732387
820.8472348905874560.3055302188250880.152765109412544
830.817452592646060.3650948147078820.182547407353941
840.8019856422852040.3960287154295910.198014357714796
850.7631743206847580.4736513586304840.236825679315242
860.858603440725970.2827931185480590.141396559274030
870.8280451556480310.3439096887039380.171954844351969
880.7905127562471760.4189744875056490.209487243752824
890.747919464493410.504161071013180.25208053550659
900.7600908218026530.4798183563946940.239909178197347
910.717359772286910.5652804554261790.282640227713090
920.6977808058620180.6044383882759640.302219194137982
930.6899579792800610.6200840414398780.310042020719939
940.6564758314661340.6870483370677330.343524168533866
950.6958374100750050.608325179849990.304162589924995
960.6796767782837780.6406464434324430.320323221716222
970.666298365742070.6674032685158610.333701634257931
980.6244101949669750.751179610066050.375589805033025
990.6074130334103970.7851739331792060.392586966589603
1000.611006980673640.777986038652720.38899301932636
1010.6319643182912540.7360713634174910.368035681708746
1020.6995592625185440.6008814749629110.300440737481456
1030.6722352160195860.6555295679608280.327764783980414
1040.6621369892888820.6757260214222360.337863010711118
1050.7938085716987750.412382856602450.206191428301225
1060.7988230416356010.4023539167287970.201176958364399
1070.8052979077793920.3894041844412150.194702092220608
1080.7771787533324520.4456424933350960.222821246667548
1090.7290906435818250.541818712836350.270909356418175
1100.6874677386032570.6250645227934860.312532261396743
1110.6547769377262870.6904461245474270.345223062273714
1120.581516796085080.8369664078298390.418483203914920
1130.5327843919136620.9344312161726770.467215608086338
1140.4886670528332570.9773341056665150.511332947166743
1150.4124755353572170.8249510707144340.587524464642783
1160.3425395358819260.6850790717638520.657460464118074
1170.3685518435894640.7371036871789270.631448156410536
1180.2862162164360220.5724324328720450.713783783563978
1190.2169088290476110.4338176580952210.78309117095239
1200.1918756900321940.3837513800643880.808124309967806
1210.1313372776327450.2626745552654900.868662722367255
1220.08372630288930590.1674526057786120.916273697110694
1230.06089246093424490.1217849218684900.939107539065755
1240.1271491814472960.2542983628945920.872850818552704
1250.1962914796060360.3925829592120720.803708520393964


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level50.0458715596330275OK
10% type I error level130.119266055045872NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/10vgfv1291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/10vgfv1291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/1ox011291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/1ox011291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/2h7h51291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/2h7h51291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/3h7h51291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/3h7h51291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/4h7h51291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/4h7h51291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/5syyp1291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/5syyp1291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/6syyp1291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/6syyp1291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/727ys1291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/727ys1291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/8vgfv1291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/8vgfv1291471379.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/9vgfv1291471379.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291471320iyqt3g67iw1h1yv/9vgfv1291471379.ps (open in new window)


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