Home » date » 2009 » Nov » 21 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sat, 21 Nov 2009 05:55:31 -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/Nov/21/t1258808472lyqpg4d861kbhz4.htm/, Retrieved Sat, 21 Nov 2009 14:01:24 +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/Nov/21/t1258808472lyqpg4d861kbhz4.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 «
3.75 0 3.51 3.37 3.21 3 4.11 0 3.75 3.51 3.37 3.21 4.25 0 4.11 3.75 3.51 3.37 4.25 0 4.25 4.11 3.75 3.51 4.5 0 4.25 4.25 4.11 3.75 4.7 0 4.5 4.25 4.25 4.11 4.75 0 4.7 4.5 4.25 4.25 4.75 0 4.75 4.7 4.5 4.25 4.75 0 4.75 4.75 4.7 4.5 4.75 0 4.75 4.75 4.75 4.7 4.75 0 4.75 4.75 4.75 4.75 4.75 0 4.75 4.75 4.75 4.75 4.58 0 4.75 4.75 4.75 4.75 4.5 0 4.58 4.75 4.75 4.75 4.5 0 4.5 4.58 4.75 4.75 4.49 0 4.5 4.5 4.58 4.75 4.03 0 4.49 4.5 4.5 4.58 3.75 0 4.03 4.49 4.5 4.5 3.39 0 3.75 4.03 4.49 4.5 3.25 0 3.39 3.75 4.03 4.49 3.25 0 3.25 3.39 3.75 4.03 3.25 0 3.25 3.25 3.39 3.75 3.25 0 3.25 3.25 3.25 3.39 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 3.25 0 3.25 3.25 3.25 3.25 2.85 0 3.25 3.25 3.25 3.25 2.75 0 2.85 3.25 3.25 3.25 2.75 0 2.75 2.85 3.25 3.25 2.55 0 2.75 2.75 2.85 3.25 2.5 0 2.55 2.75 2.75 2.85 2.5 0 2.5 2.55 2.75 2.75 2.1 0 2.5 2.5 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y(t)[t] = + 0.103460639622265 -0.119452797409169`X(t)`[t] + 1.52190634840442`Y(t-1)`[t] -0.619397555123749`Y(t-2)`[t] + 0.254793166385373`Y(t-3)`[t] -0.190018800639385`Y(t-4)`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.1034606396222650.0352362.93630.004060.00203
`X(t)`-0.1194527974091690.039381-3.03330.003030.001515
`Y(t-1)`1.521906348404420.09408816.175300
`Y(t-2)`-0.6193975551237490.17246-3.59150.0004960.000248
`Y(t-3)`0.2547931663853730.1718651.48250.1411140.070557
`Y(t-4)`-0.1900188006393850.091765-2.07070.040770.020385


