Home » date » 2010 » Nov » 23 »

Workshop 7 (2)

*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: Tue, 23 Nov 2010 17:11:29 +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/23/t1290532383j4oxk6db70rwscw.htm/, Retrieved Tue, 23 Nov 2010 18:13:03 +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/23/t1290532383j4oxk6db70rwscw.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 5 4 20 2 2 40 6 5 67 6 5 38 5 2 61 5 2 29 6 4 0 5 7 30 6 6 39 5 4 70 6 1 65 5 4 5 5 1 30 4 5 50 7 5 90 5 5 45 4 4 75 6 3 76 6 5 15 5 5 10 5 5 0 5 4 60 6 4 67 5 2 60 6 1 70 6 2 70 5 3 87 6 3 27 6 2 65 5 2 56 5 6 82 6 5 30 5 3 38 6 5 56 6 5 70 6 2 80 6 4 71 6 3 50 5 1 31 5 2 40 6 5 71 6 2 71 5 2 10 5 5 20 5 5 40 6 2 55 2 2 80 7 3 80 5 1 72 7 2 60 6 2 29 6 4 70 5 2 60 4 5 63 6 2 70 7 2 38 5 2 40 6 5 80 6 2 24 5 5 40 5 4 47 6 1 70 5 1 70 5 2 75 2 5 60 5 5 65 5 3 91 5 2 68 5 5 80 6 2 90 4 5 20 5 2 61 6 3 13 3 6 80 6 3 40 5 4 70 5 2 39 6 3 93 6 5 10 6 5 25 6 3 61 5 2 18 3 5 60 6 2 74 6 3 35 5 1 0 5 5 71 5 2 100 6 1 64 6 5 50 6 2 40 5 2 35 4 4 60 5 4 70 7 2 55 3 4 65 6 2 30 6 2 25 2 1 80 7 4 26 5 6 78 6 4 10 5 7 70 4 1 0 3 2 65 6 1 80 6 2 60 5 1 67 6 5 49 6 3 70 5 2 66 6 3 65 4 3 65 6 5 40 6 1 40 5 2 20 7 2 90 6 5 48 6 2 25 6 1 35 5 2 40 6 5 77 5 2 70 3 5 82 5 1 80 5 2 52 3 5 71 5 4 70 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
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Talk[t] = + 24.4193932409404 + 5.90853825248459Hands[t] -2.84218524641860`Anxiety `[t] + 0.103795203388895t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)24.419393240940411.1805422.18410.0305850.015292
Hands5.908538252484591.757443.3620.0009930.000496
`Anxiety `-2.842185246418601.1976-2.37320.0189630.009481
t0.1037952033888950.0437462.37270.0189910.009495


