Home » date » 2010 » Dec » 02 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 02 Dec 2010 15:46:25 +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/02/t12913051796gixpaceyccarc8.htm/, Retrieved Thu, 02 Dec 2010 16:52:59 +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/02/t12913051796gixpaceyccarc8.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 «
4 4 4 4 4 3 5 5 4 2 3 4 2 4 4 4 3 4 4 4 4 4 3 4 4 2 2 2 4 4 3 2 3 4 2 2 3 2 2 4 1 3 4 4 4 4 4 5 4 2 4 2 2 2 4 3 4 4 3 3 4 3 4 3 4 2 2 3 2 4 2 4 2 2 4 3 4 4 4 4 4 3 3 3 4 4 4 4 2 5 4 4 4 4 4 4 4 5 4 4 5 4 4 4 4 5 4 4 4 4 4 2 2 4 4 4 4 4 4 5 5 4 4 4 3 4 2 2 2 4 3 4 4 4 4 4 3 4 2 2 4 5 4 4 4 4 4 4 3 4 4 4 3 4 3 4 4 4 4 3 2 4 5 4 3 4 4 3 4 4 4 4 4 4 4 3 5 2 1 3 4 3 4 4 3 4 4 4 4 4 2 4 3 3 4 4 5 4 2 4 4 4 4 4 4 3 4 4 4 4 4 2 4 4 3 4 4 4 4 3 3 3 4 4 4 4 4 4 4 3 3 4 3 4 4 2 4 4 4 4 4 3 4 2 2 4 3 2 2 5 3 4 3 2 3 3 2 3 4 4 4 4 4 4 4 4 4 4 2 3 4 2 2 3 4 5 4 2 2 4 3 4 4 3 4 5 5 4 4 3 3 4 4 4 2 3 3 3 2 4 3 4 4 3 3 3 4 3 2 4 3 4 2 4 3 3 1 2 3 3 3 4 2 4 4 3 4 2 2 4 3 2 2 4 2 2 4 4 3 5 5 5 3 5 4 3 3 4 4 4 4 3 4 4 3 3 4 2 2 3 4 4 4 3 2 4 4 3 3 5 2 4 4 2 3 3 2 4 3 4 4 3 4 4 3 4 4 4 4 4 4 3 4 3 2 4 2 4 5 3 3 2 2 2 4 4 4 4 4 3 3 4 3 3 4 3 4 4 3 4 4 3 3 5 4 4 3 5 1 4 2 3 4 2 4 4 4 4 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
Goals[t] = + 0.779741026497208 + 0.311165646709790Competent[t] + 0.349589111529403Focus[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.7797410264972080.4265981.82780.0694880.034744
Competent0.3111656467097900.0890643.49370.000620.00031
Focus0.3495891115294030.0975393.58410.0004520.000226


Multiple Linear Regression - Regression Statistics
Multiple R0.415329063708261
R-squared0.172498231160780
Adjusted R-squared0.161889234124380
F-TEST (value)16.2596172445827
F-TEST (DF numerator)2
F-TEST (DF denominator)156
p-value3.85457589291427e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.883248696608336
Sum Squared Residuals121.700008569411


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
143.422760059453980.577239940546016
243.073170947924580.926829052075423
353.733925706163771.26607429383623
432.80042876603440.199571233965598
542.80042876603441.19957123396560
633.42276005945398-0.422760059453981
743.422760059453980.577239940546019
833.42276005945398-0.422760059453981
922.72358183639517-0.723581836395174
1042.80042876603441.19957123396560
1122.76200530121479-0.762005301214788
1222.72358183639517-0.723581836395174
1322.41241618968538-0.412416189685384
1413.07317094792458-2.07317094792458
1543.422760059453980.577239940546019
1643.772349170983380.227650829016616
1723.42276005945398-1.42276005945398
1822.10125054297559-0.101250542975595
1933.42276005945398-0.422760059453981
2033.07317094792458-0.0731709479245774
2133.42276005945398-0.422760059453981
2242.412416189685381.58758381031462
2332.101250542975590.898749457024405
2423.42276005945398-1.42276005945398
2522.8004287660344-0.800428766034402
2643.111594412744190.888405587255809
2743.422760059453980.577239940546019
2832.762005301214790.237994698785212
2943.422760059453980.577239940546019
3023.77234917098338-1.77234917098338
3143.422760059453980.577239940546019
3243.422760059453980.577239940546019
3353.422760059453981.57723994054602
3453.422760059453981.57723994054602
3543.422760059453980.577239940546019
3643.733925706163770.266074293836230
3743.422760059453980.577239940546019
3822.8004287660344-0.800428766034402
3943.422760059453980.577239940546019
4043.772349170983380.227650829016616
4143.733925706163770.266074293836230
4233.42276005945398-0.422760059453981
4322.10125054297559-0.101250542975595
4433.42276005945398-0.422760059453981
4543.422760059453980.577239940546019
4633.42276005945398-0.422760059453981
4722.8004287660344-0.800428766034402
4843.733925706163770.266074293836230
4943.422760059453980.577239940546019
5033.42276005945398-0.422760059453981
5143.073170947924580.926829052075423
5233.42276005945398-0.422760059453981
5343.422760059453980.577239940546019
5423.11159441274419-1.11159441274419
5543.384336594634370.615663405365633
5643.073170947924580.926829052075423
5743.422760059453980.577239940546019
5843.422760059453980.577239940546019
5933.77234917098338-0.772349170983384
6012.450839654505-1.45083965450500
6133.42276005945398-0.422760059453981
6233.42276005945398-0.422760059453981
6343.422760059453980.577239940546019
6423.42276005945398-1.42276005945398
6533.11159441274419-0.111594412744191
6653.422760059453981.57723994054602
6742.80042876603441.19957123396560
6843.422760059453980.577239940546019
6933.42276005945398-0.422760059453981
7043.422760059453980.577239940546019
7123.42276005945398-1.42276005945398
7233.42276005945398-0.422760059453981
7343.422760059453980.577239940546019
7432.762005301214790.237994698785212
7543.422760059453980.577239940546019
7643.422760059453980.577239940546019
7733.07317094792458-0.0731709479245774
7833.42276005945398-0.422760059453981
7923.42276005945398-1.42276005945398
8043.422760059453980.577239940546019
8133.42276005945398-0.422760059453981
8222.8004287660344-0.800428766034402
8322.41241618968538-0.412416189685384
8433.73392570616377-0.73392570616377
8522.76200530121479-0.762005301214788
8622.76200530121479-0.762005301214788
8743.422760059453980.577239940546019
8843.422760059453980.577239940546019
8943.422760059453980.577239940546019
9023.07317094792458-1.07317094792458
9122.72358183639517-0.723581836395174
9243.461183524273590.538816475726405
9322.72358183639517-0.723581836395174
9433.42276005945398-0.422760059453981
9533.42276005945398-0.422760059453981
9653.733925706163771.26607429383623
9733.07317094792458-0.0731709479245774
9843.422760059453980.577239940546019
9932.4508396545050.549160345495002
10023.11159441274419-1.11159441274419
10143.111594412744190.888405587255809
10232.762005301214790.237994698785212
10332.723581836395170.276418163604826
10433.42276005945398-0.422760059453981
10542.4508396545051.54916034549500
10612.41241618968538-1.41241618968538
10732.762005301214790.237994698785212
10823.42276005945398-1.42276005945398
10933.42276005945398-0.422760059453981
11022.8004287660344-0.800428766034402
11122.41241618968538-0.412416189685384
11222.72358183639517-0.723581836395174
11343.073170947924580.926829052075423
11454.083514817693170.916485182306826
11553.111594412744191.88840558725581
11633.11159441274419-0.111594412744191
11743.422760059453980.577239940546019
11843.111594412744190.888405587255809
11933.11159441274419-0.111594412744191
12022.450839654505-0.450839654504998
12143.422760059453980.577239940546019
12223.11159441274419-1.11159441274419
12333.07317094792458-0.0731709479245774
12423.73392570616377-1.73392570616377
12523.07317094792458-1.07317094792458
12623.11159441274419-1.11159441274419
12743.111594412744190.888405587255809
12843.111594412744190.888405587255809
12943.111594412744190.888405587255809
13043.422760059453980.577239940546019
13133.42276005945398-0.422760059453981
13223.11159441274419-1.11159441274419
13343.150017877563810.849982122436195
13432.412416189685380.587583810314615
13522.8004287660344-0.800428766034402
13643.422760059453980.577239940546019
13733.07317094792458-0.0731709479245774
13833.07317094792458-0.0731709479245774
13933.42276005945398-0.422760059453981
14033.42276005945398-0.422760059453981
14133.07317094792458-0.0731709479245774
14243.733925706163770.266074293836230
14352.062827078155982.93717292184402
14423.07317094792458-1.07317094792458
14523.42276005945398-1.42276005945398
14643.422760059453980.577239940546019
14733.73392570616377-0.73392570616377
14833.11159441274419-0.111594412744191
14912.450839654505-1.45083965450500
15023.42276005945398-1.42276005945398
15143.111594412744190.888405587255809
15243.422760059453980.577239940546019
15353.733925706163771.26607429383623
15423.11159441274419-1.11159441274419
15542.762005301214791.23799469878521
15633.11159441274419-0.111594412744191
15723.73392570616377-1.73392570616377
15843.073170947924580.926829052075423
15922.450839654505-0.450839654504998


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.5332452639650520.9335094720698950.466754736034948
70.3637554887626970.7275109775253940.636244511237303
80.3899130947114920.7798261894229850.610086905288508
90.4205821727192540.8411643454385080.579417827280746
100.3636815910693590.7273631821387180.636318408930641
110.3659764453733960.7319528907467930.634023554626604
120.2741147963812100.5482295927624190.72588520361879
130.1985149227522750.397029845504550.801485077247725
140.5599937674272240.8800124651455530.440006232572776
150.4787098998018380.9574197996036760.521290100198162
160.4412554728581440.8825109457162870.558744527141856
170.6237012420880120.7525975158239750.376298757911988
180.5513172147656450.897365570468710.448682785234355
190.4985745533446090.9971491066892170.501425446655391
200.4306025169722780.8612050339445560.569397483027722
210.380156032566490.760312065132980.61984396743351
220.6207582628732020.7584834742535950.379241737126798
230.5946647023758780.8106705952482440.405335297624122
240.6787739439647890.6424521120704220.321226056035211
250.727054970375530.5458900592489390.272945029624470
260.7110584991760940.5778830016478110.288941500823906
270.6831711425800370.6336577148399260.316828857419963
280.6280388088230950.7439223823538110.371961191176905
290.5958495448562780.8083009102874430.404150455143722
300.7462696991707760.5074606016584490.253730300829224
310.7245662963413970.5508674073172050.275433703658602
320.7001730304702990.5996539390594020.299826969529701
330.7953935956430870.4092128087138260.204606404356913
340.8611533400087170.2776933199825670.138846659991283
350.8394229208562840.3211541582874330.160577079143716
360.8081105348634330.3837789302731340.191889465136567
370.7811170055998280.4377659888003430.218882994400172
380.792720122476590.4145597550468190.207279877523410
390.7650976952556460.4698046094887070.234902304744354
400.7235231244871960.5529537510256080.276476875512804
410.6804931351360870.6390137297278260.319506864863913
420.6476554898308390.7046890203383230.352344510169161
430.6000435212917150.799912957416570.399956478708285
440.5647895375718840.8704209248562320.435210462428116
450.5304878772513170.9390242454973670.469512122748683
460.4949027547058750.989805509411750.505097245294125
470.4961755302625610.9923510605251230.503824469737439
480.448748278104710.897496556209420.55125172189529
490.4161628159860540.8323256319721080.583837184013946
500.3822546567000590.7645093134001180.617745343299941
510.3814732358104490.7629464716208980.618526764189551
520.3488396509449090.6976793018898170.651160349055091
530.3197241035452080.6394482070904160.680275896454792
540.3508561614957240.7017123229914480.649143838504276
550.3228398831216680.6456797662433350.677160116878332
560.3204280926880690.6408561853761380.679571907311931
570.2931427740346930.5862855480693860.706857225965307
580.2670534602830870.5341069205661740.732946539716913
590.2600184991668790.5200369983337580.739981500833121
600.3292117531338650.658423506267730.670788246866135
610.2988900890171160.5977801780342320.701109910982884
620.2696866045470950.5393732090941910.730313395452905
630.2463204688768710.4926409377537420.753679531123129
640.314028519169140.628057038338280.68597148083086
650.2739562194205060.5479124388410130.726043780579494
660.3613367390592630.7226734781185270.638663260940737
670.4038628193357450.807725638671490.596137180664255
680.3768710536250680.7537421072501360.623128946374932
690.3449040938238280.6898081876476570.655095906176172
700.3197502387398840.6395004774797680.680249761260116
710.3905629762277280.7811259524554560.609437023772272
720.3575116562592120.7150233125184240.642488343740788
730.3325444703345420.6650889406690830.667455529665458
740.2941834493446450.5883668986892890.705816550655355
750.2715020726050770.5430041452101540.728497927394923
760.2499425832636900.4998851665273810.75005741673631
770.2159367686640780.4318735373281560.784063231335922
780.1913525840198820.3827051680397630.808647415980118
790.2446642707697770.4893285415395540.755335729230223
800.2245787543545610.4491575087091220.775421245645439
810.1989441537433470.3978883074866950.801055846256653
820.1920061600686540.3840123201373080.807993839931346
830.1693887937293670.3387775874587340.830611206270633
840.1607440958647710.3214881917295420.83925590413523
850.1535273097693260.3070546195386520.846472690230674
860.1464272456215480.2928544912430970.853572754378452
870.1320748964429260.2641497928858520.867925103557074
880.1188640340909090.2377280681818180.881135965909091
890.1067706232243560.2135412464487120.893229376775644
900.1161382399317580.2322764798635160.883861760068242
910.1085118786100560.2170237572201120.891488121389944
920.09610798643631270.1922159728726250.903892013563687
930.0900437248098870.1800874496197740.909956275190113
940.07593659075602380.1518731815120480.924063409243976
950.06354769504805370.1270953900961070.936452304951946
960.0823699580746070.1647399161492140.917630041925393
970.06609464429587120.1321892885917420.933905355704129
980.05884793458760130.1176958691752030.941152065412399
990.05044158497819070.1008831699563810.94955841502181
1000.05648882243778340.1129776448755670.943511177562217
1010.05664159665318210.1132831933063640.943358403346818
1020.0451323810851950.090264762170390.954867618914805
1030.03575406636346780.07150813272693560.964245933636532
1040.02873027400932960.05746054801865920.97126972599067
1050.04571472174835870.09142944349671730.954285278251641
1060.06867330563615010.1373466112723000.93132669436385
1070.0548080232752140.1096160465504280.945191976724786
1080.07397447597883470.1479489519576690.926025524021165
1090.06089537948188330.1217907589637670.939104620518117
1100.05764568571619870.1152913714323970.942354314283801
1110.04988365019710160.09976730039420330.950116349802898
1120.05031582996989220.1006316599397840.949684170030108
1130.04855834141426320.09711668282852640.951441658585737
1140.0597838310462110.1195676620924220.940216168953789
1150.1351267361129800.2702534722259600.86487326388702
1160.1095652758990730.2191305517981470.890434724100927
1170.1014764552030960.2029529104061930.898523544796904
1180.1065784636727390.2131569273454780.893421536327261
1190.08490831324230920.1698166264846180.91509168675769
1200.0758305968276420.1516611936552840.924169403172358
1210.07112199892567030.1422439978513410.92887800107433
1220.07519740484519550.1503948096903910.924802595154804
1230.05838371824483640.1167674364896730.941616281755164
1240.09025087530168120.1805017506033620.909749124698319
1250.1092253732301690.2184507464603390.89077462676983
1260.1164346506895900.2328693013791800.88356534931041
1270.1198023336003130.2396046672006250.880197666399688
1280.1264166293724030.2528332587448070.873583370627597
1290.1376421310188480.2752842620376960.862357868981152
1300.1296102793219150.2592205586438310.870389720678085
1310.1026356340308990.2052712680617980.8973643659691
1320.1022025630843110.2044051261686210.89779743691569
1330.1952834570564070.3905669141128140.804716542943593
1340.1653883270224660.3307766540449330.834611672977534
1350.1343971751901770.2687943503803540.865602824809823
1360.1341803805376110.2683607610752220.865819619462389
1370.1081762343759730.2163524687519470.891823765624027
1380.0867647023870180.1735294047740360.913235297612982
1390.06355133395695390.1271026679139080.936448666043046
1400.04517886392678990.09035772785357980.95482113607321
1410.03454291349350760.06908582698701510.965457086506492
1420.02469961924957710.04939923849915430.975300380750423
1430.06297071191100750.1259414238220150.937029288088992
1440.0716101739291750.143220347858350.928389826070825
1450.08718506943587280.1743701388717460.912814930564127
1460.07392379264831940.1478475852966390.92607620735168
1470.06131482667141240.1226296533428250.938685173328588
1480.04007560337338850.0801512067467770.959924396626611
1490.07176840558018680.1435368111603740.928231594419813
1500.09696926374752610.1939385274950520.903030736252474
1510.1196848590934570.2393697181869150.880315140906543
1520.1013297596467900.2026595192935810.89867024035321
1530.2813150641719380.5626301283438750.718684935828062


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.00675675675675676OK
10% type I error level100.0675675675675676OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/104olr1291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/104olr1291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/1fn6g1291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/1fn6g1291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/2fn6g1291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/2fn6g1291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/38w5i1291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/38w5i1291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/48w5i1291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/48w5i1291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/58w5i1291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/58w5i1291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/60o531291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/60o531291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/7bxm61291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/7bxm61291304774.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/8bxm61291304774.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12913051796gixpaceyccarc8/8bxm61291304774.ps (open in new window)


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