Home » date » 2009 » Dec » 15 »

Multiple Regression

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 15 Dec 2009 01:52:44 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy.htm/, Retrieved Tue, 15 Dec 2009 09:55:05 +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/2009/Dec/15/t12608672925gzgjq3azukjldy.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
8715.1 0 8919.9 0 10085.8 0 9511.7 0 8991.3 0 10311.2 0 8895.4 0 7449.8 0 10084.0 0 9859.4 0 9100.1 0 8920.8 0 8502.7 0 8599.6 0 10394.4 0 9290.4 0 8742.2 0 10217.3 0 8639.0 0 8139.6 0 10779.1 0 10427.7 0 10349.1 0 10036.4 0 9492.1 0 10638.8 0 12054.5 0 10324.7 0 11817.3 0 11008.9 0 9996.6 0 9419.5 0 11958.8 0 12594.6 0 11890.6 0 10871.7 0 11835.7 0 11542.2 0 13093.7 0 11180.2 0 12035.7 0 12112.0 0 10875.2 0 9897.3 0 11672.1 1 12385.7 1 11405.6 1 9830.9 1 11025.1 1 10853.8 1 12252.6 1 11839.4 1 11669.1 1 11601.4 1 11178.4 1 9516.4 1 12102.8 1 12989.0 1 11610.2 1 10205.5 1 11356.2 1 11307.1 1 12648.6 1 11947.2 1 11714.1 1 12192.5 1 11268.8 1 9097.4 1 12639.8 1 13040.1 1 11687.3 1 11191.7 1 11391.9 1 11793.1 1 13933.2 1 12778.1 1 11810.3 1 13698.4 1 11956.6 1 10723.8 1 13938.9 1 13979.8 1 13807.4 1 12973.9 1 12509.8 1 12934.1 1 14908.3 1 13 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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Uitvoer[t] = + 10218.2295454546 + 3195.27386363636Dummie[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)10218.2295454546271.90470337.580200
Dummie3195.27386363636333.0138919.59500


