Home » date » 2010 » Dec » 03 »

p_Stress_MR1

*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: Fri, 03 Dec 2010 20:24:39 +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/03/t1291407869ze7kt3waqxz7w9u.htm/, Retrieved Fri, 03 Dec 2010 21:24:29 +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/03/t1291407869ze7kt3waqxz7w9u.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 «
10 53 7 6 7 6 15 11 11 12 2 4 25 25 2 2 3.4 6 86 4 6 5 6 15 12 8 11 4 3 25 24 1 2 4 13 66 6 5 7 13 14 15 12 14 7 5 19 21 4 3.666666667 3.2 12 67 5 4 3 8 10 10 10 12 3 3 18 23 1 2.333333333 3.2 8 76 4 4 7 7 10 12 7 21 7 6 18 17 5 4 2.6 6 78 3 6 7 9 12 11 6 12 2 5 22 19 1 2.666666667 3.2 10 53 5 7 7 5 18 5 8 22 7 6 29 18 1 2.333333333 3.8 10 80 6 5 1 8 12 16 16 11 2 6 26 27 1 3.666666667 3.6 9 74 5 4 4 9 14 11 8 10 1 5 25 23 1 2.666666667 3.6 9 76 6 6 5 11 18 15 16 13 2 5 23 23 1 3 4 7 79 7 1 6 8 9 12 7 10 6 3 23 29 2 3 3.4 5 54 6 4 4 11 11 9 11 8 1 5 23 21 1 2 2.6 14 67 7 6 7 12 11 11 16 15 1 7 24 26 3 3 4.4 6 87 6 6 6 8 17 15 16 10 1 5 30 25 1 1.666666667 4 10 58 4 5 2 7 8 12 12 14 2 5 19 25 1 3 3.8 10 75 6 3 2 9 16 16 13 14 2 3 24 23 1 1.333333333 3.6 7 88 4 7 6 12 21 14 19 11 2 5 32 26 1 3 3.8 10 64 5 2 7 20 24 11 7 10 1 6 30 20 1 2 3.6 8 57 3 5 5 7 21 10 8 13 7 5 29 29 2 2.666666667 3.8 6 66 3 5 2 8 14 7 12 7 1 2 17 24 4 4 3.6 10 54 4 3 7 8 7 11 13 12 2 5 25 23 1 2.333333333 4 12 56 5 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 time9 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PStress[t] = + 5.22652616884922 -0.0342689806008217BelInSprt[t] + 0.156751517105329KunnenRekRel[t] -0.137087238624758ExtraCurAct[t] -0.0131171061742578Verandvorigjaar[t] + 0.0306992360511323Kritouders[t] -0.060701263441551Verwouders[t] + 0.0651926129660706Populariteit[t] + 0.000472082504175796KenMedeStud[t] + 0.402890559410430Depressie[t] -0.177299512348825Slaapgebrek[t] + 0.215782954579822ToekZorgen[t] -0.0326727049326701PersStand[t] + 0.0520518310861078MateGeorgZijn[t] + 0.0264275257714054Rookgedrag[t] -0.0883024675116791MateAlcoholCon[t] + 0.295536842036837MateGezondGevarEetg[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.226526168849222.530352.06550.0409390.020469
BelInSprt-0.03426898060082170.019649-1.7440.0836090.041804
KunnenRekRel0.1567515171053290.1151071.36180.1757130.087856
ExtraCurAct-0.1370872386247580.138554-0.98940.3243720.162186
Verandvorigjaar-0.01311710617425780.108761-0.12060.9041970.452099
Kritouders0.03069923605113230.0833530.36830.7132690.356635
Verwouders-0.0607012634415510.06191-0.98050.3287460.164373
Populariteit0.06519261296607060.0732740.88970.375330.187665
KenMedeStud0.0004720825041757960.0613760.00770.9938750.496938
Depressie0.4028905594104300.0666146.048200
Slaapgebrek-0.1772995123488250.099054-1.78990.0758870.037943
ToekZorgen0.2157829545798220.1237951.74310.0837820.041891
PersStand-0.03267270493267010.051558-0.63370.5274260.263713
MateGeorgZijn0.05205183108610780.0511261.01810.3105930.155296
Rookgedrag0.02642752577140540.1890980.13980.8890780.444539
MateAlcoholCon-0.08830246751167910.270555-0.32640.7446860.372343
MateGezondGevarEetg0.2955368420368370.3461670.85370.3948820.197441


Multiple Linear Regression - Regression Statistics
Multiple R0.628535092629106
R-squared0.395056362666279
Adjusted R-squared0.317623577087563
F-TEST (value)5.10192626693862
F-TEST (DF numerator)16
F-TEST (DF denominator)125
p-value4.64995227877907e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.97131675881084
Sum Squared Residuals485.761220446058


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.2979487964583-0.297948796458302
267.91239867279394-1.91239867279394
31310.3390985411632.660901458837
4129.747116785063722.25288321493628
5812.3608178413918-4.36081784139178
668.94314617595213-2.94314617595213
71012.3832569313601-2.38325693136006
8109.989165788988390.0108342110116108
999.18671490635274-0.186714906352737
10910.2562755658211-1.25627556582115
1179.04890707973803-2.04890707973803
1259.06217141802112-4.06217141802112
131412.59925044127561.40074955872441
1468.79656241340654-2.79656241340653
151011.6013799337748-1.60137993377483
161010.8325459887723-0.832545988772341
1778.16337216151061-1.16337216151061
18109.44956699909250.550433000907498
1989.16610993350092-1.16610993350092
2067.16588821534516-1.16588821534516
211010.9857794411093-0.985779441109293
221210.24804047599171.75195952400826
2379.43366041479678-2.43366041479678
24158.65257029762356.3474297023765
25810.1491084527023-2.14910845270229
26109.95283830007740.0471616999226065
271310.51632268764532.48367731235471
2887.86665643010640.133343569893595
291111.3207867552581-0.320786755258090
3079.7319542572747-2.73195425727469
3198.374013825630880.625986174369125
32109.667538256346070.332461743653928
3388.10270249854559-0.102702498545585
341513.40450670649711.59549329350287
35910.1456662951063-1.14566629510635
3678.38185235282574-1.38185235282574
37119.612336758642131.38766324135787
3897.810879946040131.18912005395987
3989.76712144951388-1.76712144951388
4087.745626691781480.254373308218522
41129.073118487425982.92688151257402
421310.28874630084692.71125369915311
4398.99499972465050.00500027534950619
44119.367894153755421.63210584624458
4588.19415957056963-0.19415957056963
461010.8119350981055-0.811935098105464
471312.28621189574680.713788104253187
481211.21424842547550.78575157452449
49129.561375057510082.43862494248992
5098.839627744331890.160372255668115
51810.2068011119551-2.20680111195511
5298.495540119733290.504459880266712
53128.466625666228333.53337433377167
541211.75798837983540.242011620164587
551614.22519082272231.77480917727766
56118.891140122447422.10885987755258
571310.21399476851092.78600523148912
581010.6085494175370-0.608549417536961
59910.6229671645408-1.62296716454078
60149.528617143545254.47138285645474
611311.97298430951941.02701569048063
621210.32823024920771.67176975079226
63910.8763043033581-1.87630430335811
64910.5644844003651-1.56448440036514
651011.2699183270100-1.26991832701005
66810.3411115868558-2.34111158685581
67910.4275714591011-1.42757145910115
6898.984463945398930.0155360546010725
69118.764314221825152.23568577817485
7079.50950617187987-2.50950617187987
711111.5959093237277-0.595909323727745
7299.04322706372827-0.0432270637282655
73119.150584315128891.84941568487111
7499.58582093389701-0.585820933897015
75810.3495296341019-2.34952963410189
7698.130120307568740.86987969243126
7789.06927861793022-1.06927861793022
7899.94476031937515-0.94476031937515
791010.2566345301288-0.256634530128837
8099.89037004592268-0.890370045922676
811713.87113721940713.12886278059293
8279.46628918867527-2.46628918867527
831111.2710971912694-0.271097191269415
8499.99419258295186-0.994192582951863
85109.782647703191770.217352296808229
86118.364850167058542.63514983294146
8788.07350215496662-0.0735021549666187
881212.2362440267885-0.236244026788495
891010.1366359196199-0.136635919619902
9078.90866042512573-1.90866042512573
9198.831852682581910.168147317418089
9278.20186818590794-1.20186818590794
931210.60160310242131.39839689757873
9489.3770524761292-1.37705247612920
951310.58794485703482.41205514296516
96910.8991606935624-1.89916069356244
971512.71391283090472.28608716909534
9889.60084209563988-1.60084209563988
991411.52469112054272.47530887945727
1001413.89116556168690.108834438313056
101910.2593802311929-1.25938023119287
1021311.38760247188011.61239752811987
103119.065220932738641.93477906726136
1041011.9457960705909-1.94579607059089
105610.0273934103186-4.02739341031865
10688.39056873028816-0.390568730288156
1071011.4319914342948-1.43199143429479
108107.857857874760112.14214212523989
109108.933554451528641.06644554847136
1101212.0502741750573-0.0502741750573411
111109.680713847085670.319286152914328
11299.01387427623435-0.0138742762343448
11397.673287471902421.32671252809758
114119.431169418165021.56883058183498
11578.0289016846006-1.02890168460060
11678.8372557113458-1.83725571134581
11757.95064640131373-2.95064640131373
11898.842916557978270.157083442021736
119119.828029747082231.17197025291777
1201512.26699495751722.73300504248278
12198.031543105897670.968456894102328
12299.46720704583193-0.467207045831931
12389.51378642904974-1.51378642904975
1241315.1340650336149-2.13406503361495
1251010.3946259832878-0.394625983287812
1261311.33894869248321.66105130751682
12797.518174283920641.48182571607936
128119.588934397082891.41106560291711
129810.7738589128412-2.77385891284124
130109.37075421615550.629245783844505
13198.847922044186420.152077955813578
13287.942310697449370.0576893025506331
13387.76865119207120.231348807928797
1341310.41461475890152.58538524109854
1351110.90053427438880.0994657256111754
136810.1491084527023-2.14910845270229
1371210.25024989991421.74975010008577
1381511.78983910715693.21016089284307
1391111.2710971912694-0.271097191269415
1401010.2216210600961-0.221621060096082
14157.95064640131373-2.95064640131373
142117.246214654240163.75378534575984


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.8258484809910680.3483030380178630.174151519008932
210.8792721987070350.241455602585930.120727801292965
220.8152568986899070.3694862026201860.184743101310093
230.7393273850052780.5213452299894450.260672614994722
240.8590773242224840.2818453515550320.140922675777516
250.8034675734950010.3930648530099980.196532426504999
260.7303336262260640.5393327475478720.269666373773936
270.9507840414455150.0984319171089710.0492159585544855
280.9302443586538060.1395112826923880.069755641346194
290.9046953469639150.1906093060721700.0953046530360849
300.9562798738910180.08744025221796460.0437201261089823
310.945627908056650.1087441838867010.0543720919433504
320.9248384601300350.1503230797399310.0751615398699654
330.9059508892627550.1880982214744910.0940491107372453
340.9351384028835070.1297231942329860.064861597116493
350.9255313676305620.1489372647388750.0744686323694376
360.9147325196784180.1705349606431630.0852674803215817
370.9219413387829570.1561173224340860.0780586612170432
380.909136927971740.1817261440565210.0908630720282606
390.8908892499617820.2182215000764370.109110750038218
400.8624079437634370.2751841124731270.137592056236563
410.8531850979471880.2936298041056240.146814902052812
420.8519801311654170.2960397376691660.148019868834583
430.8560446729995870.2879106540008260.143955327000413
440.8326579010160990.3346841979678020.167342098983901
450.8002841535564750.399431692887050.199715846443525
460.7575657015340980.4848685969318040.242434298465902
470.7725962524411460.4548074951177090.227403747558854
480.7315422165622980.5369155668754030.268457783437702
490.7858673572836390.4282652854327220.214132642716361
500.752098820960360.4958023580792790.247901179039640
510.7492849142919760.5014301714160490.250715085708024
520.7068887737261270.5862224525477460.293111226273873
530.8009569862584010.3980860274831970.199043013741599
540.7743389541876020.4513220916247960.225661045812398
550.8194030232931580.3611939534136830.180596976706842
560.8451503383175170.3096993233649650.154849661682483
570.8735047910690030.2529904178619940.126495208930997
580.8439974352319890.3120051295360230.156002564768011
590.829968249712390.3400635005752200.170031750287610
600.9643481554725160.0713036890549690.0356518445274845
610.9554350017403470.08912999651930560.0445649982596528
620.9552029089689650.0895941820620710.0447970910310355
630.956269555847840.08746088830431940.0437304441521597
640.9500130134645410.09997397307091730.0499869865354587
650.9467315015582660.1065369968834680.0532684984417338
660.9459067394083770.1081865211832450.0540932605916226
670.936720134477620.1265597310447590.0632798655223796
680.9190414345643370.1619171308713260.080958565435663
690.922751122262290.1544977554754210.0772488777377105
700.9411101543664560.1177796912670880.0588898456335438
710.9250562659276820.1498874681446360.074943734072318
720.9044570899349380.1910858201301240.0955429100650622
730.9139619814554760.1720760370890470.0860380185445236
740.8906255955766120.2187488088467770.109374404423388
750.885300933645680.2293981327086410.114699066354320
760.8785802347795310.2428395304409370.121419765220469
770.8664838216337860.2670323567324290.133516178366214
780.842297643047110.3154047139057790.157702356952890
790.8065555879126170.3868888241747670.193444412087383
800.7738443210801620.4523113578396750.226155678919838
810.8137633552904070.3724732894191850.186236644709593
820.8213454744246990.3573090511506030.178654525575302
830.7824249076848360.4351501846303280.217575092315164
840.7631007003815410.4737985992369180.236899299618459
850.7181529385527150.563694122894570.281847061447285
860.8262657478088870.3474685043822250.173734252191113
870.7972293863068720.4055412273862570.202770613693128
880.7545638165870950.490872366825810.245436183412905
890.7071442255041110.5857115489917780.292855774495889
900.713208802377750.5735823952445010.286791197622250
910.6644373976491560.6711252047016890.335562602350844
920.6541383232317450.6917233535365090.345861676768255
930.6451143486816990.7097713026366020.354885651318301
940.6007192189876650.798561562024670.399280781012335
950.6469581739801710.7060836520396580.353041826019829
960.6191725905969920.7616548188060170.380827409403008
970.6088033670753640.7823932658492710.391196632924636
980.5591475600787670.8817048798424650.440852439921233
990.5399552718024070.9200894563951870.460044728197593
1000.5288180209190960.9423639581618080.471181979080904
1010.5310041011761970.9379917976476060.468995898823803
1020.6144838396873490.7710323206253030.385516160312651
1030.5836422491859710.8327155016280590.416357750814029
1040.6076749924368220.7846500151263560.392325007563178
1050.7058277537197630.5883444925604730.294172246280237
1060.6769102985440170.6461794029119660.323089701455983
1070.6870548776076240.6258902447847530.312945122392376
1080.6609525893351920.6780948213296160.339047410664808
1090.5987011279442010.8025977441115980.401298872055799
1100.6310330481033150.7379339037933710.368966951896685
1110.5653681384452830.8692637231094340.434631861554717
1120.4916104591301770.9832209182603540.508389540869823
1130.4194269178896320.8388538357792650.580573082110368
1140.3972581521310750.7945163042621510.602741847868925
1150.3472697542229340.6945395084458680.652730245777066
1160.2978675831568590.5957351663137180.702132416843141
1170.2768312620497450.553662524099490.723168737950255
1180.1997582693836250.399516538767250.800241730616375
1190.133767822923250.26753564584650.86623217707675
1200.1007988819891720.2015977639783440.899201118010828
1210.05642092915594080.1128418583118820.94357907084406
1220.02825891859208230.05651783718416470.971741081407918


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level80.0776699029126214OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/10lgwh1291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/10lgwh1291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/1wxz51291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/1wxz51291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/2p6g81291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/2p6g81291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/3p6g81291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/3p6g81291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/4p6g81291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/4p6g81291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/5igyb1291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/5igyb1291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/6igyb1291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/6igyb1291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/7spxe1291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/7spxe1291407866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/8spxe1291407866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291407869ze7kt3waqxz7w9u/8spxe1291407866.ps (open in new window)


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