Home » date » 2010 » Dec » 09 »

*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: Thu, 09 Dec 2010 09:37:57 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd.htm/, Retrieved Thu, 09 Dec 2010 10:38:44 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
-0.0326433382 0.0117006692 -0.0066969042 0.0407013064 -0.0128665773 -0.0778003889 0.0173917427 0.2208242615 -0.1696576949 -0.0125923592 0.0869788752 0.044072034 0.039110383 0.0117006692 -0.0066969042 0.0407013064 -0.0128665773 -0.0326433382 0.0173917427 0.2208242615 -0.1696576949 -0.0125923592 0.0882361169 0.0423550366 0.039110383 0.0117006692 -0.0066969042 0.0407013064 0.044072034 -0.0326433382 0.0173917427 0.2208242615 -0.1696576949 -0.0355066885 -0.0356327003 0.0423550366 0.039110383 0.0117006692 -0.0066969042 0.0882361169 0.044072034 -0.0326433382 0.0173917427 0.2208242615 0.0278273388 0.004227877 -0.0356327003 0.0423550366 0.039110383 0.0117006692 -0.0355066885 0.0882361169 0.044072034 -0.0326433382 0.0173917427 -0.2004308914 0.0210328888 0.004227877 -0.0356327003 0.0423550366 0.039110383 0.0278273388 -0.0355066885 0.0882361169 0.044072034 -0.0326433382 -0.0263424279 -0.031774003 0.0210328888 0.004227877 -0.0356327003 0.0423550366 -0.2004308914 0.0278273388 -0.0355066885 0.0882361169 0.044072034 0 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
(1-B)lnYt[t] = + 0.00668792198944815 + 0.564381448485195`(1-B)lnX_[t-1]`[t] + 0.189102494116169`(1-B)lnX_[t-2]`[t] -0.0904226553207113`(1-B)lnX_[t-3]`[t] + 0.152712556338415`(1-B)lnX_[t-4]`[t] -0.057034187147676`(1-B)lnX_[t-5]`[t] + 0.258408373637674`(1-B)lnY_[t-1]`[t] -0.0554449120219212`(1-B)lnY_[t-2]`[t] -0.0247153522663553`(1-B)lnY_[t-3]`[t] -0.01140685785384`(1-B)lnY_[t-4]`[t] + 0.000229808193820455`(1-B)lnY_[t-5]`[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.006687921989448150.0085950.77810.4385060.219253
`(1-B)lnX_[t-1]`0.5643814484851950.1730123.26210.0015520.000776
`(1-B)lnX_[t-2]`0.1891024941161690.1906710.99180.323910.161955
`(1-B)lnX_[t-3]`-0.09042265532071130.188738-0.47910.6330110.316505
`(1-B)lnX_[t-4]`0.1527125563384150.2272040.67210.503180.25159
`(1-B)lnX_[t-5]`-0.0570341871476760.219839-0.25940.7958780.397939
`(1-B)lnY_[t-1]`0.2584083736376740.1056822.44520.0163830.008191
`(1-B)lnY_[t-2]`-0.05544491202192120.105496-0.52560.6004570.300228
`(1-B)lnY_[t-3]`-0.02471535226635530.102569-0.2410.810120.40506
`(1-B)lnY_[t-4]`-0.011406857853840.108939-0.10470.9168350.458418
`(1-B)lnY_[t-5]`0.0002298081938204550.1056710.00220.998270.499135


Multiple Linear Regression - Regression Statistics
Multiple R0.50209976555684
R-squared0.252104174572234
Adjusted R-squared0.170811150069216
F-TEST (value)3.10117843583092
F-TEST (DF numerator)10
F-TEST (DF denominator)92
p-value0.00190991425640519
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.0834335845071244
Sum Squared Residuals0.640426998181088


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1-0.03264333820.00742460276233826-0.0400679409623383
20.0440720340.02560373190287930.0184683020971207
30.08823611690.04379686390918330.0444392529908167
4-0.03550668850.0142357920576378-0.0497424805576378
50.0278273388-0.01096909215820410.038796430958204
6-0.20043089140.0332859874451499-0.23371687884515
7-0.0263424279-0.06896161925759650.0426191913575965
80.06550517180.0005813688294878380.0649238029705122
9-0.07093575140.0354942962446731-0.106430047644673
10-0.012918559-0.04851241566588970.0355938566658898
110.118395754-0.001259269579407720.119655023579408
12-0.03309321730.0351899338116709-0.0682831511116709
13-0.0860908693-0.00999288721735508-0.0760979820826449
140.02106983910.006296467292810620.0147733718071894
150.014945670.01173449373524510.00321117626475487
16-0.190034757-0.0471452574182717-0.142889499581728
17-0.1242436027-0.0512533013620111-0.0729903013379889
180.0062305498-0.00202939188430380.0082599416843038
190.0255507001-0.0003918300717811120.0259425301717811
200.02688066280.0414166688200596-0.0145360060200596
210.17731559660.02546070716722570.151854889432774
220.06605423730.04558785296219850.0204663843378015
23-0.01395912550.0320022137876948-0.0459613392876948
24-0.0373949697-0.00252298120481733-0.0348719884951827
250.0366137196-0.06175921241905250.0983729320190525
260.019350449-0.05279156104674430.0721420100467443
270.0837801497-0.02520318459639220.108983334296392
28-0.0369814175-0.0244574164228798-0.0125240010771202
29-0.111311701-0.0638558400290544-0.0474558609709456
300.11569127010.0007328518679718820.114958418232028
310.09610440850.03660880382575560.0594956046742444
320.0671607829-0.0001652744695639780.067326057369564
33-0.0791409595-0.0291430667184888-0.0499978927815112
34-0.1831923744-0.0872395777001208-0.0959527966998792
350.02423157290.01740480931582610.00682676358417388
360.06826000230.06263238397022640.00562761832977362
370.03458557960.03405332877827490.000532250821725067
380.04635904470.03910970278045580.00724934191954416
39-0.09311515990.038871541539403-0.131986701439403
400.0760673553-0.00316145409781780.0792288093978178
41-0.01106511980.0354414863335174-0.0465066061335174
420.02845093360.02323075288541180.00522018071458824
430.03682618820.0228783297380470.013947858461953
44-0.00588044820.0529467109696441-0.0588271591696441
450.06807501920.03867923364274380.0293957855572562
460.01579140010.0171071252501236-0.00131572515012358
470.11217664250.02545971580276790.086716926697232
48-0.04376644550.0261296140135815-0.0698960595135815
490.060326653-0.01265441762649420.0729810706264942
500.10286734410.03108678800879190.0717805560912081
510.02595097270.0332576836204554-0.00730671092045543
520.13486957460.04769658702139420.0871729875786058
53-0.0967153180.0676181102466701-0.16433342824667
54-0.1035936648-0.00314465458577151-0.100449010214228
550.09503890750.005944398924861150.0890945085751389
560.03597190680.0541497175885549-0.0181778107885549
570.15206094530.03709523211295080.114965713187049
58-0.00225056360.0537223114719809-0.0559728750719809
59-0.0277954311-0.00162728509546373-0.0261681460045363
600.0653827593-0.01126576159713250.0766485208971325
610.04438886260.02553664714080660.0188522154591934
620.10109611690.03097364496648160.0701224719335184
63-0.00297502760.0455643614523336-0.0485393890523336
64-0.07520626990.00851828136081939-0.0837245512608194
65-0.0525843352-0.0114933901245308-0.0410909450754692
660.02290041950.01171407112884260.0111863483711574
670.10096214220.04149298201870990.05946916018129
68-0.02890882460.066735641994235-0.095644466594235
690.02084745160.0242051126621739-0.00335766106217393
700.07885782280.03386628468973680.0449915381102632
710.05493143220.02904393377384920.0258874984261508
72-0.03216527820.0021643582108228-0.0343296364108228
730.0646729207-0.04444337052358650.109116291223587
74-0.00107570270.0312847667960109-0.0323604694960109
75-0.14588856910.0360764937015289-0.181965062801529
76-0.0677816324-0.0200375151453304-0.0477441172546696
77-0.00987703690.0304548760408192-0.0403319129408192
780.05019915630.02960773806037010.0205914182396299
79-0.12710636310.0364657824036765-0.163572145503676
800.0582277708-0.0006746768289663040.0589024476289663
810.05955526480.03960637689928410.0199488879007159
820.08850412530.004611419377341480.0838927059226585
830.00044336070.0525601631729873-0.0521168024729873
840.03798108350.02545945061616460.0125216328838354
850.0681769863-0.001731518626947340.0699085049269473
86-0.05209084860.0187450143702702-0.0708358629702702
870.0666010623-0.05835962772580160.124960690025802
880.06771739450.01897165192337260.0487457425766274
890.12511274830.04954668618052230.0755660621194777
90-0.0218349286-0.0172409202966318-0.00459400830336819
910.0178312442-0.01618602107783540.0340172652778354
920.0199663138-0.01883667015047550.0388029839504755
930.088436301-0.03525299261019670.123689293610197
940.06460540280.02600922501187620.0385961777881238
950.12339123530.03520485400091790.088186381299082
960.06733087040.03350139268170260.0338294777182974
970.0232412696-0.03847691724606750.0617181868460675
98-0.1570633927-0.0822930036807366-0.0747703890192634
99-0.134923147-0.0605896045706095-0.0743335424293905
100-0.2920959272-0.0342882639927804-0.25780766320722
101-0.3111517877-0.249359850585182-0.0617919371148185
102-0.2363887781-0.146487540930086-0.0899012371699145
1030.0334524402-0.06664297423294260.100095414432943


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
140.5443728794262830.9112542411474340.455627120573717
150.4361077286326960.8722154572653910.563892271367304
160.6750387000449680.6499225999100640.324961299955032
170.5585265513617080.8829468972765840.441473448638292
180.5018395783718710.9963208432562570.498160421628129
190.4875605629124070.9751211258248140.512439437087593
200.4056201159182830.8112402318365670.594379884081717
210.3972432118863810.7944864237727630.602756788113619
220.3131577828895080.6263155657790160.686842217110492
230.2795481092207490.5590962184414980.720451890779251
240.207966189281380.415932378562760.79203381071862
250.2234061057448270.4468122114896550.776593894255173
260.4649389277001340.9298778554002690.535061072299866
270.6400453345805620.7199093308388760.359954665419438
280.6494164195532510.7011671608934980.350583580446749
290.6824601243788850.6350797512422310.317539875621115
300.7535270891165030.4929458217669940.246472910883497
310.7307613382942890.5384773234114220.269238661705711
320.69342346709520.61315306580960.3065765329048
330.6445984565616290.7108030868767430.355401543438371
340.681341967766730.637316064466540.31865803223327
350.6196507154869310.7606985690261390.380349284513069
360.5614936978381920.8770126043236160.438506302161808
370.5183537572830940.9632924854338120.481646242716906
380.4578257860042140.9156515720084280.542174213995786
390.5064116834473370.9871766331053270.493588316552663
400.5388226029521920.9223547940956150.461177397047808
410.4886472382412060.9772944764824130.511352761758794
420.4392639242534810.8785278485069630.560736075746519
430.3837525132814470.7675050265628940.616247486718553
440.3394560145181310.6789120290362620.660543985481869
450.2979059616354090.5958119232708170.702094038364591
460.2445095277891030.4890190555782060.755490472210897
470.2652952471541330.5305904943082670.734704752845867
480.2470142115685590.4940284231371190.75298578843144
490.2394710124711690.4789420249423370.760528987528831
500.2301458155003850.460291631000770.769854184499615
510.186251973529030.372503947058060.81374802647097
520.2017550409323950.403510081864790.798244959067605
530.3252759125244340.6505518250488690.674724087475566
540.3413318957784250.682663791556850.658668104221575
550.3737930128480520.7475860256961040.626206987151948
560.3309627571350460.6619255142700910.669037242864954
570.4077798467665070.8155596935330140.592220153233493
580.3921753635190880.7843507270381760.607824636480912
590.3706633985040490.7413267970080980.629336601495951
600.4021101176560410.8042202353120830.597889882343959
610.3472253627429230.6944507254858460.652774637257077
620.3905634167451470.7811268334902950.609436583254853
630.3508341702049410.7016683404098810.649165829795059
640.3623762678147360.7247525356294720.637623732185264
650.3168904167820990.6337808335641980.683109583217901
660.2674969838244720.5349939676489440.732503016175528
670.3020786603938490.6041573207876970.697921339606152
680.3245975608432060.6491951216864120.675402439156794
690.2690496323475270.5380992646950540.730950367652473
700.227090814995120.454181629990240.77290918500488
710.1831576060981570.3663152121963140.816842393901843
720.1417666896735780.2835333793471560.858233310326422
730.1425031475821810.2850062951643620.857496852417819
740.1178096568741830.2356193137483660.882190343125817
750.2358405919328430.4716811838656870.764159408067157
760.2255500710182390.4511001420364780.774449928981761
770.1883441558530750.376688311706150.811655844146925
780.160562037578980.3211240751579590.83943796242102
790.4392704381469570.8785408762939150.560729561853043
800.3748642552096930.7497285104193850.625135744790307
810.2933785429878130.5867570859756260.706621457012187
820.2664324348062470.5328648696124930.733567565193753
830.3696728413035010.7393456826070020.630327158696499
840.3734102740775010.7468205481550020.626589725922499
850.3285821208157890.6571642416315770.671417879184211
860.7123278961228890.5753442077542220.287672103877111
870.6051407455792280.7897185088415450.394859254420772
880.4887395189220420.9774790378440850.511260481077958
890.5985879519679910.8028240960640180.401412048032009


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/10m4w91291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/10m4w91291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/1qcyi1291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/1qcyi1291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/2qcyi1291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/2qcyi1291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/3qcyi1291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/3qcyi1291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/41mxl1291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/41mxl1291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/51mxl1291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/51mxl1291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/61mxl1291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/61mxl1291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/7udf61291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/7udf61291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/8m4w91291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/8m4w91291887467.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/9m4w91291887467.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291887520nt6njjok3jdwigd/9m4w91291887467.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