Multiple Linear Regression - Regression Statistics
Multiple R0.994995919607588
R-squared0.99001688003575
Adjusted R-squared0.989554698555923
F-TEST (value)2142.05225273751
F-TEST (DF numerator)5
F-TEST (DF denominator)108
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.107112126367783
Sum Squared Residuals1.23908482242302


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13.753.605811823933640.144188176066364
24.113.885216648320760.224783351679238
34.254.2897155557083-0.0397155557082959
44.254.31434705248335-0.0643470524833468
54.54.273752422511310.226247577488695
64.74.621493284676180.0785067153238155
74.754.744422533486620.00557746651338359
84.754.76033663147843-0.0103366314784305
94.754.732820686839470.0171793131605282
104.754.707556585030860.0424434149691367
114.754.698055644998890.0519443550011059
124.754.698055644998890.0519443550011059
134.584.69805564499889-0.118055644998894
144.54.439331565770140.0606684342298568
154.54.422876642268830.0771233577311728
164.494.429113608393210.0608863916067867
174.034.42581428770703-0.395814287707035
183.753.747132847043390.00286715295660920
193.393.60337401318322-0.213374013183224
203.253.113614374661410.136385625338595
213.253.139597167435550.110402832564452
223.253.187792549433170.0622074505668336
233.253.220528274369390.0294717256306073
243.253.247130906458910.00286909354109334
253.253.247130906458910.00286909354109334
263.253.247130906458910.00286909354109334
273.253.247130906458910.00286909354109334
283.253.247130906458910.00286909354109334
293.253.247130906458910.00286909354109334
303.253.247130906458910.00286909354109334
313.253.247130906458910.00286909354109334
322.853.24713090645891-0.397130906458907
332.752.638368367097140.111631632902860
342.752.733936754306200.0160632456938030
352.552.69395924326442-0.143959243264422
362.52.440106177200760.0598938227992451
372.52.50689225086922-0.00689225086922279
382.12.48690349534834-0.386903495348335
3921.903405057795180.0965949422048237
4022.00847438503620-0.00847438503620295
4121.968496873994430.0315031260055718
4222.01902507761164-0.0190250776116448
4322.03802695767558-0.0380269576755834
4422.03802695767558-0.0380269576755834
4522.03802695767558-0.0380269576755834
4622.03802695767558-0.0380269576755834
4722.03802695767558-0.0380269576755834
4822.03802695767558-0.0380269576755834
4922.03802695767558-0.0380269576755834
5022.03802695767558-0.0380269576755834
5122.03802695767558-0.0380269576755834
5222.03802695767558-0.0380269576755834
5322.03802695767558-0.0380269576755834
5422.03802695767558-0.0380269576755834
5522.03802695767558-0.0380269576755834
5622.03802695767558-0.0380269576755834
5722.03802695767558-0.0380269576755834
5822.03802695767558-0.0380269576755834
5922.03802695767558-0.0380269576755834
6022.03802695767558-0.0380269576755834
6122.03802695767558-0.0380269576755834
6222.03802695767558-0.0380269576755834
6322.03802695767558-0.0380269576755834
6422.03802695767558-0.0380269576755834
6522.03802695767558-0.0380269576755834
6622.03802695767558-0.0380269576755834
6722.03802695767558-0.0380269576755834
682.212.038026957675580.171973042324417
692.252.35762729084051-0.107627290840511
702.252.28843005820070-0.0384300582007008
712.452.317160720936680.132839279063321
722.52.59182976913871-0.0918297691387076
732.52.5364448235086-0.0364448235086029
742.642.556433579029490.0835664209705096
752.752.74423636599750.00576363400249928
762.932.815429466572690.114570533427308
7733.05690992151583-0.0569099215158281
783.173.053376422194740.116623577805260
793.253.29370337444386-0.0437033744438632
803.393.293790435477070.0962095645229338
813.53.487319042084540.0126809579154582
823.53.55609333989384-0.0560933398938371
833.653.508429148073030.141570851926973
843.753.738139716546570.0118602834534337
853.753.77651865004811-0.0265186500481137
863.93.752797869493540.147202130506455
8743.978060318296840.0219396817031628
8844.01833943980478-0.0183394398047782
8943.994618659250210.0053813407497906
9043.991595155792840.00840484420716092
9143.97259327572890.0274067242710995
9243.97259327572890.0274067242710995
9343.97259327572890.0274067242710995
9443.97259327572890.0274067242710995
9543.97259327572890.0274067242710995
9643.97259327572890.0274067242710995
9743.97259327572890.0274067242710995
9843.97259327572890.0274067242710995
994.183.97259327572890.207406724271099
1004.254.24653641844170.00346358155830441
1014.254.241578302907730.0084216970922696
1023.974.12463044658926-0.154630446589265
1033.423.68212880656791-0.262128806567915
1042.753.00521031433538-0.255210314335377
1052.312.254859629634570.0551403703654259
10621.913286220936610.0867137790633864
1071.661.647829096059150.0121709039408454
1081.311.33759778290884-0.0275977829088377
1091.091.020148120411230.0698518795887705
11010.8743940196827520.125605980317248
11110.8491186944360890.150881305563911
11210.9153165580162290.0846834419837712
11310.934189309182210.0658106908177902
11410.9512910012397550.0487089987602455


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.5961928136110310.8076143727779370.403807186388969
100.4643812208337990.9287624416675970.535618779166201
110.3219264756498170.6438529512996330.678073524350183
120.2096482000708970.4192964001417940.790351799929103
130.364514946783910.729029893567820.63548505321609
140.2645652255474940.5291304510949870.735434774452506
150.2041205141761330.4082410283522650.795879485823867
160.1451659918078630.2903319836157250.854834008192137
170.958199015967840.08360196806432050.0418009840321602
180.9359319832179850.128136033564030.064068016782015
190.9919789734475120.01604205310497580.00802102655248791
200.9961582113360970.007683577327805030.00384178866390252
210.9945625918497040.01087481630059280.00543740815029642
220.9913770234798370.01724595304032680.0086229765201634
230.987723916389020.02455216722195840.0122760836109792
240.984128752039060.03174249592187820.0158712479609391
250.9786753020982630.04264939580347390.0213246979017370
260.9709876025367330.0580247949265350.0290123974632675
270.9605671138813050.07886577223738980.0394328861186949
280.9468528070008160.1062943859983670.0531471929991837
290.9292688737239690.1414622525520630.0707311262760313
300.9072749041400370.1854501917199250.0927250958599626
310.8804200281655330.2391599436689340.119579971834467
320.998571837083650.002856325832700260.00142816291635013
330.998433090267150.003133819465699210.00156690973284961
340.9974796929948390.005040614010322320.00252030700516116
350.9980898014152980.00382039716940340.0019101985847017
360.9972524888918910.005495022216217010.00274751110810851
370.995749436397070.008501127205861020.00425056360293051
380.9999911646424951.76707150100390e-058.83535750501948e-06
390.9999917677760441.64644479127333e-058.23222395636666e-06
400.9999845567858353.0886428330954e-051.5443214165477e-05
410.9999783968620474.3206275906652e-052.1603137953326e-05
420.999961974134857.60517302979685e-053.80258651489842e-05
430.9999361054028340.00012778919433196.389459716595e-05
440.9998941668283470.0002116663433062290.000105833171653114
450.9998274754459360.0003450491081285980.000172524554064299
460.9997234768141570.0005530463716860310.000276523185843016
470.9995644832655530.00087103346889420.0004355167344471
480.9993262372970760.001347525405848160.00067376270292408
490.9989763995126380.002047200974723840.00102360048736192
500.9984731365174970.003053726965004980.00152686348250249
510.9977640769036530.004471846192693290.00223592309634665
520.996786006837240.00642798632551850.00321399316275925
530.9954657803727920.009068439254415780.00453421962720789
540.99372300931420.01255398137159960.00627699068579978
550.9914751569427740.01704968611445130.00852484305722563
560.9886456736636830.02270865267263350.0113543263363168
570.98517576919650.02964846160699990.0148242308035000
580.9810403109862740.03791937802745180.0189596890137259
590.9762681739912320.04746365201753630.0237318260087682
600.9709671408705860.0580657182588270.0290328591294135
610.965353124268670.06929375146266050.0346468757313303
620.9597828878663880.0804342242672240.040217112133612
630.9547880599544760.0904238800910480.045211940045524
640.9511046179055780.09779076418884450.0488953820944222
650.949682384823080.1006352303538410.0503176151769204
660.9516339473191370.0967321053617260.048366052680863
670.95802038317530.08395923364940.0419796168247
680.9641023314641420.0717953370717160.035897668535858
690.9853401264988570.0293197470022860.014659873501143
700.9876897314437440.02462053711251270.0123102685562563
710.9857558163748640.02848836725027180.0142441836251359
720.9955585917920180.00888281641596420.0044414082079821
730.9972451260163660.005509747967268160.00275487398363408
740.9958159274026920.008368145194616040.00418407259730802
750.9964382067748120.007123586450375240.00356179322518762
760.9953221868299890.009355626340022270.00467781317001113
770.9977819652147240.004436069570551960.00221803478527598
780.9969812653424510.006037469315097350.00301873465754868
790.9984792479814460.003041504037107720.00152075201855386
800.9977716577840450.00445668443191080.0022283422159554
810.9973156305239560.005368738952088840.00268436947604442
820.9982925437611420.003414912477715470.00170745623885773
830.9984952400492710.003009519901457130.00150475995072856
840.9985689618405430.002862076318914150.00143103815945707
850.9979816193803930.004036761239213820.00201838061960691
860.9990908337515360.001818332496928600.000909166248464302
870.998913225685160.002173548629682810.00108677431484141
880.9979995360621830.004000927875633440.00200046393781672
890.996275715114240.007448569771518250.00372428488575913
900.994220030294130.01155993941173930.00577996970586964
910.9899347448128150.02013051037436960.0100652551871848
920.9830131555631420.03397368887371690.0169868444368585
930.972263665456950.05547266908609940.0277363345430497
940.9562804240129920.08743915197401570.0437195759870078
950.9336817881613960.1326364236772080.066318211838604
960.9036813881817570.1926372236364860.0963186118182428
970.8673887790652670.2652224418694660.132611220934733
980.8312744552615930.3374510894768140.168725544738407
990.9401901719196750.119619656160650.059809828080325
1000.9700727814573260.05985443708534830.0299272185426741
1010.9400161196841020.1199677606317970.0599838803158983
1020.9136242988991430.1727514022017130.0863757011008567
1030.9126025331522740.1747949336954530.0873974668477265
1040.935777979094240.1284440418115210.0642220209057607
1050.9822250926778040.03554981464439140.0177749073221957


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level410.422680412371134NOK
5% type I error level600.618556701030928NOK
10% type I error level740.762886597938144NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/107agz1258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/107agz1258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/1iiti1258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/1iiti1258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/25d2b1258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/25d2b1258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/3w1091258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/3w1091258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/4u9lo1258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/4u9lo1258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/5u5ch1258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/5u5ch1258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/63da71258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/63da71258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/7efu31258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/7efu31258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/884401258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/884401258808125.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/9ti1h1258808125.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258808472lyqpg4d861kbhz4/9ti1h1258808125.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