Multiple Linear Regression - Regression Statistics
Multiple R0.643882052031303
R-squared0.414584096928041
Adjusted R-squared0.410080897673641
F-TEST (value)92.0643465915897
F-TEST (DF numerator)1
F-TEST (DF denominator)130
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1803.61175913684
Sum Squared Residuals422891999.100568


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
18715.110218.2295454545-1503.12954545446
28919.910218.2295454545-1298.32954545452
310085.810218.2295454545-132.429545454548
49511.710218.2295454545-706.529545454547
58991.310218.2295454545-1226.92954545455
610311.210218.229545454592.970454545453
78895.410218.2295454545-1322.82954545455
87449.810218.2295454545-2768.42954545455
91008410218.2295454545-134.229545454548
109859.410218.2295454545-358.829545454548
119100.110218.2295454545-1118.12954545455
128920.810218.2295454545-1297.42954545455
138502.710218.2295454545-1715.52954545455
148599.610218.2295454545-1618.62954545455
1510394.410218.2295454545176.170454545452
169290.410218.2295454545-927.829545454548
178742.210218.2295454545-1476.02954545455
1810217.310218.2295454545-0.92954545454846
19863910218.2295454545-1579.22954545455
208139.610218.2295454545-2078.62954545455
2110779.110218.2295454545560.870454545453
2210427.710218.2295454545209.470454545453
2310349.110218.2295454545130.870454545453
2410036.410218.2295454545-181.829545454548
259492.110218.2295454545-726.129545454547
2610638.810218.2295454545420.570454545451
2712054.510218.22954545451836.27045454545
2810324.710218.2295454545106.470454545453
2911817.310218.22954545451599.07045454545
3011008.910218.2295454545790.670454545452
319996.610218.2295454545-221.629545454547
329419.510218.2295454545-798.729545454548
3311958.810218.22954545451740.57045454545
3412594.610218.22954545452376.37045454545
3511890.610218.22954545451672.37045454545
3610871.710218.2295454545653.470454545453
3711835.710218.22954545451617.47045454545
3811542.210218.22954545451323.97045454545
3913093.710218.22954545452875.47045454545
4011180.210218.2295454545961.970454545453
4112035.710218.22954545451817.47045454545
421211210218.22954545451893.77045454545
4310875.210218.2295454545656.970454545453
449897.310218.2295454545-320.929545454548
4511672.113413.5034090909-1741.40340909091
4612385.713413.5034090909-1027.80340909091
4711405.613413.5034090909-2007.90340909091
489830.913413.5034090909-3582.60340909091
4911025.113413.5034090909-2388.40340909091
5010853.813413.5034090909-2559.70340909091
5112252.613413.5034090909-1160.90340909091
5211839.413413.5034090909-1574.10340909091
5311669.113413.5034090909-1744.40340909091
5411601.413413.5034090909-1812.10340909091
5511178.413413.5034090909-2235.10340909091
569516.413413.5034090909-3897.10340909091
5712102.813413.5034090909-1310.70340909091
581298913413.5034090909-424.503409090909
5911610.213413.5034090909-1803.30340909091
6010205.513413.5034090909-3208.00340909091
6111356.213413.5034090909-2057.30340909091
6211307.113413.5034090909-2106.40340909091
6312648.613413.5034090909-764.903409090908
6411947.213413.5034090909-1466.30340909091
6511714.113413.5034090909-1699.40340909091
6612192.513413.5034090909-1221.00340909091
6711268.813413.5034090909-2144.70340909091
689097.413413.5034090909-4316.10340909091
6912639.813413.5034090909-773.70340909091
7013040.113413.5034090909-373.403409090908
7111687.313413.5034090909-1726.20340909091
7211191.713413.5034090909-2221.80340909091
7311391.913413.5034090909-2021.60340909091
7411793.113413.5034090909-1620.40340909091
7513933.213413.5034090909519.696590909092
7612778.113413.5034090909-635.403409090908
7711810.313413.5034090909-1603.20340909091
7813698.413413.5034090909284.896590909091
7911956.613413.5034090909-1456.90340909091
8010723.813413.5034090909-2689.70340909091
8113938.913413.5034090909525.396590909091
8213979.813413.5034090909566.29659090909
8313807.413413.5034090909393.896590909091
8412973.913413.5034090909-439.603409090909
8512509.813413.5034090909-903.70340909091
8612934.113413.5034090909-479.403409090908
8714908.313413.50340909091494.79659090909
8813772.113413.5034090909358.596590909092
8913012.613413.5034090909-400.903409090908
9014049.913413.5034090909636.396590909091
9111816.513413.5034090909-1597.00340909091
9211593.213413.5034090909-1820.30340909091
9314466.213413.50340909091052.69659090909
9413615.913413.5034090909202.396590909091
9514733.913413.50340909091320.39659090909
9613880.713413.5034090909467.196590909092
9713527.513413.5034090909113.996590909091
981358413413.5034090909170.496590909091
9916170.213413.50340909092756.69659090909
10013260.613413.5034090909-152.903409090908
10114741.913413.50340909091328.39659090909
10215486.513413.50340909092072.99659090909
10313154.513413.5034090909-259.003409090909
10412621.213413.5034090909-792.303409090908
10515031.613413.50340909091618.09659090909
10615452.413413.50340909092038.89659090909
1071542813413.50340909092014.49659090909
10813105.913413.5034090909-307.603409090909
10914716.813413.50340909091303.29659090909
1101418013413.5034090909766.496590909091
11116202.213413.50340909092788.69659090909
11214392.413413.5034090909978.89659090909
11315140.613413.50340909091727.09659090909
11415960.113413.50340909092546.59659090909
11514351.313413.5034090909937.79659090909
11613230.213413.5034090909-183.303409090908
11715202.113413.50340909091788.59659090909
1181705613413.50340909093642.49659090909
11916077.713413.50340909092664.19659090909
12013348.213413.5034090909-65.3034090909081
12116402.413413.50340909092988.89659090909
12216559.113413.50340909093145.59659090909
1231657913413.50340909093165.49659090909
12417561.213413.50340909094147.69659090909
12516129.613413.50340909092716.09659090909
12618484.313413.50340909095070.79659090909
12716402.613413.50340909092989.09659090909
12814032.313413.5034090909618.79659090909
12917109.113413.50340909093695.59659090909
13017157.213413.50340909093743.69659090909
13113879.813413.5034090909466.29659090909
13212362.413413.5034090909-1051.10340909091


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.05361433673211250.1072286734642250.946385663267888
60.04286557104495570.08573114208991130.957134428955044
70.01836052820226070.03672105640452140.98163947179774
80.05416518778973140.1083303755794630.945834812210269
90.03679185292413580.07358370584827160.963208147075864
100.02030927312743310.04061854625486620.979690726872567
110.009395748040019630.01879149608003930.99060425195998
120.004403044408798160.008806088817596310.995596955591202
130.002621486007197890.005242972014395790.997378513992802
140.001396226151426410.002792452302852820.998603773848574
150.001434659294779450.002869318589558910.99856534070522
160.000628021285655470.001256042571310940.999371978714344
170.0003190783515006880.0006381567030013770.9996809216485
180.000248309225196430.000496618450392860.999751690774804
190.0001416215530095630.0002832431060191250.99985837844699
200.0001394470855444200.0002788941710888390.999860552914456
210.0002435298243092750.0004870596486185490.99975647017569
220.0002186287232986480.0004372574465972970.999781371276701
230.0001699095386218090.0003398190772436190.999830090461378
240.0001003311394058690.0002006622788117390.999899668860594
254.9183805885894e-059.8367611771788e-050.999950816194114
264.83881670073234e-059.67763340146468e-050.999951611832993
270.000360454642483260.000720909284966520.999639545357517
280.0002350455793373880.0004700911586747760.999764954420663
290.0005993419780136020.001198683956027200.999400658021986
300.0005515015049951120.001103003009990220.999448498495005
310.0003243933248359890.0006487866496719780.999675606675164
320.0002007204592488430.0004014409184976860.99979927954075
330.0004494102658324590.0008988205316649190.999550589734168
340.001613026952074160.003226053904148330.998386973047926
350.002172966491297650.004345932982595290.997827033508702
360.001594059189750990.003188118379501980.99840594081025
370.001874136355040350.00374827271008070.99812586364496
380.001756673123672750.003513346247345490.998243326876327
390.005048526512244280.01009705302448860.994951473487756
400.003856102428618530.007712204857237060.996143897571381
410.004204793828906270.008409587657812530.995795206171094
420.004731895923760870.009463791847521730.99526810407624
430.003319682933044960.006639365866089920.996680317066955
440.002171948403508410.004343896807016810.997828051596492
450.001517901755151740.003035803510303480.998482098244848
460.001025633557795750.002051267115591500.998974366442204
470.0007629119891018810.001525823978203760.999237088010898
480.001177516946922570.002355033893845130.998822483053077
490.0009374047938259180.001874809587651840.999062595206174
500.00078837959189010.00157675918378020.99921162040811
510.00060900827773490.00121801655546980.999390991722265
520.0004409966293686960.0008819932587373910.999559003370631
530.0003201280000166790.0006402560000333580.999679871999983
540.0002343000486499780.0004686000972999570.99976569995135
550.0001897370166625490.0003794740333250990.999810262983337
560.0004543960429293360.0009087920858586720.99954560395707
570.000355551972511470.000711103945022940.999644448027489
580.0003368646730258750.0006737293460517490.999663135326974
590.0002650875193314250.000530175038662850.999734912480669
600.0004090806348214770.0008181612696429540.999590919365179
610.0003598049137706660.0007196098275413320.99964019508623
620.0003282628591823870.0006565257183647730.999671737140818
630.0002849987025040560.0005699974050081110.999715001297496
640.0002332665719890650.0004665331439781310.99976673342801
650.0001998226600908420.0003996453201816840.99980017733991
660.0001640838344521070.0003281676689042140.999835916165548
670.0001694660506937650.0003389321013875310.999830533949306
680.001307868656096910.002615737312193830.998692131343903
690.001224026733898950.002448053467797900.998775973266101
700.001209505004226930.002419010008453860.998790494995773
710.001250885924728940.002501771849457870.998749114075271
720.001660562810680840.003321125621361680.99833943718932
730.002104807335221840.004209614670443670.997895192664778
740.002381391910032330.004762783820064650.997618608089968
750.003202665814283380.006405331628566760.996797334185717
760.003128545413048250.006257090826096510.996871454586952
770.003720710978848060.007441421957696120.996279289021152
780.004191744143219320.008383488286438640.99580825585678
790.004939002847257490.009878005694514990.995060997152742
800.01280740471002230.02561480942004460.987192595289978
810.01491553061088520.02983106122177040.985084469389115
820.01682541766842030.03365083533684070.98317458233158
830.01768817751116210.03537635502232410.982311822488838
840.01783027232318150.0356605446463630.982169727676818
850.01987796995458040.03975593990916090.98012203004542
860.02072073103552890.04144146207105780.979279268964471
870.02800284435520940.05600568871041870.97199715564479
880.02753899955157910.05507799910315830.97246100044842
890.02817569366294990.05635138732589970.97182430633705
900.02797537455808570.05595074911617140.972024625441914
910.04558214148079920.09116428296159840.9544178585192
920.08872204558580570.1774440911716110.911277954414194
930.0920507692011180.1841015384022360.907949230798882
940.09321201385105020.1864240277021000.90678798614895
950.09705544127504670.1941108825500930.902944558724953
960.09525242028373060.1905048405674610.90474757971627
970.09736594856677120.1947318971335420.902634051433229
980.099699133903630.199398267807260.90030086609637
990.1413432054711280.2826864109422560.858656794528872
1000.1525154565210430.3050309130420860.847484543478957
1010.1457382934663220.2914765869326440.854261706533678
1020.1510578096945110.3021156193890220.84894219030549
1030.1695530218439470.3391060436878940.830446978156053
1040.2359331870768290.4718663741536580.764066812923171
1050.2233941407136250.4467882814272510.776605859286375
1060.2162026693721420.4324053387442830.783797330627858
1070.2048411569928830.4096823139857660.795158843007117
1080.2482664319803950.4965328639607910.751733568019605
1090.2274573501952290.4549147003904580.772542649804771
1100.2199828384610160.4399656769220310.780017161538984
1110.2219517186856870.4439034373713740.778048281314313
1120.2056607615664700.4113215231329400.79433923843353
1130.1793223907887150.358644781577430.820677609211285
1140.162749564492670.325499128985340.83725043550733
1150.1485213485670830.2970426971341660.851478651432917
1160.2020866006908500.4041732013816990.79791339930915
1170.1718021973970540.3436043947941080.828197802602946
1180.1815460670404050.363092134080810.818453932959595
1190.1501872248735590.3003744497471180.849812775126441
1200.206354790389750.41270958077950.79364520961025
1210.1695619550518660.3391239101037320.830438044948134
1220.1376235748522420.2752471497044850.862376425147758
1230.1075530398759400.2151060797518790.89244696012406
1240.1166251369990990.2332502739981970.883374863000901
1250.07719746280301170.1543949256060230.922802537196988
1260.1725297268617140.3450594537234290.827470273138286
1270.1279339053205740.2558678106411480.872066094679426


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level670.544715447154472NOK
5% type I error level780.634146341463415NOK
10% type I error level850.691056910569106NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/106huo1260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/106huo1260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/15exq1260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/15exq1260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/2rwm51260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/2rwm51260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/3eow71260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/3eow71260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/4sru51260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/4sru51260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/53lbk1260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/53lbk1260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/6rsp41260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/6rsp41260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/76rqc1260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/76rqc1260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/8gktd1260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/8gktd1260867157.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/9iiw71260867157.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t12608672925gzgjq3azukjldy/9iiw71260867157.ps (open in new window)


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