Home » date » 2009 » Dec » 27 »

Case - Multiple Regression 2

*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 13:42:11 -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/t1261946708hfcazvofsvbd395.htm/, Retrieved Sun, 27 Dec 2009 21:45:21 +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/t1261946708hfcazvofsvbd395.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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 12617.1577967151 + 0.751444966508494X[t] + 44.4638308275148t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12617.1577967151412.5241330.585300
X0.7514449665084940.4616031.62790.1062360.053118
t44.463830827514810.9401994.06438.8e-054.4e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.781533035081483
R-squared0.610793884923674
Adjusted R-squared0.604140788939464
F-TEST (value)91.8059631746223
F-TEST (DF numerator)2
F-TEST (DF denominator)117
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1711.90625887954
Sum Squared Residuals342882895.58534


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
111881.412979.7834263624-1098.38342636237
210374.213009.7443693362-2635.54436933618
31382813126.2717724519701.728227548131
413490.513150.1460111971340.353988802946
513092.213212.2687987375-120.068798737517
613184.413306.2528528579-121.852852857943
712398.413255.1328839456-856.732883945577
813882.313377.2961243101505.003875689929
915861.513451.36688681802410.13311318198
1013286.113451.1197421383-165.019742138278
1115634.913576.06332887892058.83667112115
121421113572.4346818498638.565318150175
1313646.813588.418748446758.3812515533315
1412224.613642.5010748455-1417.90107484549
1515916.413740.46778728842175.93221271159
1616535.913807.47496711122728.42503288882
171579613829.09487095681966.90512904316
1814418.613908.1251702437510.474829756258
1915044.513925.76241576691118.73758423310
2014944.214010.2031188127933.99688118733
2116754.814099.37792514742655.42207485256
221425414104.2406062400149.759393760042
2315454.914173.35183196901281.54816803105
2415644.814318.73472179861326.06527820144
2514568.314290.9846913446277.315308655394
2612520.214264.5872618304-1744.38726183037
271480314375.7042611872427.295738812812
2815873.214504.02935027711369.17064972295
2914755.314514.0770016385241.222998361523
3012875.115317.9511156195-2442.85111561947
3114291.115450.7097300117-1159.60973001174
3214205.315517.4163318479-1312.11633184791
3315859.415649.7992237569209.600776243086
3415258.915346.344035091-87.4440350909955
3515498.615321.2992065165177.300793483526
3615106.515566.6994213884-460.199421388360
3715023.615528.5794503966-504.979450396591
381208315698.3091571411-3615.30915714107
3915761.315977.6746844991-216.374684499144
401694315884.92466444221058.07533555779
4115070.315737.5445953201-667.244595320103
4213659.616096.1875666448-2436.58756664482
4314768.915850.2930624135-1081.39306241345
4414725.115830.6586375978-1105.55863759779
4515998.115998.6600209193-0.560020919302559
4615370.615861.8753258250-491.275325824968
4714956.915793.5472671796-836.647267179559
4815469.716177.9648008555-708.264800855516
4915101.816271.7985659826-1169.99856598264
5011703.716159.8115547831-4456.11155478309
5116283.616579.5470018849-295.947001884942
5216726.516342.8952707416383.604729258370
5314968.916565.2261251417-1596.32612514171
541486116262.9732484222-1401.9732484222
5514583.316222.9746650142-1639.67466501416
5615305.816684.3401632606-1378.54016326059
5717903.916754.6537009361149.24629906401
5816379.416671.5221764504-292.122176450368
5915420.316594.0264892136-1173.72648921355
6017870.517062.4555701452808.044429854839
6115912.816784.6246548372-871.824654837183
6213866.516627.0249341706-2760.52493417056
6317823.216908.8702299181914.329770081889
641787217009.7675777304862.232422269586
6517420.417347.069512006373.3304879937121
6616704.416948.0305236005-243.630523600489
6715991.216817.6331107215-826.433110721478
6816583.617241.7269386291-658.126938629086
6919123.517575.57222605901547.92777394098
7017838.717405.4985189484433.20148105164
7117209.417342.2802860752-132.880286075207
7218586.517498.03311644261088.46688355737
7316258.117441.2021657848-1183.1021657848
7415141.617627.2382283025-2485.63822830252
7519202.117823.04307538481379.05692461516
7617746.517930.4028499091-183.902849909117
7719090.117952.39847623801137.70152376197
7818040.317591.7583256208448.541674379186
7917515.517925.7539020441-410.253902044051
8017751.817931.4431725997-179.643172599728
8121072.418266.03990499622806.36009500383
821717017985.8795102920-815.879510292018
8319439.518100.60344548811338.89655451192
8419795.418214.12506873771581.27493126228
8517574.918152.7103037842-577.810303784188
8616165.418398.6365301326-2233.23653013263
8719464.618409.81134894381054.78865105618
8819932.118663.55260294391268.54739705605
8919961.218383.31706374311577.88293625686
9017343.418185.8156153549-842.415615354923
9118924.218719.0192523996205.180747600436
9218574.118810.8992606138-236.799260613767
9321350.619046.60583541772303.99416458231
9418594.618603.9830389544-9.3830389544023
9519823.118698.71853804131124.38146195866
9620844.418935.10141331511909.29858668488
9719640.219027.2068550193612.99314498073
9817735.418767.1100409209-1031.71004092089
9919813.619428.6604782452384.939521754815
1002216019096.65038085193063.34961914806
10120664.319751.8886804576912.411319542437
10217877.418621.4683061490-744.068306149044
10320906.519138.8915988971767.60840110299
10421164.119146.91034884892017.18965115114
10521374.419304.16606914932070.2339308507
10622952.319483.9651384453468.33486155500
10721343.519055.46950735212288.03049264794
10823899.319624.66735829254274.63264170754
10922392.919469.02139453882923.87860546124
11018274.119290.0054923267-1015.90549232665
11122786.719931.64263803852855.05736196153
11222321.519766.67875670012554.82124329994
11317842.219980.217704992-2138.01770499199
11416373.519693.2943055893-3319.79430558926
11515993.819558.4633674078-3564.66336740785
11616446.119888.2508520186-3442.15085201864
1171772920145.6741863547-2416.67418635466
1181664320015.201628979-3372.20162897900
11916196.719867.5961263669-3670.89612636694
12018252.120103.8287126474-1851.72871264742


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.2077326479840470.4154652959680950.792267352015953
70.1181866140805970.2363732281611930.881813385919403
80.0525843632659530.1051687265319060.947415636734047
90.04350584096254570.08701168192509130.956494159037454
100.02386295736872890.04772591473745770.976137042631271
110.01089150166837880.02178300333675760.989108498331621
120.004784159059786840.009568318119573680.995215840940213
130.001872501537882460.003745003075764920.998127498462118
140.003258487358216510.006516974716433030.996741512641784
150.002413861118916820.004827722237833630.997586138881083
160.001548422511277770.003096845022555550.998451577488722
170.0008690942484724620.001738188496944920.999130905751528
180.002220397436997420.004440794873994840.997779602563003
190.001103172780995330.002206345561990660.998896827219005
200.001072645452625190.002145290905250370.998927354547375
210.000712267854927250.00142453570985450.999287732145073
220.001065393314849270.002130786629698530.99893460668515
230.0007660032158013520.001532006431602700.999233996784199
240.004697665913030120.009395331826060240.99530233408697
250.005570790637219730.01114158127443950.99442920936278
260.007419744462757050.01483948892551410.992580255537243
270.005365190429007750.01073038085801550.994634809570992
280.00584101554420040.01168203108840080.9941589844558
290.006039733735624480.01207946747124900.993960266264376
300.1144602902297970.2289205804595940.885539709770203
310.08864040765016140.1772808153003230.911359592349839
320.06801614563243710.1360322912648740.931983854367563
330.0634543840878910.1269087681757820.93654561591211
340.0466777434298460.0933554868596920.953322256570154
350.03474734393330640.06949468786661270.965252656066694
360.02445539405870410.04891078811740820.975544605941296
370.01728381412589180.03456762825178370.982716185874108
380.05377139116265140.1075427823253030.946228608837349
390.04439903639947420.08879807279894840.955600963600526
400.04601434361804720.09202868723609440.953985656381953
410.03472122582208210.06944245164416430.965278774177918
420.04196186800947340.08392373601894680.958038131990527
430.0333019647446760.0666039294893520.966698035255324
440.02670561024462720.05341122048925430.973294389755373
450.01947600875231310.03895201750462620.980523991247687
460.01419058345777220.02838116691554440.985809416542228
470.01132504776183520.02265009552367030.988674952238165
480.007830929028994490.01566185805798900.992169070971005
490.00574477567319320.01148955134638640.994255224326807
500.04183357550721240.08366715101442480.958166424492788
510.03555322133867410.07110644267734820.964446778661326
520.02959228808518490.05918457617036990.970407711914815
530.02669964464204930.05339928928409850.97330035535795
540.02155687575534310.04311375151068620.978443124244657
550.01809975771943940.03619951543887880.98190024228056
560.01541163440953270.03082326881906540.984588365590467
570.01827945939488070.03655891878976140.98172054060512
580.01355132915565210.02710265831130430.986448670844348
590.01027778647409730.02055557294819460.989722213525903
600.01072971260448170.02145942520896330.989270287395518
610.00790625069555940.01581250139111880.99209374930444
620.01175102326959640.02350204653919290.988248976730404
630.01128391041580530.02256782083161050.988716089584195
640.01029244825941570.02058489651883130.989707551740584
650.008742273783804860.01748454756760970.991257726216195
660.006091906856940320.01218381371388060.99390809314306
670.004272410793513110.008544821587026220.995727589206487
680.003153289619867010.006306579239734010.996846710380133
690.003949857578382240.007899715156764470.996050142421618
700.002968226341112250.005936452682224490.997031773658888
710.002021789059609690.004043578119219380.99797821094039
720.001721525823528180.003443051647056350.998278474176472
730.001414991682634170.002829983365268350.998585008317366
740.002939341527031810.005878683054063610.997060658472968
750.002919606902539520.005839213805079040.99708039309746
760.002496085570679820.004992171141359630.99750391442932
770.002198262218853880.004396524437707750.997801737781146
780.001466118214689650.002932236429379310.99853388178531
790.001170310861763260.002340621723526510.998829689138237
800.000878986056838960.001757972113677920.99912101394316
810.001603886505092290.003207773010184570.998396113494908
820.001439164006990430.002878328013980850.99856083599301
830.001100850051002060.002201700102004110.998899149948998
840.000883263989401990.001766527978803980.999116736010598
850.0007301461274700860.001460292254940170.99926985387253
860.002592758911816160.005185517823632320.997407241088184
870.002005982127705940.004011964255411880.997994017872294
880.001730435388519250.003460870777038490.99826956461148
890.001267169529028770.002534339058057540.998732830470971
900.001331412628945360.002662825257890730.998668587371055
910.001291277145938170.002582554291876350.998708722854062
920.001813037249039870.003626074498079730.99818696275096
930.001880911727419000.003761823454837990.998119088272581
940.001943698709340240.003887397418680470.99805630129066
950.001492359793591840.002984719587183680.998507640206408
960.001176780011496630.002353560022993260.998823219988503
970.001223853972286030.002447707944572070.998776146027714
980.003921272725550020.007842545451100050.99607872727445
990.01117655911209160.02235311822418310.988823440887908
1000.01026674147811600.02053348295623190.989733258521884
1010.1289000426030030.2578000852060060.871099957396997
1020.1580272857852710.3160545715705420.841972714214729
1030.1866261266594500.3732522533188990.81337387334055
1040.1852679637113860.3705359274227710.814732036288614
1050.2038876067570090.4077752135140180.796112393242991
1060.1837977502824270.3675955005648530.816202249717573
1070.1468513682484480.2937027364968960.853148631751552
1080.1579138650667220.3158277301334450.842086134933278
1090.1953805054612790.3907610109225580.804619494538721
1100.1432878353049590.2865756706099180.856712164695041
1110.1681243583831580.3362487167663160.831875641616842
1120.9806502202796780.03869955944064360.0193497797203218
1130.9591096635645540.08178067287089150.0408903364354457
1140.9057899960304420.1884200079391170.0942100039695584


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level450.412844036697248NOK
5% type I error level750.688073394495413NOK
10% type I error level890.81651376146789NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/10dhh81261946521.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/10dhh81261946521.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/54z1z1261946521.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/54z1z1261946521.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/7jjuj1261946521.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/7jjuj1261946521.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/87apc1261946521.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/87apc1261946521.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/969c41261946521.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t1261946708hfcazvofsvbd395/969c41261946521.ps (open in new window)


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