Home » date » 2010 » Dec » 01 »

Workshop

*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, 01 Dec 2010 17:12:06 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal.htm/, Retrieved Wed, 01 Dec 2010 18:11:22 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal.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 «
2 5 2 3 3 4 4 2 4 2 4 3 4 4 4 4 2 4 2 5 4 2 4 2 2 2 2 4 3 2 2 2 3 2 4 4 5 1 3 2 4 5 3 5 1 2 1 4 4 3 4 3 3 3 4 3 3 3 2 3 2 4 4 2 4 1 3 2 2 4 4 4 4 3 3 3 4 4 2 2 4 2 4 4 3 3 3 2 2 3 4 3 3 2 2 2 4 2 4 4 1 1 3 4 3 4 5 1 1 1 4 4 3 4 2 3 3 4 3 3 2 2 2 2 2 2 3 4 2 2 3 4 4 4 4 2 3 4 4 3 2 4 1 4 2 4 3 5 4 2 4 3 3 4 4 4 4 3 5 2 3 2 4 2 2 2 4 3 3 5 2 3 2 2 4 4 4 2 4 3 3 4 4 4 2 3 2 4 4 3 4 2 2 2 3 4 4 4 3 1 2 4 4 4 4 2 3 2 4 4 1 4 1 2 3 4 5 4 4 4 4 4 4 4 5 2 1 4 1 4 4 2 4 2 5 3 4 4 4 4 2 2 3 4 3 3 5 2 4 2 5 4 2 5 2 4 1 4 3 4 4 2 2 1 2 4 5 3 2 4 2 4 4 4 4 2 4 2 4 3 4 5 2 2 2 5 5 4 4 2 3 1 4 4 3 4 2 2 2 2 3 4 5 2 4 1 4 3 2 4 2 3 2 4 3 2 5 1 1 2 4 4 4 4 2 2 4 2 4 2 4 1 5 2 5 4 4 4 2 2 2 4 4 4 3 1 4 2 4 4 1 4 1 4 1 4 4 4 4 2 2 2 4 4 2 4 2 2 2 4 5 1 2 1 2 1 3 3 4 3 5 4 5 5 3 3 5 2 3 2 4 5 2 4 2 4 2 4 5 4 4 1 2 2 4 4 3 5 1 3 1 4 4 2 3 2 2 3 2 3 2 5 2 2 1 4 4 3 4 1 3 1 4 4 2 5 1 2 2 4 5 1 4 2 3 3 4 4 3 4 1 2 2 3 4 2 5 1 4 2 4 5 3 4 2 2 2 2 4 3 4 1 5 4 4 3 3 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
neat[t] = + 2.66020802501524 -0.0216461795712711standards[t] + 0.317101533122638organization[t] -0.12757403167846punished[t] + 0.0145397512907747secondrate[t] -0.0551812777793777mistakes[t] + 0.0489105933244106competent[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.660208025015240.4257396.248400
standards-0.02164617957127110.065713-0.32940.7423030.371151
organization0.3171015331226380.0712394.45121.6e-058e-06
punished-0.127574031678460.073232-1.7420.0835240.041762
secondrate0.01453975129077470.0629160.23110.8175490.408774
mistakes-0.05518127777937770.070596-0.78160.4356360.217818
competent0.04891059332441060.0784230.62370.5337760.266888


Multiple Linear Regression - Regression Statistics
Multiple R0.41006257220594
R-squared0.168151313124152
Adjusted R-squared0.135315180747473
F-TEST (value)5.12092323161605
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value8.09002176053175e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.73968317220331
Sum Squared Residuals83.1639416765942


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.0209930619608-0.0209930619608009
243.718431280128930.281568719871066
343.779230792090180.220769207909820
443.646711868677940.353288131322058
542.935681345082021.06431865491798
654.160456012276090.839543987723907
744.22274371833597-0.222743718335967
833.55467131758843-0.554671317588429
943.420325093923630.579674906076371
1043.788825651647180.211174348352824
1143.356540513014290.643459486985713
1243.096117132520500.903882867479505
1343.229300717629980.770699282370017
1423.40578534263285-1.40578534263285
1533.75909369879253-0.759093698792528
1644.18655778747392-0.186557787473921
1733.68224534926689-0.682245349266889
1822.99086262286140-0.990862622861395
1943.667705597976110.332294402023886
2033.60541789191624-0.60541789191624
2133.90118658958677-0.901186589586772
2243.604582148090710.395417851909289
2333.19726736413112-0.197267364131121
2433.74453305532676-0.744533055326763
2543.956706973520080.0432930264799172
2643.626228327661980.373771672338018
2743.715780447474990.284219552525005
2843.673976282431080.326023717568919
2943.559126913214990.440873086785014
3043.715780447474990.284219552525005
3153.838571988797121.16142801120288
3243.364809579850090.635190420149906
3343.257226262407060.742773737592938
3443.732971031419710.267028968580291
3533.64605941840484-0.646059418404843
3644.11797850478409-0.117978504784089
3734.14589536881033-1.14589536881033
3843.658600787314780.341399212685223
3943.391572486071860.608427513928139
4033.73032019876577-0.73032019876577
4154.067252822631270.932747177368731
4243.770961725254370.229038274745627
4333.62506568910667-0.62506568910667
4434.10260300966779-1.10260300966779
4533.75907280661754-0.759072806617537
4644.17466886883709-0.174668868837086
4743.493056953976640.506943046023356
4843.964636934201960.0353630657980426
4943.701240696184220.298759303815780
5043.540792697321590.459207302678408
5143.978014046937420.0219859530625790
5243.701240696184220.298759303815780
5353.744533055326761.25546694467324
5433.26582088478619-0.265820884786186
5532.913863330594030.0861366694059704
5654.05452816016890.945471839831096
5753.773612557908311.22638744209169
5843.828814727862680.171185272137319
5944.23728346962674-0.237283469626742
6033.27442905777593-0.274429057775926
6144.11681586622878-0.116815866228778
6243.920181936504100.0798180634958958
6354.189208620127860.81079137987214
6443.725537708409430.274462291590569
6543.801550314109540.198449685890459
6654.218288122709410.78171187729059
6743.625065689106670.374934310893329
6833.78371760574752-0.78371760574752
6944.20820396704519-0.208203967045192
7043.759072806617540.240927193382463
7143.533359374311310.466640625688686
7243.872107087005220.127892912994777
7343.905307948919170.0946920510808273
7443.870937106885540.129062893114463
7544.10260300966779-0.102603009667785
7633.74453305532676-0.744533055326763
7743.865000658724730.134999341275274
7833.91984770020995-0.919847700209948
7954.039988408878130.960011591121871
8043.75642197396360.243578026036402
8153.980351535472191.01964846452781
8253.307964155984031.69203584401597
8343.775448538911710.224551461088287
8443.495003226151710.504996773848289
8543.892917522750960.107082477249035
8643.808983637119820.191016362880181
8743.8866468382960.113353161704003
8854.229850146616460.770149853383537
8943.460632384118080.539367615881925
9033.77806815353487-0.778068153534869
9143.701240696184220.298759303815780
9234.18093955329205-1.18093955329205
9343.569545305173360.43045469482664
9443.533359374311310.466640625688686
9543.871772850711070.128227149288934
9643.723715278016650.276284721983354
9743.559106021039990.440893978960005
9833.5692110688792-0.569211068879203
9933.65860078731478-0.658600787314777
10033.72915756021046-0.729157560210459
10133.53929582247212-0.539295822472124
10233.85673159188892-0.856731591888919
10323.54013156629765-1.54013156629765
10433.74453305532676-0.744533055326763
10553.956706973520081.04329302647992
10623.16021992740878-1.16021992740878
10723.67397628243108-1.67397628243108
10832.869721677015340.130278322984658
10933.64338769357591-0.643387693575913
11034.07684768218826-1.07684768218826
11143.448262850124860.551737149875142
11243.605417891916240.39458210808376
11333.55054995825603-0.550549958256028
11423.64455033213122-1.64455033213122
11533.54461837995499-0.544618379954994
11643.743697311501230.256302688498766
11723.08157738122972-1.08157738122972
11842.948719351663551.05128064833645
11943.517649642900850.482350357099147
12023.49071946544187-1.49071946544187
12133.92018193650410-0.920181936504104
12233.35687474930844-0.356874749308444
12333.30729081353594-0.307290813535944
12444.11054518177381-0.110545181773811
12543.816925809225840.183074190774155
12643.364308072318720.635691927681278
12733.8641649148992-0.864164914899197
12843.688516033721860.311483966278144
12943.816090065400320.183909934599684
13043.682245349266890.317754650733111
13123.28564463396467-1.28564463396467
13243.673976282431080.326023717568919
13353.716453789923081.28354621007692
13443.849625163608420.150374836391578
13543.646711868677940.353288131322058
13643.715780447474990.284219552525005
13733.55500555388259-0.555005553882585
13813.64605941840484-2.64605941840484
13943.665033873147180.334966126852816
14032.778354468373920.221645531626081
14133.02904693610428-0.0290469361042816
14233.5673750878758-0.567375087875803
14312.44821492866975-1.44821492866975
14443.92728836478460.0727116352153995
14553.27110488267391.72889511732610
14643.696785100557660.303214899442337
14733.48377543853881-0.483775438538814
14843.068852718767360.931147281232645
14933.04871562546970-0.0487156254697031
15043.475172135408850.52482786459115
15143.41948935009810.580510649901901
15243.715780447474990.284219552525005
15353.663218784318771.33678121568123
15423.14570106829300-1.14570106829300
15533.63745611527488-0.637456115274879
15633.67397628243108-0.673976282431081
15743.786337220370680.213662779629323
15843.460632384118080.539367615881925
15932.935347108787860.064652891212139


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.2130169495100120.4260338990200240.786983050489988
110.1656186094230380.3312372188460770.834381390576962
120.08338256263511590.1667651252702320.916617437364884
130.0684998885042550.136999777008510.931500111495745
140.3630352081399820.7260704162799640.636964791860018
150.2769002268158280.5538004536316570.723099773184172
160.2010126107872720.4020252215745440.798987389212728
170.1857817896607730.3715635793215460.814218210339227
180.458396567588590.916793135177180.54160343241141
190.4695488477240830.9390976954481670.530451152275917
200.4638552189364520.9277104378729050.536144781063548
210.5022769172986090.9954461654027830.497723082701391
220.4635071080786470.9270142161572940.536492891921353
230.4300161932146550.860032386429310.569983806785345
240.3795012369495070.7590024738990150.620498763050493
250.3326241730497230.6652483460994450.667375826950278
260.2712622943855630.5425245887711270.728737705614437
270.2164191253723830.4328382507447650.783580874627617
280.1782696776571950.356539355314390.821730322342805
290.1521161450457790.3042322900915580.847883854954221
300.1158536207200730.2317072414401450.884146379279927
310.3330531105803210.6661062211606430.666946889419679
320.2971453688546540.5942907377093070.702854631145346
330.2630839990008370.5261679980016740.736916000999163
340.2158355832821930.4316711665643860.784164416717807
350.1981922969789670.3963845939579340.801807703021033
360.1617585857730320.3235171715460640.838241414226968
370.2391992645468840.4783985290937690.760800735453116
380.198900722288610.397801444577220.80109927771139
390.1696604825113320.3393209650226630.830339517488669
400.1869617705522650.3739235411045310.813038229447735
410.2331622578935400.4663245157870790.76683774210646
420.1936731428955420.3873462857910840.806326857104458
430.1873001880838030.3746003761676050.812699811916197
440.2364829315185680.4729658630371360.763517068481432
450.2292007821540320.4584015643080640.770799217845968
460.1926295059903220.3852590119806430.807370494009679
470.1662169956113450.3324339912226890.833783004388655
480.1363662944444640.2727325888889270.863633705555537
490.1126916926008220.2253833852016430.887308307399178
500.09422528131826140.1884505626365230.905774718681739
510.07678837203048450.1535767440609690.923211627969516
520.06183157956560610.1236631591312120.938168420434394
530.1087265054365420.2174530108730840.891273494563458
540.09109347299153930.1821869459830790.90890652700846
550.07441021948918060.1488204389783610.92558978051082
560.0927742921491610.1855485842983220.907225707850839
570.1379333414160440.2758666828320880.862066658583956
580.1133290431882460.2266580863764920.886670956811754
590.0925410026710410.1850820053420820.907458997328959
600.07747633912385010.1549526782477000.92252366087615
610.06144647371176710.1228929474235340.938553526288233
620.04786230629031470.09572461258062940.952137693709685
630.05299640422000230.1059928084400050.947003595779998
640.04223309432554160.08446618865108330.957766905674458
650.03282388052684320.06564776105368650.967176119473157
660.03408627869696880.06817255739393760.965913721303031
670.02753732266538750.05507464533077490.972462677334613
680.03068082018517840.06136164037035680.969319179814822
690.02374327881624140.04748655763248270.976256721183759
700.01816687498329620.03633374996659230.981833125016704
710.01494646617060680.02989293234121360.985053533829393
720.01105692025785680.02211384051571360.988943079742143
730.008042513934300830.01608502786860170.9919574860657
740.005794112859078510.01158822571815700.994205887140922
750.004139346906445450.00827869381289090.995860653093555
760.0043829598894630.0087659197789260.995617040110537
770.003115215541066670.006230431082133340.996884784458933
780.003907930289383420.007815860578766840.996092069710617
790.005132935096411290.01026587019282260.994867064903589
800.003755722799132460.007511445598264920.996244277200868
810.005433648098973770.01086729619794750.994566351901026
820.01864374238565540.03728748477131080.981356257614345
830.01468714285992180.02937428571984350.985312857140078
840.01224970175777450.0244994035155490.987750298242225
850.009036238321876610.01807247664375320.990963761678123
860.006840936337552560.01368187267510510.993159063662447
870.004996704133279020.009993408266558030.99500329586672
880.005393403569569290.01078680713913860.99460659643043
890.004489371593114370.008978743186228730.995510628406886
900.004832156480669650.00966431296133930.99516784351933
910.003687176778059070.007374353556118130.99631282322194
920.005981769850035130.01196353970007030.994018230149965
930.004843133519403520.009686267038807030.995156866480597
940.004066601961958370.008133203923916730.995933398038042
950.002942426694397990.005884853388795970.997057573305602
960.002410012757147010.004820025514294030.997589987242853
970.001803618412237700.003607236824475400.998196381587762
980.001549449142343270.003098898284686550.998450550857657
990.001476344393273310.002952688786546620.998523655606727
1000.001495372219239690.002990744438479370.99850462778076
1010.001243085491396590.002486170982793170.998756914508603
1020.001394538426303440.002789076852606880.998605461573697
1030.004504533676805330.009009067353610670.995495466323195
1040.004491440641112740.008982881282225470.995508559358887
1050.006568228091305920.01313645618261180.993431771908694
1060.01083891486859210.02167782973718420.989161085131408
1070.03389972526866750.06779945053733510.966100274731332
1080.02595412439376390.05190824878752770.974045875606236
1090.02460256762325670.04920513524651350.975397432376743
1100.03771486951599050.0754297390319810.96228513048401
1110.03442140629610220.06884281259220440.965578593703898
1120.04094527515069750.0818905503013950.959054724849302
1130.03459277556260370.06918555112520750.965407224437396
1140.06335043789945190.1267008757989040.936649562100548
1150.05351396798249280.1070279359649860.946486032017507
1160.04169156321211330.08338312642422650.958308436787887
1170.04859760723720240.09719521447440490.951402392762798
1180.0501738040238580.1003476080477160.949826195976142
1190.04204013531293230.08408027062586470.957959864687068
1200.1168797821070150.2337595642140300.883120217892985
1210.1405597912477650.2811195824955310.859440208752235
1220.1248505873235560.2497011746471130.875149412676444
1230.1072267222013330.2144534444026660.892773277798667
1240.08339062454538770.1667812490907750.916609375454612
1250.07218392343281540.1443678468656310.927816076567185
1260.06435764371690360.1287152874338070.935642356283096
1270.08541060880635930.1708212176127190.91458939119364
1280.06510752082070440.1302150416414090.934892479179296
1290.04826672335561550.0965334467112310.951733276644384
1300.04764846903257670.09529693806515350.952351530967423
1310.1078250613175010.2156501226350030.892174938682499
1320.08324403515848720.1664880703169740.916755964841513
1330.1800121781410310.3600243562820620.819987821858969
1340.1403490784566010.2806981569132010.8596509215434
1350.1113403653003010.2226807306006010.8886596346997
1360.09044852818092260.1808970563618450.909551471819077
1370.0688607286235270.1377214572470540.931139271376473
1380.3527473944420350.7054947888840710.647252605557965
1390.2922145230187140.5844290460374280.707785476981286
1400.2300948652867820.4601897305735650.769905134713218
1410.2067228732185010.4134457464370020.793277126781499
1420.2994331736758350.5988663473516710.700566826324165
1430.4243886310738640.8487772621477280.575611368926136
1440.3295784479261730.6591568958523460.670421552073827
1450.5007832911173620.9984334177652750.499216708882638
1460.5167105223952990.9665789552094010.483289477604701
1470.566502083262820.866995833474360.43349791673718
1480.4534923017362410.9069846034724810.546507698263759
1490.4704711869933880.9409423739867770.529528813006612


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level210.15NOK
5% type I error level390.278571428571429NOK
10% type I error level560.4NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/10vr3r1291223515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/10vr3r1291223515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/1ey321291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/1ey321291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/2ey321291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/2ey321291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/3pqk51291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/3pqk51291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/4pqk51291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/4pqk51291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/5pqk51291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/5pqk51291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/6zh181291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/6zh181291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/7sqjb1291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/7sqjb1291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/8sqjb1291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/8sqjb1291223514.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/9sqjb1291223514.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223482q3unjhhi2pfixal/9sqjb1291223514.ps (open in new window)


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