Multiple Linear Regression - Regression Statistics
Multiple R0.383098887279335
R-squared0.146764757434664
Adjusted R-squared0.128864717380846
F-TEST (value)8.1991301133071
F-TEST (DF numerator)3
F-TEST (DF denominator)143
p-value4.49862710907301e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation22.3119148715918
Sum Squared Residuals71188.4809689135


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11042.6971387210778-32.6971387210778
22030.7596896598501-10.7596896598501
34045.9710821339216-5.97108213392158
46746.074877337310520.9251226626895
53848.7966900274706-10.7966900274706
66148.900485230859512.0995147691405
72949.2284481938958-20.2284481938958
8034.8971494055443-34.8971494055443
93043.7516681078363-13.7516681078363
103943.6312955515779-4.63129555157786
117058.170184746707211.8298152532928
126543.838885958355621.1611140416443
13552.4692369010004-47.4692369010004
143035.2957528662303-5.29575286623025
155053.1251628270729-3.12516282707290
169041.411881525492648.5881184745074
174538.44932372281556.55067627718446
187553.212380677592221.7876193224078
197647.631805388143928.3681946118561
201541.8270623390482-26.8270623390482
211041.9308575424371-31.9308575424371
22044.8768379922446-44.8768379922446
236050.88917144811819.11082855188192
246750.768798891859616.2312011081404
256059.62331759415170.37668240584831
267056.88492755112213.1150724488780
277048.237999255607721.7620007443923
288754.250332711481232.7496672885188
292757.1963131612887-30.1963131612887
306551.39157011219313.6084298878070
315640.126624329907515.8733756700926
328248.981143032199533.0188569678005
333048.8607704759411-18.8607704759411
343849.1887334389773-11.1887334389773
355649.29252864236626.70747135763378
367057.922879585010912.0771204149891
378052.342304295562627.6576957044374
387155.288284745370115.7117152546299
395055.1679121891116-5.16791218911163
403152.4295221460819-21.4295221460819
414049.9152998626996-9.9152998626996
427158.545650805344312.4543491946557
437152.740907756248618.2590922437514
441044.3181472203817-34.3181472203817
452044.4219424237706-24.4219424237706
464058.9608316188999-18.9608316188999
475535.430473812350419.5695261876496
488062.234775031743717.7652249682564
498056.205864223000623.7941357769994
507265.284550684946.71544931505995
516059.47980763584440.520192364155644
522953.899232346396-24.8992323463960
537053.778859790137616.2211402098624
546039.447561001786120.5524389982139
556359.89498844939993.10501155060006
567065.90732190527344.09267809472658
573854.1940406036931-16.1940406036931
584051.6798183203108-11.6798183203108
598060.310169262955519.6898307370445
602445.978870474604-21.978870474604
614048.9248509244115-8.92485092441151
624763.4637401195408-16.4637401195408
637057.658997070445112.3410029295549
647054.920607027415415.0793929725846
657528.772231734094746.2277682659053
666046.601641694937413.3983583050626
676552.389807391163512.6101926088365
689155.33578784097135.664212159029
696846.913027305104121.0869726948959
708061.451916500233418.5480834997666
719041.212079459397348.7879205406027
722055.7509686545266-35.7509686545266
736158.92111686398142.07888313601856
741332.7727415706608-19.7727415706608
758059.128707270759220.8712927292408
764050.4817789752449-10.4817789752449
777056.26994467147113.7300553285290
783959.4400928809259-20.4400928809259
799353.859517591477639.1404824085224
801053.9633127948665-43.9633127948665
812559.7514784910926-34.7514784910926
826156.78892068841554.21107931158448
831836.5490836475794-18.5490836475794
846062.9050493476779-2.90504934767789
857460.166659304648213.8333406953518
863560.0462867483897-25.0462867483897
87048.7813409661042-48.7813409661042
887157.411691908748913.5883080912511
8910066.26621061104133.733789388959
906455.00126482875558.99873517124455
915063.6316157714002-13.6316157714002
924057.8268727223045-17.8268727223045
933546.3377591803716-11.3377591803716
946052.3500926362457.64990736375495
957069.95533483744030.0446651625596758
965540.740606538053714.2593934619463
976564.25438699173350.74561300826647
983064.3581821951224-34.3581821951224
992543.6700096349916-18.6700096349916
1008064.789940361547615.2100596384524
1012647.3922885671301-21.3922885671301
1027859.088992515840818.9110074841592
1031044.7576937274893-34.7576937274893
1047056.006062156905213.9939378430948
105047.3591338613909-47.3591338613909
1066568.0307290686522-3.03072906865219
1078065.292339025622514.7076609743775
1086062.3297812229454-2.32978122294539
1096756.973373693144510.0266263068555
1104962.7615393893706-13.7615393893706
1117059.798981586693510.2010184133065
1126662.96912979614843.03087020385165
1136551.255848494568113.7441515054319
1146557.49234971008897.50765028991107
1154068.9648858991523-28.9648858991523
1164060.317957603638-20.3179576036380
1172072.238829311996-52.238829311996
1189057.907530523644532.0924694763555
1194866.5378814662892-18.5378814662892
1202569.4838619160967-44.4838619160967
1213560.8369336205824-25.8369336205824
1224058.3227113372001-18.3227113372001
1237761.044524027360215.9554759726398
1247040.804686986524129.1953130134759
1258264.094299680556617.9057003194434
1268061.355909637526918.6440903624731
1275241.116072596690810.8839274033092
1287155.879129551467515.1208704485325
1297061.66729524769368.33270475230642
1305059.1530729643112-9.15307296431125
1317259.256868167700112.7431318322999
1328065.045033863926214.9549661360737
1339170.833199560152420.1668004398476
1341844.4606565071843-26.4606565071843
1357053.539342969123816.4606570308762
1367659.327508665349916.6724913346501
1376568.4061951272893-3.40619512728933
1383568.5099903306782-33.5099903306782
1396268.6137855340671-6.61378553406712
1407668.7175807374567.28241926254398
1415060.2948202015891-10.2948202015891
1426863.24080065139664.7591993486034
1438063.120428095138116.8795719048619
1449069.35692931065920.6430706893410
1457954.801462762660124.1985372373399
1463048.9967197135644-18.9967197135644
1476055.00905316943794.99094683056212


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.670563943848790.6588721123024210.329436056151211
80.6105759117650040.7788481764699920.389424088234996
90.4713547035889850.942709407177970.528645296411015
100.3491345561705540.6982691123411080.650865443829446
110.2419291332211310.4838582664422610.75807086677887
120.2786493367191760.5572986734383520.721350663280824
130.6996931880299480.6006136239401050.300306811970052
140.6298207518760720.7403584962478560.370179248123928
150.5402869101388190.9194261797223610.459713089861181
160.8009988949210120.3980022101579770.199001105078989
170.7384781317110320.5230437365779360.261521868288968
180.6891423911038450.621715217792310.310857608896155
190.6490545327326490.7018909345347020.350945467267351
200.7582940552640230.4834118894719540.241705944735977
210.82963108217020.3407378356596010.170368917829800
220.9153650127517550.1692699744964890.0846349872482447
230.8897970897872140.2204058204255710.110202910212786
240.8698820316218390.2602359367563220.130117968378161
250.8347526779229160.3304946441541690.165247322077085
260.7959174806598580.4081650386802840.204082519340142
270.7786887865313120.4426224269373760.221311213468688
280.781616037385130.4367679252297410.218383962614871
290.855924187426530.2881516251469410.144075812573471
300.8243519994039460.3512960011921090.175648000596054
310.7932128699214580.4135742601570840.206787130078542
320.7962373918804870.4075252162390260.203762608119513
330.8079138311204680.3841723377590630.192086168879532
340.7961611940179050.4076776119641910.203838805982095
350.7540457159123830.4919085681752340.245954284087617
360.7102569130012240.5794861739975530.289743086998777
370.6987485528561170.6025028942877670.301251447143883
380.6560371227367090.6879257545265820.343962877263291
390.6196295337828940.7607409324342130.380370466217106
400.6383015912023030.7233968175953950.361698408797697
410.6166280975445960.7667438049108090.383371902455404
420.5694136351090880.8611727297818240.430586364890912
430.5381915358829420.9236169282341160.461808464117058
440.6226074774313660.7547850451372670.377392522568634
450.629728622959770.740542754080460.37027137704023
460.6349926986292430.7300146027415140.365007301370757
470.6555716702504680.6888566594990650.344428329749532
480.6212991276136740.7574017447726510.378700872386326
490.6086535041077970.7826929917844060.391346495892203
500.563054556009130.873890887981740.43694544399087
510.5167871716592110.9664256566815780.483212828340789
520.5446354133761290.9107291732477420.455364586623871
530.5122128247174630.9755743505650740.487787175282537
540.5018110080387840.9963779839224330.498188991961216
550.4543240641851360.9086481283702730.545675935814864
560.4086814888658420.8173629777316850.591318511134158
570.3975097537797940.7950195075595880.602490246220206
580.3679231298551740.7358462597103470.632076870144826
590.3470156738455930.6940313476911850.652984326154407
600.3483406200515340.6966812401030680.651659379948466
610.3122677681783120.6245355363566240.687732231821688
620.3044360780185940.6088721560371890.695563921981406
630.2718270671558930.5436541343117870.728172932844107
640.2467000845536290.4934001691072580.753299915446371
650.3771481892884150.7542963785768290.622851810711585
660.3419487063183110.6838974126366220.658051293681689
670.3079829989413840.6159659978827670.692017001058616
680.3616861907572660.7233723815145320.638313809242734
690.3487359278592670.6974718557185340.651264072140733
700.3340905707031710.6681811414063420.665909429296829
710.4979478327521720.9958956655043440.502052167247828
720.5992851894999790.8014296210000430.400714810500021
730.5591826897570830.8816346204858340.440817310242917
740.5632223567767150.873555286446570.436777643223285
750.5636637704878210.8726724590243580.436336229512179
760.5334791619016170.9330416761967650.466520838098383
770.5158060881112930.9683878237774130.484193911888707
780.5117957183955670.9764085632088660.488204281604433
790.6318869322557840.7362261354884330.368113067744216
800.745211257065780.509577485868440.25478874293422
810.7902516399776370.4194967200447270.209748360022363
820.7616249252880380.4767501494239250.238375074711962
830.746007406226460.507985187547080.25399259377354
840.708487826170950.5830243476581010.291512173829050
850.6933136178983380.6133727642033240.306686382101662
860.6946511079950570.6106977840098860.305348892004943
870.8222919963062710.3554160073874570.177708003693729
880.8092227812137680.3815544375724650.190777218786232
890.8756561204344870.2486877591310250.124343879565513
900.8572398211582320.2855203576835350.142760178841768
910.8339974641239380.3320050717521230.166002535876062
920.8141509598547370.3716980802905250.185849040145263
930.7837168066227360.4325663867545270.216283193377264
940.755645336511530.4887093269769410.244354663488471
950.7206411792512970.5587176414974060.279358820748703
960.7083673813275610.5832652373448770.291632618672439
970.6725819885043570.6548360229912860.327418011495643
980.7006916355414250.5986167289171510.299308364458576
990.6719311912340620.6561376175318770.328068808765939
1000.6659512466683130.6680975066633740.334048753331687
1010.6505934605729960.6988130788540080.349406539427004
1020.6599823270982150.6800353458035690.340017672901785
1030.7349923496056840.5300153007886330.265007650394316
1040.7327134964706390.5345730070587220.267286503529361
1050.8625402514922150.2749194970155690.137459748507785
1060.8327419005154620.3345161989690760.167258099484538
1070.8324685884531230.3350628230937540.167531411546877
1080.7983238883904080.4033522232191840.201676111609592
1090.7663570677255890.4672858645488230.233642932274411
1100.7276112931927180.5447774136145640.272388706807282
1110.7051877797629910.5896244404740180.294812220237009
1120.6643340627146320.6713318745707370.335665937285368
1130.6404556673220770.7190886653558460.359544332677923
1140.598620864029850.8027582719402990.401379135970149
1150.5782872276905460.8434255446189070.421712772309454
1160.5417681071004840.9164637857990320.458231892899516
1170.7279875463767580.5440249072464850.272012453623242
1180.7865563204308430.4268873591383140.213443679569157
1190.7577387322330450.484522535533910.242261267766955
1200.8979614101505180.2040771796989630.102038589849482
1210.9402791032140780.1194417935718440.0597208967859222
1220.9664412579365380.06711748412692370.0335587420634618
1230.9519423440793180.09611531184136380.0480576559206819
1240.9546273980409920.09074520391801610.0453726019590081
1250.9383994411111210.1232011177777570.0616005588888786
1260.9211540870438540.1576918259122930.0788459129561464
1270.898041455455640.2039170890887190.101958544544360
1280.8748539374628010.2502921250743980.125146062537199
1290.8317979147803910.3364041704392180.168202085219609
1300.8009520812010360.3980958375979290.199047918798964
1310.7388765601710490.5222468796579030.261123439828951
1320.6891183135829490.6217633728341020.310881686417051
1330.6831020137566690.6337959724866620.316897986243331
1340.6982584447980240.6034831104039530.301741555201976
1350.7120661431642990.5758677136714030.287933856835701
1360.8627914221345190.2744171557309620.137208577865481
1370.8358896611338350.3282206777323310.164110338866165
1380.8834388873938330.2331222252123340.116561112606167
1390.8121003892376060.3757992215247870.187899610762394
1400.6695699327482010.6608601345035980.330430067251799


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 level30.0223880597014925OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/10n4xs1290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/10n4xs1290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/1y3ih1290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/1y3ih1290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/29czk1290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/29czk1290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/39czk1290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/39czk1290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/49czk1290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/49czk1290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/59czk1290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/59czk1290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/61lg51290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/61lg51290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/7cdy81290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/7cdy81290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/8cdy81290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/8cdy81290532276.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/9cdy81290532276.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532383j4oxk6db70rwscw/9cdy81290532276.ps (open in new window)


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