Home » date » 2010 » Nov » 13 »

*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: Sat, 13 Nov 2010 14:53:28 +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/13/t1289659933htnkew0gw6hiqvd.htm/, Retrieved Sat, 13 Nov 2010 15:52:13 +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/13/t1289659933htnkew0gw6hiqvd.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 «
24 12 25 8 17 8 18 8 18 9 16 7 20 4 16 11 18 7 17 7 23 12 30 10 23 10 18 8 15 8 12 4 21 9 15 8 20 7 31 11 27 9 34 11 21 13 31 8 19 8 16 9 20 6 21 9 22 9 17 6 24 6 25 16 26 5 25 7 17 9 32 6 33 6 13 5 32 12 25 7 29 10 22 9 18 8 17 5 20 8 15 8 20 10 33 6 29 8 23 7 26 4 18 8 20 8 11 4 28 20 26 8 22 8 17 6 12 4 14 8 17 9 21 6 19 7 18 9 10 5 29 5 31 8 19 8 9 6 20 8 28 7 19 7 30 9 29 11 26 6 23 8 13 6 21 9 19 8 28 6 23 10 18 8 21 8 20 10 23 5 21 7 21 5 15 8 28 14 19 7 26 8 10 6 16 5 22 6 19 10 31 12 31 9 29 12 19 7 22 8 23 10 15 6 20 10 18 10 23 10 25 5 21 7 24 10 25 11 17 6 13 7 28 12 21 11 25 11 9 11 16 5 19 8 17 6 25 9 20 4 29 4 14 7 22 11 15 6 19 7 20 8 15 4 20 8 18 9 33 8 22 11 16 8 17 5 16 4 21 8 26 10 18 6 18 9 17 9 22 13 30 9 30 10 24 20 21 5 21 11 29 6 31 9 20 7 16 9 22 10 20 9 28 8 38 7 22 6 20 13 17 6 28 8 22 10 31 16
 
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
PC[t] = + 4.85862517933143 + 0.145941427970896CM[t] + 0.00272072450394541t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)4.858625179331430.8635725.626200
CM0.1459414279708960.0364.05397.9e-054e-05
t0.002720724503945410.0044740.60810.5440370.272019


