Home » date » 2010 » Dec » 04 »

p_Stress_MR1v2

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


Multiple Linear Regression - Estimated Regression Equation
PStress[t] = + 9.03106352044203 -0.102588137617922AGE[t] -0.0294508517465285BelInSprt[t] + 0.191265388962981KunnenRekRel[t] -0.129384440040129ExtraCurAct[t] -0.0135175731533391VerandVorigJr[t] -0.0454055853017774VerwOuders[t] + 0.0273918110157730KenStudenten[t] + 0.403815279363892Depressie[t] -0.205750464844944Slaapgebrek[t] + 0.220708269386516Toekomstzorgen[t] + 0.0795949547996137Rookgedrag[t] -0.0417224932886921MateAlcCon[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.031063520442032.3586323.82892e-041e-04
AGE-0.1025881376179220.071025-1.44440.151050.075525
BelInSprt-0.02945085174652850.018222-1.61620.108490.054245
KunnenRekRel0.1912653889629810.1119111.70910.089840.04492
ExtraCurAct-0.1293844400401290.130236-0.99350.3223460.161173
VerandVorigJr-0.01351757315333910.102393-0.1320.8951770.447588
VerwOuders-0.04540558530177740.049648-0.91460.3621310.181066
KenStudenten0.02739181101577300.0503680.54380.5874970.293748
Depressie0.4038152793638920.0649586.216500
Slaapgebrek-0.2057504648449440.095972-2.14390.033920.01696
Toekomstzorgen0.2207082693865160.1186261.86050.0650860.032543
Rookgedrag0.07959495479961370.1853960.42930.6684030.334202
MateAlcCon-0.04172249328869210.083603-0.49910.6185890.309295


Multiple Linear Regression - Regression Statistics
Multiple R0.626515070345575
R-squared0.392521133370121
Adjusted R-squared0.336011471358040
F-TEST (value)6.94608885266736
F-TEST (DF numerator)12
F-TEST (DF denominator)129
p-value1.33963962145600e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.94457498966075
Sum Squared Residuals487.796973863418


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.4247658748273-0.424765874827350
267.91350815555825-1.91350815555825
31310.20816147179842.79183852820164
4129.799798553552792.20020144644721
5812.4826931761664-4.4826931761664
669.08294719176611-3.08294719176611
71013.2291343032434-3.22913430324337
8109.773975154436440.226024845563561
999.34728347138154-0.347283471381539
10910.3114338681129-1.31143386811290
1178.60842974077693-1.60842974077693
1259.62177251207734-4.62177251207734
131412.56996020792751.43003979207253
1468.8727926981038-2.87279269810379
151011.1720831942073-1.17208319420733
161010.6414732911766-0.641473291176622
1778.36574269921349-1.36574269921349
18109.374949328543650.62505067145635
1988.85603779142643-0.856037791426432
2067.40590170275029-1.40590170275029
211010.7270913020562-0.727091302056234
221210.30028758771711.69971241228288
2378.91420366844558-1.91420366844558
24158.840591540014616.15940845998539
2589.46161257413152-1.46161257413152
261010.2754265698002-0.275426569800188
271310.46760218081382.53239781918617
2888.23666821398501-0.236668213985009
291111.3955130046271-0.395513004627105
3079.37035042979025-2.37035042979025
3198.459277590104740.540722409895263
32109.487608187285660.512391812714345
3388.43677914571834-0.436779145718339
341513.24207046913141.75792953086859
35910.2176807444013-1.21768074440125
3678.14583771860678-1.14583771860678
37119.73627327083791.26372672916211
3897.992633167990981.00736683200902
3989.6582818475053-1.65828184750529
4087.790423023413650.209576976586346
41128.578981512238733.42101848776127
42139.790799809023553.20920019097645
4399.50193185889484-0.501931858894844
44119.366011740308251.63398825969175
4588.88537124220957-0.885371242209573
461010.9487154062928-0.948715406292811
471312.75785656154970.242143438450346
481210.92756549009001.07243450991001
491210.24949373831911.75050626168085
5098.828995199860740.171004800139258
5189.93839745930042-1.93839745930042
5298.593337462511590.40666253748841
53128.448077957303243.55192204269676
541211.36519051017760.634809489822446
551614.41642394988311.58357605011687
56118.766654401015592.23334559898441
57139.617026528215693.38297347178432
581010.7214928560551-0.72149285605511
59910.8771651132598-1.87716511325975
601410.19017209722353.80982790277648
611311.48836387460191.51163612539806
621210.41170402083111.58829597916886
63910.8657877426678-1.86578774266781
64910.3441235701389-1.34412357013886
651011.0102634529880-1.01026345298804
66810.3331288962957-2.33312889629573
67910.3141598582602-1.31415985826020
6899.08969020282346-0.0896902028234594
69118.506653549446952.49334645055305
7079.32726047094701-2.32726047094701
711111.5593415332079-0.559341533207881
7299.33671947029637-0.336719470296374
73118.84554695722092.15445304277909
7499.25524438317568-0.255244383175676
75810.1319816575392-2.13198165753924
7698.131315155082280.868684844917718
7789.51906852881131-1.51906852881131
7899.59943339282161-0.599433392821611
79109.839436633439770.160563366560231
80910.0267641671335-1.02676416713346
811713.90298266054693.09701733945312
8279.51842722573087-2.51842722573087
831110.88942289513420.110577104865755
84910.0297766902440-1.02977669024402
85109.998307783734370.00169221626563169
86118.517156266721062.48284373327894
8788.51481346373896-0.514813463738956
881212.0324766384710-0.0324766384710358
891010.0239161641402-0.0239161641402335
9079.06971963900235-2.06971963900235
9198.583227906667040.416772093332962
9278.17642665826965-1.17642665826965
931210.43259906356081.56740093643918
9489.0840520704905-1.08405207049050
951310.28199971405172.7180002859483
96911.2153418678249-2.2153418678249
971512.66864113218482.33135886781522
9888.92057423762213-0.920574237622128
991411.81426794090442.18573205909562
1001413.62888135460850.371118645391509
101910.3608639198152-1.36086391981524
1021311.71910071426491.28089928573514
103119.05646141733831.94353858266170
1041011.7712044055388-1.7712044055388
10569.99277295390467-3.99277295390467
10688.20780348894397-0.207803488943973
1071011.3019777801403-1.30197778014031
108108.019748396845351.98025160315465
109109.447210553309070.552789446690932
1101212.0400376341852-0.0400376341852216
111109.440819976746620.559180023253384
11299.13081009035105-0.13081009035105
11397.397996783956391.60200321604361
114119.156542778470641.84345722152936
11578.25027586129514-1.25027586129513
11678.85378852128818-1.85378852128818
11758.15097735507334-3.15097735507334
11899.03804857828693-0.0380485782869272
1191111.8422283612372-0.842228361237202
1201512.06796648979542.93203351020464
12197.907955355061151.09204464493885
12299.43131779994382-0.431317799943817
12389.1443371486864-1.14433714868641
1241315.5314894864242-2.53148948642417
1251010.3307215339714-0.330721533971427
1261311.49180884623981.50819115376021
12797.829443217833431.17055678216657
128119.421552033392821.57844796660718
129810.3276509846251-2.32765098462513
130109.253360563039420.746639436960576
13198.758528001269350.241471998730649
13288.52576021286184-0.525760212861844
13387.990173942987310.00982605701268877
1341310.79861575662732.20138424337274
1351110.90640784770110.0935921522988669
13689.46161257413152-1.46161257413152
137129.774212299549792.22578770045021
1381511.86673352314893.13326647685111
1391110.88942289513420.110577104865755
1401010.5451734972668-0.545173497266828
14158.15097735507334-3.15097735507334
142117.188392655709113.81160734429089


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.9508957640196160.09820847196076760.0491042359803838
170.9140895698569420.1718208602861160.0859104301430578
180.9701081572459570.05978368550808680.0298918427540434
190.9472047446840670.1055905106318670.0527952553159333
200.9694610782698320.06107784346033670.0305389217301683
210.9513648462889030.09727030742219380.0486351537110969
220.9442304416190780.1115391167618450.0557695583809223
230.9311399670829880.1377200658340230.0688600329170116
240.9930637136102740.01387257277945190.00693628638972594
250.990078439112940.01984312177411930.00992156088705967
260.9845661905869030.03086761882619350.0154338094130967
270.9888693866131950.02226122677361020.0111306133868051
280.983162751681040.03367449663792130.0168372483189607
290.9751165056929780.04976698861404440.0248834943070222
300.9719497550945570.05610048981088620.0280502449054431
310.9724217314929040.0551565370141930.0275782685070965
320.9600210677010770.07995786459784520.0399789322989226
330.9447029462709620.1105941074580760.0552970537290378
340.9653477899981720.06930442000365520.0346522100018276
350.9545228221883560.09095435562328820.0454771778116441
360.9437637909560070.1124724180879860.0562362090439932
370.9331657089035170.1336685821929650.0668342910964825
380.9132597817087370.1734804365825260.086740218291263
390.8989246523070980.2021506953858050.101075347692902
400.8712670215898430.2574659568203140.128732978410157
410.933028071331790.1339438573364190.0669719286682093
420.9519242795803030.09615144083939330.0480757204196966
430.9365449810315950.1269100379368090.0634550189684046
440.9268157934703540.1463684130592920.0731842065296461
450.9098895354946970.1802209290106060.0901104645053028
460.8928251925064660.2143496149870680.107174807493534
470.871633015638860.2567339687222790.128366984361140
480.8471811716035230.3056376567929530.152818828396477
490.8415742675690750.3168514648618490.158425732430925
500.8067174663968180.3865650672063640.193282533603182
510.7930053695193620.4139892609612760.206994630480638
520.7553009290513120.4893981418973750.244699070948688
530.8390239268383750.3219521463232500.160976073161625
540.809040182113610.3819196357727810.190959817886391
550.8096405539826990.3807188920346030.190359446017301
560.8582989765400670.2834020469198660.141701023459933
570.8979891980667440.2040216038665120.102010801933256
580.8736618298732370.2526763402535260.126338170126763
590.8645648024917550.2708703950164890.135435197508245
600.936323973515410.1273520529691810.0636760264845907
610.9293394831450940.1413210337098120.0706605168549058
620.9240775314681440.1518449370637110.0759224685318556
630.9315327427544180.1369345144911640.0684672572455818
640.9224128994007620.1551742011984760.0775871005992382
650.9240652962805620.1518694074388770.0759347037194383
660.9269141482925740.1461717034148510.0730858517074256
670.9188616110563550.1622767778872910.0811383889436454
680.9002431530581350.1995136938837310.0997568469418653
690.9157989510695010.1684020978609980.0842010489304991
700.9311721840389950.137655631922010.068827815961005
710.914420389352560.1711592212948790.0855796106474397
720.8944903094460280.2110193811079440.105509690553972
730.9088095660896410.1823808678207180.091190433910359
740.885798393878980.2284032122420400.114201606121020
750.8863065491246090.2273869017507820.113693450875391
760.870429625843860.259140748312280.12957037415614
770.8610772940536420.2778454118927160.138922705946358
780.8445840070534080.3108319858931840.155415992946592
790.8113302087527630.3773395824944740.188669791247237
800.7838319961164080.4323360077671850.216168003883592
810.8371276515141770.3257446969716460.162872348485823
820.8536411075887420.2927177848225160.146358892411258
830.8234283275487150.353143344902570.176571672451285
840.8083368023183050.383326395363390.191663197681695
850.7709558004838760.4580883990322480.229044199516124
860.8578803163617210.2842393672765580.142119683638279
870.8288230058021760.3423539883956470.171176994197824
880.7921576527069850.4156846945860300.207842347293015
890.750339156755170.499321686489660.24966084324483
900.766061833243560.467876333512880.23393816675644
910.7239236875974850.5521526248050290.276076312402515
920.7036613190230360.5926773619539290.296338680976964
930.7008667564407820.5982664871184360.299133243559218
940.666061369924810.6678772601503790.333938630075189
950.705540636352980.5889187272940390.294459363647020
960.6918203907085190.6163592185829620.308179609291481
970.6846878413227440.6306243173545110.315312158677256
980.6376302559231690.7247394881536620.362369744076831
990.6254538093399720.7490923813200570.374546190660028
1000.621332843085080.757334313829840.37866715691492
1010.6347223400120760.7305553199758470.365277659987924
1020.6441447447266930.7117105105466130.355855255273307
1030.6705781168586550.658843766282690.329421883141345
1040.66150636559750.6769872688050.3384936344025
1050.815715698139360.3685686037212790.184284301860640
1060.8323726204008360.3352547591983270.167627379599163
1070.83245680113460.3350863977308020.167543198865401
1080.8109456236045690.3781087527908620.189054376395431
1090.763298756498520.4734024870029610.236701243501481
1100.7289189385337660.5421621229324690.271081061466234
1110.6882739617509290.6234520764981420.311726038249071
1120.6186268386463330.7627463227073340.381373161353667
1130.5770027324188860.8459945351622290.422997267581114
1140.5486441766170110.9027116467659780.451355823382989
1150.475068802501160.950137605002320.52493119749884
1160.4022656970309750.8045313940619490.597734302969025
1170.4463540089590350.892708017918070.553645991040965
1180.360427946953030.720855893906060.63957205304697
1190.2861212113715530.5722424227431070.713878788628447
1200.2566870442949290.5133740885898590.74331295570507
1210.186306299849030.372612599698060.81369370015097
1220.1255667657419630.2511335314839270.874433234258037
1230.09027535057688080.1805507011537620.90972464942312
1240.1459560083050500.2919120166101010.85404399169495
1250.2967072255629530.5934144511259060.703292774437047
1260.9183424765022740.1633150469954530.0816575234977264


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level60.0540540540540541NOK
10% type I error level160.144144144144144NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/1052d61291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/1052d61291474390.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/28aff1291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/28aff1291474390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/38aff1291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/38aff1291474390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/48aff1291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/48aff1291474390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/58aff1291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/58aff1291474390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/611ei1291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/611ei1291474390.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/7ubv31291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/7ubv31291474390.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/9ubv31291474390.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/04/t1291474310srg5ax2h4j980en/9ubv31291474390.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