Home » date » 2010 » Nov » 25 »

workshop 7: interactie gender

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 25 Nov 2010 12:40:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp.htm/, Retrieved Thu, 25 Nov 2010 13:39:30 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp.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 «
0 24 14 0 11 0 12 0 24 0 26 0 0 25 11 0 7 0 8 0 25 0 23 0 0 17 6 0 17 0 8 0 30 0 25 0 1 18 12 12 10 10 8 8 19 19 23 23 1 18 8 8 12 12 9 9 22 22 19 19 1 16 10 10 12 12 7 7 22 22 29 29 1 20 10 10 11 11 4 4 25 25 25 25 1 16 11 11 11 11 11 11 23 23 21 21 1 18 16 16 12 12 7 7 17 17 22 22 1 17 11 11 13 13 7 7 21 21 25 25 0 23 13 0 14 0 12 0 19 0 24 0 0 30 12 0 16 0 10 0 19 0 18 0 1 23 8 8 11 11 10 10 15 15 22 22 1 18 12 12 10 10 8 8 16 16 15 15 1 15 11 11 11 11 8 8 23 23 22 22 1 12 4 4 15 15 4 4 27 27 28 28 0 21 9 0 9 0 9 0 22 0 20 0 1 15 8 8 11 11 8 8 14 14 12 12 1 20 8 8 17 17 7 7 22 22 24 24 0 31 14 0 17 0 11 0 23 0 20 0 0 27 15 0 11 0 9 0 23 0 21 0 1 34 16 16 18 18 11 11 21 21 20 20 1 21 9 9 14 14 13 13 19 19 21 21 1 31 14 14 10 10 8 8 18 18 23 23 1 19 11 11 11 11 8 8 20 20 28 28 0 16 8 0 15 0 9 0 23 0 24 0 1 20 9 9 15 15 6 6 25 25 24 24 1 21 9 9 13 13 9 9 19 19 24 24 1 22 9 9 16 16 9 9 24 24 23 23 1 17 9 9 13 13 6 6 22 22 23 23 1 24 10 10 9 9 6 6 25 25 29 29 0 25 16 0 18 0 16 0 2 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Concernovermistakes[t] = + 17.7079010523209 + 0.0365943321020009Gender[t] + 0.695145667491058Doubtsaboutactions[t] -0.0783765564644857DoubtsaboutactionsMale[t] -0.223159928154307Parentalexpectations[t] -0.173559424326886ParentalexpectationsMale[t] + 0.323644568786632Parentalcritism[t] -0.511763726976633ParentalcritismMale[t] + 0.320852405582859Personalstandards[t] + 0.182877097980758PersonalstandarsMale[t] -0.529139795925976Organization[t] + 0.187133930397755OrganizationMale[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.70790105232091.12879515.687400
Gender0.03659433210200090.0740490.49420.621910.310955
Doubtsaboutactions0.6951456674910580.1170855.937100
DoubtsaboutactionsMale-0.07837655646448570.121858-0.64320.5211090.260554
Parentalexpectations-0.2231599281543070.138236-1.61430.1085980.054299
ParentalexpectationsMale-0.1735594243268860.16425-1.05670.292390.146195
Parentalcritism0.3236445687866320.1838021.76080.0803470.040173
ParentalcritismMale-0.5117637269766330.098292-5.20651e-060
Personalstandards0.3208524055828590.0898973.56910.0004840.000242
PersonalstandarsMale0.1828770979807580.0872252.09660.0377410.01887
Organization-0.5291397959259760.094701-5.587500
OrganizationMale0.1871339303977550.0884542.11560.0360640.018032


Multiple Linear Regression - Regression Statistics
Multiple R0.844823945222742
R-squared0.713727498421718
Adjusted R-squared0.692305746602935
F-TEST (value)33.3178866256824
F-TEST (DF numerator)11
F-TEST (DF denominator)147
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.68941928829607
Sum Squared Residuals2000.93675867311


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12422.8117390528511.18826094714901
22522.23263528120952.76736471879052
31717.0712900982734-0.0712900982733651
41821.3783035869694-3.37830358696944
51820.8088812525145-2.8088812525145
61618.9985991356654-2.99859913566543
72022.8388879355204-2.83888793552037
81622.4993873942026-6.49938739420258
91822.5746073427043-4.57460734270433
101720.0829428527601-3.08294285276007
112320.90113116483482.0988688351652
123022.28721527901777.71278472098228
132316.46535732527576.5346426747243
141822.6031620005044-4.60316200050435
151522.7217390032444-7.72173900324436
161217.5328372699787-5.53283726997872
172121.3445308297347-0.344530829734687
181519.7579247933743-4.7579247933743
192017.49149347884742.50850652115258
203124.00312128511166.99687871488835
212724.86079758802932.13920241197069
223422.140744340368111.8592556596319
232117.68453478407143.31546521592862
243122.10811230545908.89188769454104
251919.1585152993842-0.158515299384178
261617.5147188151967-1.51471881519674
272020.6010089637172-0.601008963717234
282117.80771317272793.19228682727209
292219.47820849863062.52179150136936
301720.225265023517-3.22526502351699
312421.88806486198992.11193513801014
322525.6344735689173-0.634473568917283
332622.73605096711353.26394903288652
342524.17037941136130.829620588638669
351720.2692303807695-3.26923038076951
363228.62961513898843.37038486101158
373326.41006354240486.58993645759517
381322.9508456590843-9.95084565908433
393222.32764353196079.67235646803934
402525.8102790758332-0.810279075833216
412920.19391413904088.8060858609592
422220.77537670715661.22462329284336
431817.69455627786160.305443722138430
441720.7344146349543-3.73441463495426
452021.1888622348383-1.18886223483831
461520.8013020069954-5.80130200699542
472019.80299071362600.197009286374031
483329.59127715868263.40872284131743
492920.42168997294688.57831002705316
502323.7293142522824-0.729314252282376
512623.68926059273512.31073940726488
521819.4000106905263-1.40001069052634
532016.17172896540273.82827103459733
54612.3826532627888-6.3826532627888
5587.59307527912940.406924720870598
561310.65500075074722.34499924925282
57108.002940960861721.99705903913828
5888.37051905183334-0.370519051833336
59710.9530501253590-3.95305012535897
601517.9022858335098-2.90228583350984
6199.26733895850332-0.267338958503316
62109.703332734349560.296667265650435
63129.483933273187762.51606672681224
641313.4497906665922-0.44979066659219
651010.8265675715985-0.826567571598504
66117.004721887008953.99527811299105
6789.77691669093432-1.77691669093432
6896.205755093230062.79424490676994
691312.86254111447880.137458885521231
701110.72795330855670.27204669144329
71810.2898601042278-2.28986010422777
7299.94202337083844-0.942023370838442
7397.005231768602241.99476823139776
74157.884812532417277.11518746758273
7598.22018306914740.779816930852602
761010.0128550669390-0.0128550669389737
771412.41763201373391.5823679862661
781211.62416566087970.375834339120323
791210.68481297957121.31518702042877
801111.1562528010513-0.156252801051291
811411.92774523112742.07225476887264
8268.17293024970463-2.17293024970463
831210.55593067122791.44406932877212
8487.781266869854280.218733130145723
851413.83046986028520.169530139714764
861110.40759937801910.592400621980913
87109.774497916339860.225502083660142
881412.23026347076411.76973652923586
891211.76564752757640.234352472423609
901012.4569330428162-2.45693304281618
911414.0019001188809-0.00190011888091830
9258.10017184343734-3.10017184343734
931112.4135480614905-1.41354806149050
941010.9037275317824-0.903727531782402
9599.67235782007674-0.672357820076742
96106.150545147739323.84945485226068
971610.19504185144555.80495814855448
981312.89874096492250.101259035077521
99911.0635646168111-2.06356461681112
1001012.9168787734598-2.91687877345979
1011010.8163544919866-0.81635449198664
102710.3918490553556-3.39184905535562
10398.092931836824010.907068163175988
10489.4657853717346-1.46578537173460
1051412.79284941144341.20715058855663
1061417.5360240887630-3.53602408876303
107812.9370428116627-4.93704281166275
108913.7892315294793-4.78923152947933
1091414.1982562224062-0.198256222406151
1101415.3960645469042-1.39606454690421
111812.1123350752938-4.11233507529382
11289.52343713494843-1.52343713494843
11387.424185793260490.575814206739514
11477.14369677937642-0.143696779376416
11565.053243023560070.946756976439928
11688.55271855857902-0.552718558579022
11769.21530140868406-3.21530140868406
1181113.9532057872090-2.95320578720898
1191412.8592978396511.14070216034900
1201117.478310416642-6.47831041664202
1211112.5109844305528-1.51098443055278
1221114.7004205395233-3.70042053952332
1231414.5098011424281-0.509801142428057
124810.4344794563191-2.43447945631912
1252011.59681550761558.40318449238454
1261110.18777115191170.812228848088271
127810.0961950603485-2.09619506034849
1281110.57260193200530.427398067994736
129109.62247725509490.377522744905107
1301413.09820530696210.901794693037882
1311113.2630746439127-2.26307464391267
132911.9930008448726-2.99300084487264
13398.813183488731680.186816511268319
134810.3406420843232-2.34064208432323
1351012.1653415762053-2.16534157620527
136136.260801498996286.73919850100372
1371314.3201306238853-1.32013062388528
1381215.8157201479836-3.81572014798365
13989.4911899531388-1.4911899531388
1401316.6756834890563-3.67568348905627
1411417.9360701355344-3.93607013553442
142125.263770428796816.73622957120319
1431416.7984008276639-2.79840082766391
1441515.4109287992392-0.410928799239194
1451312.21648623793050.783513762069489
1461614.19730040116821.80269959883181
147910.1586420511149-1.15864205111490
148911.4954016740183-2.49540167401828
149913.0506218734206-4.0506218734206
15089.28951167527347-1.28951167527347
15178.9453325554941-1.9453325554941
1521613.52592789907302.47407210092696
153115.885371287991325.11462871200868
15499.03249631571158-0.0324963157115857
1551110.49964155000840.500358449991586
156910.5737950934929-1.57379509349289
1571413.64331898718490.356681012815117
1581312.70984578580640.290154214193630
159169.533778586439886.46622141356012


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.2991971578990650.5983943157981310.700802842100935
160.3609508035017730.7219016070035470.639049196498227
170.2268250818193980.4536501636387950.773174918180602
180.2647185228783530.5294370457567070.735281477121647
190.4014865212019510.8029730424039020.598513478798049
200.3343431781184980.6686863562369960.665656821881502
210.39579853778290.79159707556580.6042014622171
220.775997672194070.4480046556118610.224002327805931
230.7305070263198360.5389859473603280.269492973680164
240.980115148496040.03976970300792090.0198848515039604
250.9693397148596220.06132057028075530.0306602851403776
260.956573117247740.08685376550452190.0434268827522609
270.942006951503030.1159860969939390.0579930484969697
280.9243450768275680.1513098463448630.0756549231724317
290.8998908759662480.2002182480675030.100109124033752
300.8736852755570680.2526294488858640.126314724442932
310.9447732007086830.1104535985826350.0552267992913175
320.9423095767719440.1153808464561110.0576904232280555
330.9439950822157290.1120098355685420.0560049177842712
340.9646226077827950.07075478443441080.0353773922172054
350.9695730617083570.06085387658328590.0304269382916429
360.9728391330599460.05432173388010810.0271608669400540
370.995146106701070.009707786597860230.00485389329893011
380.999466279064080.001067441871841370.000533720935920684
390.9998481970954870.0003036058090256770.000151802904512839
400.9997613179748850.0004773640502303850.000238682025115193
410.9998728690974830.0002542618050347780.000127130902517389
420.999828102813890.000343794372218690.000171897186109345
430.9998188426014380.0003623147971232430.000181157398561621
440.9997477519002330.0005044961995335860.000252248099766793
450.9996330040536360.0007339918927287070.000366995946364354
460.9998571079568480.0002857840863049170.000142892043152459
470.9998036442970140.000392711405971420.00019635570298571
480.9998184777718060.0003630444563874510.000181522228193726
490.9999998887970582.22405883035720e-071.11202941517860e-07
500.999999806447453.87105097687285e-071.93552548843642e-07
510.9999999893483022.13033968404892e-081.06516984202446e-08
520.999999981223873.75522618160516e-081.87761309080258e-08
5312.74828117060058e-201.37414058530029e-20
5411.01788784506053e-215.08943922530267e-22
5513.3425615886261e-211.67128079431305e-21
5613.40769362733608e-211.70384681366804e-21
5711.07793536907340e-215.38967684536702e-22
5812.71366330445564e-221.35683165222782e-22
5915.24240722160819e-232.62120361080409e-23
6011.24869286440906e-226.2434643220453e-23
6112.61993146770147e-221.30996573385073e-22
6217.7774554357041e-223.88872771785205e-22
6312.66417157228660e-211.33208578614330e-21
6412.92207973755596e-211.46103986877798e-21
6515.81844174948077e-212.90922087474038e-21
6617.45790655643037e-213.72895327821519e-21
6712.42777939756005e-201.21388969878003e-20
6813.33302339836282e-201.66651169918141e-20
6918.88025583734845e-204.44012791867423e-20
7012.37510068848758e-191.18755034424379e-19
7117.54513598720578e-193.77256799360289e-19
7212.0537725367021e-181.02688626835105e-18
7316.09396464965295e-193.04698232482648e-19
7414.07170550909182e-202.03585275454591e-20
7516.43540978424014e-203.21770489212007e-20
7611.7534995379027e-198.7674976895135e-20
7714.48521124842474e-192.24260562421237e-19
7811.46522656784661e-187.32613283923307e-19
7914.61760723273354e-182.30880361636677e-18
8011.15910106462230e-175.79550532311148e-18
8113.66931106294925e-171.83465553147462e-17
8211.14824313964726e-165.74121569823631e-17
8313.15203312976219e-161.57601656488109e-16
8419.54140649788758e-164.77070324894379e-16
850.9999999999999992.83006484819311e-151.41503242409656e-15
860.9999999999999968.27291935542827e-154.13645967771414e-15
870.9999999999999882.32952545756093e-141.16476272878047e-14
880.999999999999975.80764493293664e-142.90382246646832e-14
890.9999999999999311.38276515680589e-136.91382578402947e-14
900.9999999999998283.43925654901153e-131.71962827450577e-13
910.9999999999995489.03420139449364e-134.51710069724682e-13
920.9999999999990251.94945155771048e-129.74725778855238e-13
930.9999999999973955.20944245973803e-122.60472122986902e-12
940.9999999999934361.31273950513607e-116.56369752568036e-12
950.9999999999828883.42248059097691e-111.71124029548845e-11
960.9999999999587748.24518333837681e-114.12259166918841e-11
970.9999999999615137.69745851801688e-113.84872925900844e-11
980.9999999999049771.90046252294446e-109.50231261472228e-11
990.9999999998712972.57405809342816e-101.28702904671408e-10
1000.9999999997408335.18334593187104e-102.59167296593552e-10
1010.9999999993940541.21189227739082e-096.0594613869541e-10
1020.9999999995253799.49243041686492e-104.74621520843246e-10
1030.9999999989863172.02736603236428e-091.01368301618214e-09
1040.999999997510724.97856209707567e-092.48928104853783e-09
1050.999999993988731.20225387934872e-086.01126939674358e-09
1060.9999999902151151.95697692571343e-089.78488462856713e-09
1070.9999999844020113.11959778579486e-081.55979889289743e-08
1080.999999976517034.69659405075203e-082.34829702537601e-08
1090.999999944933991.10132019573977e-075.50660097869887e-08
1100.999999872703212.54593579443315e-071.27296789721657e-07
1110.9999997333769035.33246194055071e-072.66623097027535e-07
1120.999999494166591.01166682213634e-065.0583341106817e-07
1130.999999137345451.72530909959696e-068.6265454979848e-07
1140.99999849103563.01792880118358e-061.50896440059179e-06
1150.9999998203126593.59374682333377e-071.79687341166689e-07
1160.99999956139818.77203798736352e-074.38601899368176e-07
1170.9999990461847041.90763059101826e-069.5381529550913e-07
1180.9999979866189594.02676208274442e-062.01338104137221e-06
1190.9999953639780869.27204382839599e-064.63602191419800e-06
1200.9999929967341841.40065316323677e-057.00326581618383e-06
1210.9999846154396343.07691207314873e-051.53845603657437e-05
1220.9999692701146566.14597706886996e-053.07298853443498e-05
1230.999935198292150.0001296034156981726.4801707849086e-05
1240.9998683969165230.0002632061669548760.000131603083477438
1250.9999999999998213.58009495111676e-131.79004747555838e-13
1260.9999999999989652.07084826342282e-121.03542413171141e-12
1270.9999999999974685.0630867341022e-122.5315433670511e-12
1280.9999999999851922.96165388901380e-111.48082694450690e-11
1290.9999999999159271.68145768138336e-108.40728840691681e-11
1300.9999999995553798.89242404685857e-104.44621202342928e-10
1310.9999999977387784.52244452085649e-092.26122226042825e-09
1320.9999999886399762.27200479962714e-081.13600239981357e-08
1330.9999999469305121.06138975131048e-075.30694875655242e-08
1340.9999997445555465.10888907686234e-072.55444453843117e-07
1350.9999993485337441.30293251296212e-066.51466256481061e-07
1360.9999982528942173.49421156526313e-061.74710578263157e-06
1370.999992775040721.44499185601954e-057.22495928009771e-06
1380.999976523352064.69532958798633e-052.34766479399317e-05
1390.9998934564618030.0002130870763947920.000106543538197396
1400.9995591342620380.0008817314759241020.000440865737962051
1410.9985598117866280.002880376426743580.00144018821337179
1420.9999598091247488.03817505041603e-054.01908752520802e-05
1430.9996309154520910.000738169095817030.000369084547908515
1440.9974515380161320.005096923967736440.00254846198386822


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1080.830769230769231NOK
5% type I error level1090.838461538461538NOK
10% type I error level1140.876923076923077NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/1075821290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/1075821290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/1i3b81290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/1i3b81290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/2susb1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/2susb1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/3susb1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/3susb1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/4susb1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/4susb1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/534ae1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/534ae1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/634ae1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/634ae1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/7wd9h1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/7wd9h1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/8wd9h1290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/8wd9h1290688791.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/975821290688791.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906887494uzlzntelv34wdp/975821290688791.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