Multiple Linear Regression - Regression Statistics
Multiple R0.314293021849479
R-squared0.0987801035832768
Adjusted R-squared0.087226002347165
F-TEST (value)8.54935416997593
F-TEST (DF numerator)2
F-TEST (DF denominator)156
p-value0.000299778271357409
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.58630095079213
Sum Squared Residuals1043.47660685865


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1128.363940175136893.63605982486311
288.51260232761174-0.512602327611737
387.347791628348510.652208371651492
487.496453780823350.50354621917665
597.49917450532731.50082549467270
677.21001237388945-0.210012373889448
747.79649881027698-3.79649881027698
8117.215453822897343.78454617710266
977.51005740334308-0.510057403343077
1077.36683669987613-0.366836699876126
11128.245205992205453.75479400779455
12109.269516712505670.730483287494329
13108.250647441213341.74935255878666
1487.52366102586280.476338974137196
1587.088557466454060.91144253354594
1646.65345390704532-2.65345390704532
1797.969647483287331.03035251671267
1887.09671963996590.903280360034103
1977.82914750432432-0.829147504324324
20119.437223936508131.56277606349187
2198.85617894912850.143821050871509
22119.880489669428711.11951033057129
23137.9859718303115.014028169689
2489.44810683452391-1.44810683452391
2587.69953042337710.300469576622900
2697.264426863968361.73557313603164
2767.85091330035589-1.85091330035589
2897.999575452830731.00042454716927
2998.148237605305570.851762394694429
3067.42125118995503-1.42125118995503
3168.44556191025526-2.44556191025526
32168.59422406273017.4057759372699
3358.74288621520494-3.74288621520494
3478.59966551173799-1.59966551173799
3597.434854812474761.56514518752524
3669.62669695654215-3.62669695654215
3769.775359109017-3.77535910901700
3856.85925127410301-1.85925127410301
39129.634859130053992.36514086994601
4078.61598985876166-1.61598985876166
41109.20247629514920.797523704850808
4298.183607023856860.816392976143138
4387.602562036477220.397437963522779
4457.45934133301027-2.45934133301027
4587.89988634142690.100113658573095
4687.172899926076370.827100073923632
47107.90532779043482.09467220956520
4869.8052870785604-3.80528707856039
4989.22424209118076-1.22424209118076
5078.35131424785932-1.35131424785932
5148.79185925627596-4.79185925627596
5287.627048557012730.37295144298727
5387.921652137458470.0783478625415317
5446.61090001022434-2.61090001022434
55209.0946250102335310.9053749897665
5688.80546287879568-0.805462878795684
5788.22441789141604-0.224417891416043
5867.4974314760655-1.49743147606551
5946.77044506071497-2.77044506071497
6087.065048641160710.934951358839293
6197.505593649577341.49440635042266
6268.09208008596487-2.09208008596487
6377.80291795452703-0.802917954527026
6497.659697251060081.34030274893993
6556.49488655179685-1.49488655179685
6659.27049440774783-4.27049440774783
6789.56509798819357-1.56509798819357
6887.816521577046750.183478422953247
6966.35982802184173-0.359828021841734
7087.967904454025540.0320955459744598
7179.13815660229666-2.13815660229666
7277.82740447506253-0.827404475062535
7399.43548090724634-0.435480907246341
74119.292260203779391.70773979622061
7568.85715664437065-2.85715664437065
7688.4220530849619-0.422053084961902
7766.96535952975688-0.965359529756883
7898.1356116780280.864388321972
7987.846449546590150.153550453409848
8069.16264312283216-3.16264312283217
81108.435656707481631.56434329251837
8287.70867029213110.291329707868908
8388.14921530054773-0.149215300547727
84108.005994597080781.99400540291922
8558.44653960549741-3.44653960549741
8678.15737747405956-1.15737747405956
8758.16009819856351-3.16009819856351
8887.287170355242080.712829644757925
89149.187129643367684.81287035663232
9077.87637751613355-0.876377516133552
9188.90068823643377-0.900688236433773
9266.56834611340337-0.568346113403374
9357.4467154057327-2.4467154057327
9468.32508469806202-2.32508469806202
95107.889981138653282.11001886134672
96129.643998998807982.35600100119202
9799.64671972331193-0.646719723311928
98129.357557591874082.64244240812592
9977.90086403666906-0.90086403666906
10088.3414090450857-0.341409045085695
101108.490071197560541.50992880243946
10267.32526049829731-1.32526049829731
103108.057688362655741.94231163734426
104107.768526231217892.23147376878211
105108.500954095576321.49904590442368
10658.79555767602206-3.79555767602206
10778.21451268864242-1.21451268864242
108108.655057697059051.34494230294095
109118.80371984953392.19628015046611
11067.63890915027067-1.63890915027067
11177.05786416289103-0.0578641628910268
112129.249706306958422.75029369304158
113118.230837035666092.76916296433391
114118.817323472053622.18267652794638
115116.484981349023224.51501865097678
11657.50929206932344-2.50929206932344
11787.949837077740080.0501629222599221
11867.66067494630223-1.66067494630223
11998.830927094573350.169072905426652
12048.10394067922281-4.10394067922281
12149.42013425546482-5.42013425546482
12277.23373356040532-0.233733560405323
123118.403985708676442.59601429132356
12467.38511643738411-1.38511643738411
12577.97160287377164-0.971602873771641
12688.12026502624648-0.120265026246483
12747.39327861089595-3.39327861089595
12888.12570647525437-0.125706475254374
12997.836544343816531.16345565618347
130810.0283864878839-2.02838648788392
131118.4257515047082.574248495292
13287.552823661386570.44717633861343
13357.70148581386141-2.70148581386141
13447.55826511039446-3.55826511039446
13588.29069297475289-0.290692974752888
136109.023120839111320.976879160888684
13767.85831013984809-1.85831013984809
13897.861030864352031.13896913564796
13997.717810160885081.28218983911492
140138.450238025243514.54976197475649
14199.62049017351463-0.620490173514629
142109.623210898018570.376789101981426
143208.7502830546971411.2497169453029
14458.3151794952884-3.31517949528840
145118.317900219792342.68209978020766
14669.48815236806346-3.48815236806346
14799.7827559485092-0.782755948509198
14878.18012096533328-1.18012096533328
14997.599075977953641.40092402204636
150108.477445270282971.52255472971703
15198.188283138845120.811716861154882
15289.35853528711623-1.35853528711624
153710.8206702913291-3.82067029132915
15468.48832816829875-2.48832816829875
155138.19916603686094.8008339631391
15667.76406247745216-1.76406247745216
15789.37213890963596-1.37213890963596
158108.499211066314531.50078893368547
159169.815404642556546.18459535744346


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.2537591457617160.5075182915234310.746240854238284
70.1750990499942340.3501980999884680.824900950005766
80.6192609811648750.7614780376702490.380739018835125
90.4955434495286530.9910868990573060.504456550471347
100.3806267111777620.7612534223555240.619373288822238
110.5296823670572930.9406352658854140.470317632942707
120.4361128082592260.8722256165184520.563887191740774
130.352074005315530.704148010631060.64792599468447
140.2682118981688460.5364237963376920.731788101831154
150.1989215001322680.3978430002645370.801078499867732
160.2066769958704430.4133539917408860.793323004129557
170.1532674770457510.3065349540915030.846732522954249
180.1155240968384960.2310481936769930.884475903161504
190.08925848597309370.1785169719461870.910741514026906
200.0619145574575640.1238291149151280.938085442542436
210.04309731912301790.08619463824603570.956902680876982
220.0285965467436040.0571930934872080.971403453256396
230.09202048520201420.1840409704040280.907979514797986
240.1009280027851220.2018560055702450.899071997214878
250.073428838407760.146857676815520.92657116159224
260.0593666676963620.1187333353927240.940633332303638
270.0586872322852150.117374464570430.941312767714785
280.04307890760077520.08615781520155030.956921092399225
290.03063535654835060.06127071309670120.96936464345165
300.02481543626800040.04963087253600070.975184563732
310.02715408024409930.05430816048819860.9728459197559
320.236332401169750.47266480233950.76366759883025
330.3290826478664990.6581652957329980.670917352133501
340.3002873901665850.600574780333170.699712609833415
350.2768816488111950.553763297622390.723118351188805
360.3275791123463690.6551582246927380.672420887653631
370.3583520010920690.7167040021841370.641647998907931
380.3209332575423020.6418665150846040.679066742457698
390.342148805957170.684297611914340.65785119404283
400.3005689494451500.6011378988903010.69943105055485
410.2688016576784540.5376033153569090.731198342321546
420.2392092894704490.4784185789408970.760790710529551
430.2050424243449150.4100848486898300.794957575655085
440.1876973148191630.3753946296383260.812302685180837
450.1573401410268450.314680282053690.842659858973155
460.1375907627132110.2751815254264210.86240923728679
470.140234441141930.280468882283860.85976555885807
480.1576955802260850.3153911604521710.842304419773915
490.1297857808239830.2595715616479660.870214219176017
500.1063096496612910.2126192993225820.893690350338709
510.1447915217130590.2895830434261170.855208478286941
520.1238764045608760.2477528091217520.876123595439124
530.1030070073073020.2060140146146040.896992992692698
540.09399256628751960.1879851325750390.90600743371248
550.8538692079563580.2922615840872840.146130792043642
560.8251043784665840.3497912430668310.174895621533416
570.7933110468249180.4133779063501630.206688953175082
580.762035765785170.4759284684296590.237964234214830
590.7484536727603720.5030926544792560.251546327239628
600.7249774294853940.5500451410292120.275022570514606
610.7115171177114820.5769657645770360.288482882288518
620.6833894295909130.6332211408181740.316610570409087
630.6405912499486010.7188175001027980.359408750051399
640.6219980524679820.7560038950640360.378001947532018
650.5818429025588410.8363141948823190.418157097441159
660.6221462826843430.7557074346313140.377853717315657
670.5821163048263360.8357673903473280.417883695173664
680.5421017709770910.9157964580458170.457898229022908
690.4966790042886360.9933580085772710.503320995711364
700.4544645897237210.9089291794474430.545535410276279
710.4230385276528970.8460770553057940.576961472347103
720.3790513983696310.7581027967392610.62094860163037
730.3375582006881530.6751164013763060.662441799311847
740.3323093921451180.6646187842902350.667690607854882
750.3211697527395710.6423395054791430.678830247260429
760.2822144314749770.5644288629499540.717785568525023
770.2458126175127430.4916252350254860.754187382487257
780.223158278484540.446316556969080.77684172151546
790.1936049570487830.3872099140975650.806395042951217
800.1937118967502520.3874237935005040.806288103249748
810.1851227469176990.3702454938353990.8148772530823
820.1595070694288790.3190141388577590.84049293057112
830.1342352968902930.2684705937805850.865764703109707
840.1334878594234580.2669757188469160.866512140576542
850.1405598470739640.2811196941479280.859440152926036
860.1184408475216950.2368816950433890.881559152478305
870.1208161721523030.2416323443046070.879183827847697
880.1041143871866560.2082287743733120.895885612813344
890.1849870807674660.3699741615349310.815012919232534
900.1568442267193100.3136884534386190.84315577328069
910.1319407711796650.2638815423593300.868059228820335
920.1091563183646770.2183126367293540.890843681635323
930.1017743983219160.2035487966438320.898225601678084
940.09408945638086760.1881789127617350.905910543619132
950.09231642525047170.1846328505009430.907683574749528
960.09431463743542980.1886292748708600.90568536256457
970.07656272022406540.1531254404481310.923437279775935
980.08241131101615660.1648226220323130.917588688983843
990.0668208148252440.1336416296504880.933179185174756
1000.05300738319724650.1060147663944930.946992616802753
1010.04707818716513580.09415637433027150.952921812834864
1020.03822325094625550.0764465018925110.961776749053745
1030.03576053985373720.07152107970747430.964239460146263
1040.03520052282188370.07040104564376740.964799477178116
1050.03116305720070930.06232611440141860.96883694279929
1060.03621601391862260.07243202783724520.963783986081377
1070.02852441667041390.05704883334082770.971475583329586
1080.02416612240404330.04833224480808650.975833877595957
1090.02405729092555890.04811458185111770.975942709074441
1100.01924136063946520.03848272127893040.980758639360535
1110.01424705762889190.02849411525778390.985752942371108
1120.01711877707181350.03423755414362690.982881222928187
1130.02041981431520290.04083962863040570.979580185684797
1140.02320859953842560.04641719907685120.976791400461574
1150.04457384181542590.08914768363085170.955426158184574
1160.03846758325019830.07693516650039650.961532416749802
1170.03042369196694920.06084738393389840.96957630803305
1180.02357940614352560.04715881228705120.976420593856474
1190.01907254630976820.03814509261953640.980927453690232
1200.02189620957514770.04379241915029530.978103790424852
1210.03656592338342630.07313184676685260.963434076616574
1220.02716201964887370.05432403929774750.972837980351126
1230.03023041827129010.06046083654258020.96976958172871
1240.02293624246911440.04587248493822890.977063757530886
1250.01666397675836270.03332795351672550.983336023241637
1260.01183792456131200.02367584912262410.988162075438688
1270.01336508068469330.02673016136938670.986634919315307
1280.009279630655789880.01855926131157980.99072036934421
1290.00684167342788430.01368334685576860.993158326572116
1300.005055057095515130.01011011419103030.994944942904485
1310.005022457509046340.01004491501809270.994977542490954
1320.003336294338202830.006672588676405670.996663705661797
1330.003129399871666590.006258799743333180.996870600128333
1340.004898880078989020.009797760157978050.995101119921011
1350.003323051908298030.006646103816596070.996676948091702
1360.002148063977731370.004296127955462730.997851936022269
1370.002237171414822930.004474342829645870.997762828585177
1380.001446763311882610.002893526623765220.998553236688117
1390.0009287670717603770.001857534143520750.99907123292824
1400.001217152416984490.002434304833968990.998782847583015
1410.0007090964821373810.001418192964274760.999290903517863
1420.0003883300953709440.0007766601907418870.99961166990463
1430.2745030931169130.5490061862338250.725496906883087
1440.2556814837742000.5113629675484010.7443185162258
1450.3211497375625190.6422994751250380.678850262437481
1460.2688053159048680.5376106318097360.731194684095132
1470.2161461622212120.4322923244424230.783853837778788
1480.1529581710749510.3059163421499010.84704182892505
1490.1154357270287840.2308714540575680.884564272971216
1500.1193710384320290.2387420768640580.880628961567971
1510.1286212665749940.2572425331499890.871378733425006
1520.09565606313507270.1913121262701450.904343936864927
1530.05603817392893450.1120763478578690.943961826071065


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level110.0743243243243243NOK
5% type I error level300.202702702702703NOK
10% type I error level480.324324324324324NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/10jik31289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/10jik31289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/1uhnr1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/1uhnr1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/2uhnr1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/2uhnr1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/3n85c1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/3n85c1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/4n85c1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/4n85c1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/5n85c1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/5n85c1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/6fh4x1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/6fh4x1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/7qqli1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/7qqli1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/8qqli1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/8qqli1289659998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/9qqli1289659998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/13/t1289659933htnkew0gw6hiqvd/9qqli1289659998.ps (open in new window)


 
Parameters (Session):
par1 = 0 ;
 
Parameters (R input):
par1 = 2 ; 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