Home » date » 2009 » Dec » 27 »

Case - Multiple Regression 1

*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: Sun, 27 Dec 2009 12:53:56 -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/27/t1261943805vx1rr1uwnbv3vka.htm/, Retrieved Sun, 27 Dec 2009 20:56:57 +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/27/t1261943805vx1rr1uwnbv3vka.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 «
11881.4 423.4 10374.2 404.1 13828 500 13490.5 472.6 13092.2 496.1 13184.4 562 12398.4 434.8 13882.3 538.2 15861.5 577.6 13286.1 518.1 15634.9 625.2 14211 561.2 13646.8 523.3 12224.6 536.1 15916.4 607.3 16535.9 637.3 15796 606.9 14418.6 652.9 15044.5 617.2 14944.2 670.4 16754.8 729.9 14254 677.2 15454.9 710 15644.8 844.3 14568.3 748.2 12520.2 653.9 14803 742.6 15873.2 854.2 14755.3 808.4 12875.1 1819 14291.1 1936.5 14205.3 1966.1 15859.4 2083.1 15258.9 1620.1 15498.6 1527.6 15106.5 1795 15023.6 1685.1 12083 1851.8 15761.3 2164.4 16943 1981.8 15070.3 1726.5 13659.6 2144.6 14768.9 1758.2 14725.1 1672.9 15998.1 1837.3 15370.6 1596.1 14956.9 1446 15469.7 1898.4 15101.8 1964.1 11703.7 1755.9 16283.6 2255.3 16726.5 1881.2 14968.9 2117.9 14861 1656.5 14583.3 1544.1 15305.8 2098.9 17903.9 2133.3 16379.4 1963.5 15420.3 1801.2 17870.5 2365.4 15912.8 1936.5 13866.5 1667.6 17823.2 1983.5 17872 2058.6 17420.4 2448.3 16704.4 1858.1 15991.2 1625.4 16583.6 213 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 12086.2267705685 + 2.46058056232764X[t] + e[t]


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


