Home » date » 2010 » Nov » 24 »

Workshop 7 mini-tutorial Concern over mistakes - interaction gender

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 15:50:55 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp.htm/, Retrieved Wed, 24 Nov 2010 16:50:16 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp.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 time9 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Concernovermistakes[t] = + 17.7079010523209 + 0.0365943321020006Gender[t] + 0.695145667491059DoubtsaboutactionsFemale[t] -0.0783765564644862DoubtsaboutactionsMale[t] -0.223159928154307ParentalexpectationsFemale[t] -0.173559424326886ParentalexpectationsMale[t] + 0.323644568786631ParentalcritismFemale[t] -0.511763726976633ParentalcritismMale[t] + 0.320852405582859PersonalstandardsFemale[t] + 0.182877097980758PersonalstandarsMale[t] -0.529139795925977OrganizationFemale[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.03659433210200060.0740490.49420.621910.310955
DoubtsaboutactionsFemale0.6951456674910590.1170855.937100
DoubtsaboutactionsMale-0.07837655646448620.121858-0.64320.5211090.260554
ParentalexpectationsFemale-0.2231599281543070.138236-1.61430.1085980.054299
ParentalexpectationsMale-0.1735594243268860.16425-1.05670.292390.146195
ParentalcritismFemale0.3236445687866310.1838021.76080.0803470.040173
ParentalcritismMale-0.5117637269766330.098292-5.20651e-060
PersonalstandardsFemale0.3208524055828590.0898973.56910.0004840.000242
PersonalstandarsMale0.1828770979807580.0872252.09660.0377410.01887
OrganizationFemale-0.5291397959259770.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.81173905285111.18826094714887
22522.23263528120942.76736471879058
31717.0712900982734-0.0712900982734
41821.3783035869694-3.37830358696943
51820.8088812525145-2.80888125251449
61618.9985991356654-2.99859913566543
72022.8388879355204-2.83888793552036
81622.4993873942026-6.49938739420257
91822.5746073427043-4.57460734270433
101720.0829428527601-3.08294285276008
112320.90113116483482.09886883516521
123022.28721527901777.71278472098229
132316.46535732527576.5346426747243
141822.6031620005044-4.60316200050435
151522.7217390032444-7.72173900324436
161217.5328372699787-5.53283726997872
172121.3445308297347-0.344530829734676
181519.7579247933743-4.7579247933743
192017.49149347884742.50850652115257
203124.00312128511166.99687871488836
212724.86079758802932.1392024119707
223422.140744340368111.8592556596319
232117.68453478407143.31546521592862
243122.10811230545908.89188769454104
251919.1585152993842-0.158515299384177
261617.5147188151967-1.51471881519673
272020.6010089637172-0.601008963717237
282117.80771317272793.19228682727209
292219.47820849863062.52179150136936
301720.225265023517-3.22526502351699
312421.88806486198992.11193513801014
322525.6344735689173-0.634473568917275
332622.73605096711353.26394903288652
342524.17037941136130.829620588638668
351720.2692303807695-3.26923038076951
363228.62961513898843.37038486101157
373326.41006354240486.58993645759517
381322.9508456590843-9.95084565908433
393222.32764353196079.67235646803934
402525.8102790758332-0.81027907583322
412920.19391413904088.8060858609592
422220.77537670715661.22462329284335
431817.69455627786160.305443722138433
441720.7344146349543-3.73441463495427
452021.1888622348383-1.18886223483830
461520.8013020069954-5.80130200699542
472019.80299071362600.197009286374033
483329.59127715868263.40872284131743
492920.42168997294688.57831002705317
502323.7293142522824-0.729314252282378
512623.68926059273512.31073940726488
521819.4000106905263-1.40001069052634
532016.17172896540273.82827103459735
54612.3826532627888-6.3826532627888
5587.59307527912940.4069247208706
561310.65500075074722.34499924925282
57108.002940960861731.99705903913828
5888.37051905183334-0.370519051833335
59710.9530501253590-3.95305012535898
601517.9022858335098-2.90228583350983
6199.26733895850331-0.267338958503315
62109.703332734349570.296667265650434
63129.483933273187762.51606672681224
641313.4497906665922-0.449790666592187
651010.8265675715985-0.826567571598502
66117.004721887008953.99527811299105
6789.77691669093432-1.77691669093432
6896.205755093230052.79424490676995
691312.86254111447880.137458885521235
701110.72795330855670.27204669144329
71810.2898601042278-2.28986010422777
7299.94202337083844-0.942023370838442
7397.005231768602241.99476823139776
74157.884812532417277.11518746758273
7598.22018306914740.779816930852598
761010.0128550669390-0.0128550669389756
771412.41763201373391.58236798626610
781211.62416566087970.375834339120325
791210.68481297957121.31518702042877
801111.1562528010513-0.156252801051293
811411.92774523112742.07225476887265
8268.17293024970463-2.17293024970463
831210.55593067122791.44406932877212
8487.781266869854280.218733130145723
851413.83046986028520.169530139714766
861110.40759937801910.592400621980913
87109.774497916339860.225502083660140
881412.23026347076411.76973652923586
891211.76564752757640.23435247242361
901012.4569330428162-2.45693304281617
911414.0019001188809-0.00190011888091950
9258.10017184343734-3.10017184343734
931112.4135480614905-1.4135480614905
941010.9037275317824-0.903727531782403
9599.67235782007674-0.672357820076738
96106.150545147739323.84945485226068
971610.19504185144555.80495814855448
981312.89874096492250.101259035077522
99911.0635646168111-2.06356461681112
1001012.9168787734598-2.91687877345979
1011010.8163544919866-0.816354491986637
102710.3918490553556-3.39184905535562
10398.092931836824010.90706816317599
10489.4657853717346-1.4657853717346
1051412.79284941144341.20715058855663
1061417.5360240887630-3.53602408876303
107812.9370428116627-4.93704281166275
108913.7892315294793-4.78923152947933
1091414.1982562224062-0.198256222406150
1101415.3960645469042-1.39606454690421
111812.1123350752938-4.11233507529381
11289.52343713494843-1.52343713494843
11387.424185793260490.575814206739514
11477.14369677937642-0.143696779376418
11565.053243023560070.946756976439927
11688.55271855857902-0.55271855857902
11769.21530140868406-3.21530140868406
1181113.9532057872090-2.95320578720898
1191412.8592978396511.14070216034900
1201117.478310416642-6.47831041664202
1211112.5109844305528-1.51098443055279
1221114.7004205395233-3.70042053952332
1231414.5098011424281-0.509801142428058
124810.4344794563191-2.43447945631911
1252011.59681550761558.40318449238453
1261110.18777115191170.812228848088272
127810.0961950603485-2.09619506034849
1281110.57260193200530.427398067994736
129109.62247725509490.377522744905109
1301413.09820530696210.90179469303788
1311113.2630746439127-2.26307464391267
132911.9930008448726-2.99300084487263
13398.813183488731680.186816511268320
134810.3406420843232-2.34064208432323
1351012.1653415762053-2.16534157620526
136136.260801498996286.73919850100372
1371314.3201306238853-1.32013062388528
1381215.8157201479836-3.81572014798365
13989.4911899531388-1.49118995313879
1401316.6756834890563-3.67568348905627
1411417.9360701355344-3.93607013553442
142125.263770428796816.73622957120319
1431416.7984008276639-2.79840082766390
1441515.4109287992392-0.410928799239195
1451312.21648623793050.78351376206949
1461614.19730040116821.80269959883181
147910.1586420511149-1.15864205111490
148911.4954016740183-2.49540167401828
149913.0506218734206-4.05062187342059
15089.28951167527347-1.28951167527347
15178.9453325554941-1.9453325554941
1521613.52592789907302.47407210092696
153115.885371287991325.11462871200868
15499.03249631571158-0.0324963157115840
1551110.49964155000840.500358449991589
156910.5737950934929-1.57379509349289
1571413.64331898718490.356681012815118
1581312.70984578580640.290154214193631
159169.533778586439886.46622141356012


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.2991971578990650.598394315798130.700802842100935
160.3609508035017720.7219016070035440.639049196498228
170.2268250818193980.4536501636387950.773174918180602
180.2647185228783530.5294370457567070.735281477121647
190.4014865212019520.8029730424039050.598513478798048
200.3343431781184980.6686863562369960.665656821881502
210.3957985377829030.7915970755658070.604201462217096
220.7759976721940690.4480046556118620.224002327805931
230.7305070263198360.5389859473603280.269492973680164
240.980115148496040.03976970300792090.0198848515039604
250.9693397148596220.06132057028075550.0306602851403778
260.9565731172477390.0868537655045220.043426882752261
270.942006951503030.1159860969939400.0579930484969698
280.9243450768275670.1513098463448660.0756549231724328
290.8998908759662470.2002182480675050.100109124033753
300.8736852755570680.2526294488858630.126314724442932
310.9447732007086830.1104535985826350.0552267992913174
320.9423095767719440.1153808464561120.0576904232280559
330.9439950822157290.1120098355685420.0560049177842712
340.9646226077827940.07075478443441250.0353773922172063
350.9695730617083570.06085387658328640.0304269382916432
360.9728391330599450.05432173388011050.0271608669400553
370.995146106701070.009707786597860180.00485389329893009
380.999466279064080.001067441871841380.00053372093592069
390.9998481970954870.0003036058090256790.000151802904512840
400.9997613179748850.0004773640502303770.000238682025115189
410.9998728690974830.0002542618050347780.000127130902517389
420.999828102813890.0003437943722186860.000171897186109343
430.9998188426014380.0003623147971232360.000181157398561618
440.9997477519002330.0005044961995335860.000252248099766793
450.9996330040536360.0007339918927287170.000366995946364359
460.9998571079568480.0002857840863049120.000142892043152456
470.9998036442970140.0003927114059713990.000196355702985699
480.9998184777718060.0003630444563874480.000181522228193724
490.9999998887970582.22405883035724e-071.11202941517862e-07
500.9999998064474513.87105097687282e-071.93552548843641e-07
510.9999999893483022.1303396840489e-081.06516984202445e-08
520.999999981223873.75522618160504e-081.87761309080252e-08
5312.74828117060051e-201.37414058530026e-20
5411.01788784506055e-215.08943922530274e-22
5513.3425615886261e-211.67128079431305e-21
5613.40769362733598e-211.70384681366799e-21
5711.07793536907343e-215.38967684536715e-22
5812.71366330445582e-221.35683165222791e-22
5915.24240722160804e-232.62120361080402e-23
6011.24869286440906e-226.2434643220453e-23
6112.61993146770140e-221.30996573385070e-22
6217.7774554357039e-223.88872771785195e-22
6312.66417157228663e-211.33208578614332e-21
6412.92207973755596e-211.46103986877798e-21
6515.81844174948085e-212.90922087474042e-21
6617.45790655643018e-213.72895327821509e-21
6712.42777939755999e-201.21388969877999e-20
6813.33302339836264e-201.66651169918132e-20
6918.88025583734823e-204.44012791867411e-20
7012.37510068848755e-191.18755034424377e-19
7117.545135987206e-193.772567993603e-19
7212.05377253670218e-181.02688626835109e-18
7316.09396464965254e-193.04698232482627e-19
7414.07170550909177e-202.03585275454589e-20
7516.4354097842404e-203.2177048921202e-20
7611.75349953790275e-198.76749768951375e-20
7714.48521124842468e-192.24260562421234e-19
7811.46522656784663e-187.32613283923317e-19
7914.61760723273371e-182.30880361636686e-18
8011.15910106462230e-175.79550532311148e-18
8113.66931106294930e-171.83465553147465e-17
8211.14824313964726e-165.74121569823631e-17
8313.15203312976219e-161.57601656488109e-16
8419.54140649788794e-164.77070324894397e-16
850.9999999999999992.83006484819312e-151.41503242409656e-15
860.9999999999999968.27291935542848e-154.13645967771424e-15
870.9999999999999882.32952545756093e-141.16476272878047e-14
880.999999999999975.80764493293656e-142.90382246646828e-14
890.999999999999931.38276515680587e-136.91382578402937e-14
900.9999999999998283.43925654901153e-131.71962827450577e-13
910.9999999999995489.03420139449399e-134.51710069724699e-13
920.9999999999990251.94945155771051e-129.74725778855254e-13
930.9999999999973955.20944245973802e-122.60472122986901e-12
940.9999999999934361.31273950513604e-116.56369752568022e-12
950.9999999999828883.42248059097686e-111.71124029548843e-11
960.9999999999587748.24518333837646e-114.12259166918823e-11
970.9999999999615137.69745851801696e-113.84872925900848e-11
980.9999999999049771.90046252294448e-109.50231261472241e-11
990.9999999998712972.57405809342815e-101.28702904671407e-10
1000.9999999997408335.18334593187106e-102.59167296593553e-10
1010.9999999993940541.21189227739079e-096.05946138695397e-10
1020.9999999995253789.49243041686502e-104.74621520843251e-10
1030.9999999989863172.02736603236428e-091.01368301618214e-09
1040.9999999975107194.97856209707563e-092.48928104853781e-09
1050.999999993988731.20225387934871e-086.01126939674357e-09
1060.9999999902151151.95697692571343e-089.78488462856713e-09
1070.9999999844020113.11959778579485e-081.55979889289743e-08
1080.999999976517034.69659405075203e-082.34829702537601e-08
1090.999999944933991.10132019573979e-075.50660097869893e-08
1100.999999872703212.54593579443313e-071.27296789721657e-07
1110.9999997333769035.33246194055068e-072.66623097027534e-07
1120.9999994941665891.01166682213634e-065.05833411068172e-07
1130.999999137345451.72530909959696e-068.62654549798478e-07
1140.99999849103563.01792880118361e-061.50896440059180e-06
1150.9999998203126593.59374682333375e-071.79687341166688e-07
1160.99999956139818.77203798736342e-074.38601899368171e-07
1170.9999990461847041.90763059101826e-069.5381529550913e-07
1180.9999979866189594.02676208274442e-062.01338104137221e-06
1190.9999953639780869.272043828396e-064.636021914198e-06
1200.9999929967341841.40065316323677e-057.00326581618384e-06
1210.9999846154396343.07691207314870e-051.53845603657435e-05
1220.9999692701146566.14597706887002e-053.07298853443501e-05
1230.999935198292150.0001296034156981716.48017078490857e-05
1240.9998683969165230.0002632061669548930.000131603083477446
1250.9999999999998213.58009495111676e-131.79004747555838e-13
1260.9999999999989652.07084826342284e-121.03542413171142e-12
1270.9999999999974685.0630867341022e-122.5315433670511e-12
1280.9999999999851922.96165388901382e-111.48082694450691e-11
1290.9999999999159271.68145768138335e-108.40728840691674e-11
1300.9999999995553798.89242404685853e-104.44621202342927e-10
1310.9999999977387784.52244452085647e-092.26122226042824e-09
1320.9999999886399762.27200479962714e-081.13600239981357e-08
1330.9999999469305121.06138975131047e-075.30694875655237e-08
1340.9999997445555465.1088890768623e-072.55444453843115e-07
1350.9999993485337441.30293251296214e-066.5146625648107e-07
1360.9999982528942173.49421156526312e-061.74710578263156e-06
1370.999992775040721.44499185601954e-057.22495928009768e-06
1380.999976523352064.69532958798631e-052.34766479399315e-05
1390.9998934564618030.0002130870763947950.000106543538197397
1400.9995591342620380.000881731475924110.000440865737962055
1410.9985598117866280.002880376426743590.00144018821337180
1420.9999598091247488.0381750504162e-054.0190875252081e-05
1430.9996309154520910.000738169095817020.00036908454790851
1440.9974515380161320.005096923967736390.00254846198386820


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/15cp21290613842.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/15cp21290613842.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/2y3o51290613842.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/2y3o51290613842.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/3y3o51290613842.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/3y3o51290613842.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/4y3o51290613842.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/4y3o51290613842.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/5y3o51290613842.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/5y3o51290613842.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/69voq1290613842.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290613816s49mu49x42cazqp/69voq1290613842.ps (open in new window)


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


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


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