Multiple Linear Regression - Regression Statistics
Multiple R0.745550286064503
R-squared0.555845229050863
Adjusted R-squared0.552081205568243
F-TEST (value)147.673156561709
F-TEST (DF numerator)1
F-TEST (DF denominator)118
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1820.99706221618
Sum Squared Residuals391291575.470797


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
111881.413128.0365806581-1246.63658065810
210374.213080.5473758051-2706.34737580511
31382813316.5170517323511.482948267663
413490.513249.0971443246241.40285567544
513092.213306.9207875393-214.720787539259
613184.413469.0730465967-284.673046596651
712398.413156.0871990686-757.687199068575
813882.313410.5112292133471.788770786746
915861.513507.45810336902354.04189663104
1013286.113361.0535599105-74.9535599104676
1115634.913624.58173813582010.31826186424
121421113467.1045821468743.89541785321
1313646.813373.8485788346272.951421165428
1412224.613405.3440100324-1180.74401003237
1515916.413580.53734607012335.86265392991
1616535.913654.35476293992881.54523706008
171579613579.55311384522216.44688615484
1814418.613692.7398197122725.860180287767
1915044.513604.89709363711439.60290636286
2014944.213735.79997955301208.40002044703
2116754.813882.20452301152872.59547698854
221425413752.5319273768501.468072623204
2315454.913833.23896982111621.66103017886
2415644.814163.69493934171481.10506065825
2514568.313927.2331473021641.06685269794
2612520.213695.2004002746-1175.00040027456
271480313913.4538961530889.546103846976
2815873.214188.05468690881685.14531309121
2914755.314075.3600971542679.939902845817
3012875.116562.0228134425-3686.9228134425
3114291.116851.141029516-2560.04102951600
3214205.316923.9742141609-2718.67421416090
3315859.417211.8621399532-1352.46213995323
3415258.916072.6133395955-813.713339595531
3515498.615845.0096375802-346.409637580223
3615106.516502.9688799466-1396.46887994664
3715023.616232.5510761468-1208.95107614683
381208316642.7298558868-4559.72985588685
3915761.317411.9073396705-1650.60733967047
401694316962.6053289894-19.6053289894398
4115070.316334.4191114272-1264.11911142719
4213659.617363.1878445364-3703.58784453638
4314768.916412.4195152530-1643.51951525298
4414725.116202.5319932864-1477.43199328643
4515998.116607.0514377331-608.951437733095
4615370.616013.5594060997-642.959406099667
4714956.915644.2262636943-687.326263694289
4815469.716757.3929100913-1287.69291009131
4915101.816919.0530530362-1817.25305303624
5011703.716406.7601799596-4703.06017995962
5116283.617635.5741127861-1351.97411278605
5216726.516715.070924419311.4290755807209
5314968.917297.4903435222-2328.59034352223
541486116162.1784720643-1301.17847206426
5514583.315885.6092168586-1302.30921685863
5615305.817250.739312838-1944.93931283801
5717903.917335.3832841821568.516715817923
5816379.416917.5767046988-538.176704698844
5915420.316518.2244794331-1097.92447943307
6017870.517906.4840326983-35.9840326983246
6115912.816851.141029516-938.341029515998
6213866.516189.4909163061-2322.99091630609
6317823.216966.7883159454856.411684054604
641787217151.5779161762720.422083823797
6517420.418110.4661613153-690.066161315285
6616704.416658.231513429546.1684865704913
6715991.216085.6544165759-94.4544165758672
6816583.617328.7397166638-745.139716663795
6919123.518276.3092912162847.190708783831
7017838.717573.8135406716264.886459328374
7117209.417221.2123460901-11.8123460900742
7218586.517585.62432737081000.8756726292
7316258.117253.9380675690-995.838067569032
7415141.617717.5114455116-2575.91144551156
7519202.118213.0723707643989.02762923565
7617746.518419.0229638312-672.522963831172
7719090.118345.4516050176744.648394982422
7818040.317018.95262386671021.34737613326
7917515.517967.0143145316-451.514314531584
8017751.817840.0483575155-88.2483575154786
8121072.418790.07851263022282.32148736982
821717017727.1077097046-557.107709704639
8319439.517957.17199228231482.32800771773
8419795.418183.29934596021612.10065403982
8517574.917836.6035447282-261.703544728217
8616165.418496.2851934883-2330.88519348826
8719464.618387.28147457711077.31852542285
8819932.119072.5531611854859.546838814603
8919961.218009.33630020361951.86369979638
9017343.417217.0293591341126.370640865884
9118924.218817.3909568720106.809043127983
9218574.118972.6535903549-398.553590354893
9321350.619598.87134346731751.72865653272
9418594.618003.9230229665590.6769770335
9519823.118168.53586258621654.56413741378
9620844.418796.96813820472047.43186179530
9719640.218952.9689458563687.23105414373
9817735.417955.6956439449-220.295643944876
9919813.619976.3244017283-162.724401728339
1002216018743.57354000223416.42645999781
10120664.320743.5334210621-79.2334210620987
10217877.416896.4157118628980.984288137175
10320906.518445.10511779182461.39488220815
10421164.118325.76696051902838.33303948104
10521374.418695.10010292432679.29989707567
10622952.319138.25066219953814.04933780046
10721343.517589.56125627053753.93874372948
10823899.319307.78466294394591.51533705608
10922392.918652.53205919613740.36794080394
11018274.117920.7553999598353.344600040174
11122786.719876.17877284162910.5212271584
11222321.519190.41497012093131.08502987911
11317842.219744.0455966446-1901.84559664461
11416373.518658.9295686581-2285.42956865812
11515993.818071.8350464867-2078.03504648674
11616446.119006.1174860025-2560.01748600255
1171772919703.4460173662-1974.4460173662
1181664319130.6228624563-2487.62286245633
11916196.718501.6984707254-2304.99847072538
12018252.119129.6386302314-877.538630231397


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.04204962832665510.08409925665331020.957950371673345
60.09028627077223150.1805725415444630.909713729227769
70.04170003110010060.08340006220020120.9582999688999
80.01645258310090720.03290516620181430.983547416899093
90.01575996111222360.03151992222444730.984240038887776
100.006973104433165860.01394620886633170.993026895566834
110.002840732323675730.005681464647351460.997159267676324
120.001106443631568520.002212887263137040.998893556368431
130.000389619190986330.000779238381972660.999610380809014
140.001203886830369310.002407773660738620.99879611316963
150.0007079098428072520.001415819685614500.999292090157193
160.00040099456242930.00080198912485860.99959900543757
170.0001938738046584840.0003877476093169690.999806126195341
180.0006254667725495880.001250933545099180.99937453322745
190.0003118957196843620.0006237914393687240.999688104280316
200.0003409589933980810.0006819179867961630.999659041006602
210.0002148928020919420.0004297856041838850.999785107197908
220.0004642308543525860.0009284617087051720.999535769145647
230.0003734769148522010.0007469538297044030.999626523085148
240.001306923522742210.002613847045484420.998693076477258
250.001758462273768670.003516924547537340.998241537726231
260.004841222347661010.009682444695322020.995158777652339
270.004251926955477290.008503853910954570.995748073044523
280.004322432190654140.008644864381308280.995677567809346
290.005266306439557070.01053261287911410.994733693560443
300.2224080765045460.4448161530090910.777591923495454
310.2002919683030610.4005839366061230.799708031696939
320.1771613657178360.3543227314356720.822838634282164
330.1514101612568710.3028203225137420.848589838743129
340.1203458879333100.2406917758666210.87965411206669
350.09830088420677570.1966017684135510.901699115793224
360.07500445431086340.1500089086217270.924995545689137
370.05600055503391090.1120011100678220.94399944496609
380.1198389785228010.2396779570456020.880161021477199
390.1024697952142090.2049395904284190.89753020478579
400.1051350255105660.2102700510211320.894864974489434
410.08157450037827250.1631490007565450.918425499621727
420.1029917279894080.2059834559788170.897008272010592
430.08163009420623630.1632601884124730.918369905793764
440.06313897625385340.1262779525077070.936861023746147
450.05240252926373020.1048050585274600.94759747073627
460.04021247989065440.08042495978130870.959787520109346
470.02991001191039150.0598200238207830.97008998808961
480.02246876819629850.0449375363925970.977531231803701
490.01729424974106870.03458849948213750.982705750258931
500.06013193071195480.1202638614239100.939868069288045
510.05424274598594440.1084854919718890.945757254014056
520.05167508056136120.1033501611227220.948324919438639
530.04791276360313980.09582552720627970.95208723639686
540.03703310135917140.07406620271834280.962966898640829
550.02834357969373810.05668715938747620.971656420306262
560.02492786791521450.04985573583042910.975072132084785
570.03276353386551040.06552706773102080.96723646613449
580.02717388419396200.05434776838792410.972826115806038
590.02097775753204310.04195551506408620.979022242467957
600.02277987986535880.04555975973071770.977220120134641
610.01781557620213530.03563115240427050.982184423797865
620.01945457412945430.03890914825890850.980545425870546
630.02242911108082750.04485822216165500.977570888919173
640.02425030071536930.04850060143073860.975749699284631
650.02160433676413580.04320867352827150.978395663235864
660.01748616240487390.03497232480974790.982513837595126
670.01311686880447080.02623373760894150.98688313119553
680.01047259470806180.02094518941612360.989527405291938
690.01309796553110150.0261959310622030.986902034468899
700.01147442056476560.02294884112953130.988525579435234
710.009094848929790210.01818969785958040.99090515107021
720.009497540884757060.01899508176951410.990502459115243
730.00759087894572020.01518175789144040.99240912105428
740.01104024445183140.02208048890366280.988959755548169
750.01194132109624730.02388264219249460.988058678903753
760.009906577669607450.01981315533921490.990093422330393
770.00943426590983370.01886853181966740.990565734090166
780.008246014689357660.01649202937871530.991753985310642
790.006471771071329150.01294354214265830.993528228928671
800.004990451382300570.009980902764601140.9950095486177
810.008952257971612680.01790451594322540.991047742028387
820.007103110644328790.01420622128865760.992896889355671
830.006956030619723570.01391206123944710.993043969380276
840.00705776005091230.01411552010182460.992942239949088
850.005280878658209110.01056175731641820.99471912134179
860.007838998944943460.01567799788988690.992161001055057
870.006560171237203670.01312034247440730.993439828762796
880.005285655803454250.01057131160690850.994714344196546
890.005391119644948170.01078223928989630.994608880355052
900.003920539382369590.007841078764739180.99607946061763
910.002738921448317770.005477842896635550.997261078551682
920.001955354176792200.003910708353584410.998044645823208
930.001961115485410440.003922230970820890.99803888451459
940.001320028127717630.002640056255435270.998679971872282
950.001055772682601570.002111545365203140.998944227317398
960.001020732639916340.002041465279832690.998979267360084
970.0006448857919670180.001289771583934040.999355114208033
980.0004360826104749580.0008721652209499160.999563917389525
990.0002525366586388090.0005050733172776170.999747463341361
1000.000557842517056510.001115685034113020.999442157482944
1010.0003104137282662650.0006208274565325310.999689586271734
1020.00018195030899030.00036390061798060.99981804969101
1030.0001764518608299760.0003529037216599520.99982354813917
1040.0002181165769475680.0004362331538951360.999781883423052
1050.0002584092544882340.0005168185089764690.999741590745512
1060.0008930615422848560.001786123084569710.999106938457715
1070.003808322231280360.007616644462560710.99619167776872
1080.02966693804904790.05933387609809580.970333061950952
1090.1540470382721770.3080940765443540.845952961727823
1100.1899258646217170.3798517292434340.810074135378283
1110.3418660529019470.6837321058038950.658133947098053
1120.9964318808575470.007136238284905330.00356811914245266
1130.9883714025577040.02325719488459280.0116285974422964
1140.9658268949005120.06834621019897530.0341731050994877
1150.9064278937014370.1871442125971270.0935721062985634


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level380.342342342342342NOK
5% type I error level760.684684684684685NOK
10% type I error level870.783783783783784NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/10ifgh1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/10ifgh1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/1kui51261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/1kui51261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/2eu0d1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/2eu0d1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/3eqvr1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/3eqvr1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/4prry1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/4prry1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/5tn8z1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/5tn8z1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/6puxu1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/6puxu1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/762at1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/762at1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/8me2y1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/8me2y1261943629.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/99thb1261943629.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261943805vx1rr1uwnbv3vka/99thb1261943629.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