Home » date » 2010 » Dec » 29 »

Multiple Regression

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 29 Dec 2010 09:50:36 +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/29/t1293616114h5a2fi2ztsrd0ea.htm/, Retrieved Wed, 29 Dec 2010 10:48:37 +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/29/t1293616114h5a2fi2ztsrd0ea.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 «
1775 2197 2920 4240 5415 6136 6719 6234 7152 3646 2165 2803 1615 2350 3350 3536 5834 6767 5993 7276 5641 3477 2247 2466 1567 2237 2598 3729 5715 5776 5852 6878 5488 3583 2054 2282 1552 2261 2446 3519 5161 5085 5711 6057 5224 3363 1899 2115 1491 2061 2419 3430 4778 4862 6176 5664 5529 3418 1941 2402 1579 2146 2462 3695 4831 5134 6250 5760 6249 2917 1741 2359 1511 2059 2635 2867 4403 5720 4502 5749 5627 2846 1762 2429 1169 2154 2249 2687 4359 5382 4459 6398 4596 3024 1887 2070 1351 2218 2461 3028 4784 4975 4607 6249 4809 3157 1910 2228 1594 2467 2222 3607 4685 4962 5770 5480 5000 3228 1993 2288 1588 2105 2191 3591 4668 4885 5822 5599 5340 3082 2010 2301
 
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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
marriages[t] = + 2340.27272727273 -813.727272727272M1[t] -135.272727272727M2[t] + 200.909090909091M3[t] + 1107.81818181818M4[t] + 2626.36363636364M5[t] + 3085.54545454545M6[t] + 3283.45454545455M7[t] + 3781.90909090909M8[t] + 3173.81818181818M9[t] + 908.90909090909M10[t] -375.818181818182M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2340.27272727273137.63408517.003600
M1-813.727272727272194.64399-4.18065.6e-052.8e-05
M2-135.272727272727194.64399-0.6950.4884140.244207
M3200.909090909091194.643991.03220.304060.15203
M41107.81818181818194.643995.691500
M52626.36363636364194.6439913.493200
M63085.54545454545194.6439915.852300
M73283.45454545455194.6439916.86900
M83781.90909090909194.6439919.429900
M93173.81818181818194.6439916.305800
M10908.90909090909194.643994.66968e-064e-06
M11-375.818181818182194.64399-1.93080.0558670.027933


Multiple Linear Regression - Regression Statistics
Multiple R0.96507373665963
R-squared0.93136731719018
Adjusted R-squared0.925075987932613
F-TEST (value)148.039830544551
F-TEST (DF numerator)11
F-TEST (DF denominator)120
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation456.480619589273
Sum Squared Residuals25004946.7272727


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
117751526.54545454545248.454545454546
221972205-8.00000000000081
329202541.18181818182378.818181818182
442403448.09090909091791.90909090909
554154966.63636363636448.363636363636
661365425.81818181818710.181818181818
767195623.727272727271095.27272727273
862346122.18181818182111.818181818183
971525514.090909090911637.90909090909
1036463249.18181818182396.818181818179
1121651964.45454545455200.545454545455
1228032340.27272727273462.727272727273
1316151526.5454545454588.4545454545454
1423502205145
1533502541.18181818182808.818181818182
1635363448.0909090909187.909090909091
1758344966.63636363636867.363636363637
1867675425.818181818181341.18181818182
1959935623.72727272727369.272727272727
2072766122.181818181821153.81818181818
2156415514.09090909091126.909090909091
2234773249.18181818182227.818181818182
2322471964.45454545455282.545454545455
2424662340.27272727273125.727272727273
2515671526.5454545454540.4545454545454
262237220532.0000000000001
2725982541.1818181818256.8181818181819
2837293448.09090909091280.909090909091
2957154966.63636363636748.363636363637
3057765425.81818181818350.181818181818
3158525623.72727272727228.272727272727
3268786122.18181818182755.818181818182
3354885514.09090909091-26.0909090909091
3435833249.18181818182333.818181818182
3520541964.4545454545589.5454545454544
3622822340.27272727273-58.2727272727272
3715521526.5454545454525.4545454545454
382261220556
3924462541.18181818182-95.1818181818181
4035193448.0909090909170.9090909090911
4151614966.63636363636194.363636363636
4250855425.81818181818-340.818181818182
4357115623.7272727272787.2727272727273
4460576122.18181818182-65.1818181818184
4552245514.09090909091-290.090909090909
4633633249.18181818182113.818181818182
4718991964.45454545455-65.4545454545456
4821152340.27272727273-225.272727272727
4914911526.54545454545-35.5454545454546
5020612205-144
5124192541.18181818182-122.181818181818
5234303448.09090909091-18.0909090909089
5347784966.63636363636-188.636363636364
5448625425.81818181818-563.818181818182
5561765623.72727272727552.272727272727
5656646122.18181818182-458.181818181818
5755295514.0909090909114.9090909090909
5834183249.18181818182168.818181818182
5919411964.45454545455-23.4545454545456
6024022340.2727272727361.7272727272728
6115791526.5454545454552.4545454545454
6221462205-59
6324622541.18181818182-79.1818181818182
6436953448.09090909091246.909090909091
6548314966.63636363636-135.636363636364
6651345425.81818181818-291.818181818182
6762505623.72727272727626.272727272727
6857606122.18181818182-362.181818181818
6962495514.09090909091734.909090909091
7029173249.18181818182-332.181818181818
7117411964.45454545455-223.454545454545
7223592340.2727272727318.7272727272728
7315111526.54545454545-15.5454545454546
7420592205-146
7526352541.1818181818293.8181818181818
7628673448.09090909091-581.090909090909
7744034966.63636363636-563.636363636364
7857205425.81818181818294.181818181818
7945025623.72727272727-1121.72727272727
8057496122.18181818182-373.181818181818
8156275514.09090909091112.909090909091
8228463249.18181818182-403.181818181818
8317621964.45454545455-202.454545454546
8424292340.2727272727388.7272727272728
8511691526.54545454545-357.545454545455
8621542205-51
8722492541.18181818182-292.181818181818
8826873448.09090909091-761.090909090909
8943594966.63636363636-607.636363636364
9053825425.81818181818-43.8181818181818
9144595623.72727272727-1164.72727272727
9263986122.18181818182275.818181818182
9345965514.09090909091-918.09090909091
9430243249.18181818182-225.181818181818
9518871964.45454545455-77.4545454545455
9620702340.27272727273-270.272727272727
9713511526.54545454545-175.545454545455
982218220513.0000000000001
9924612541.18181818182-80.1818181818182
10030283448.09090909091-420.090909090909
10147844966.63636363636-182.636363636364
10249755425.81818181818-450.818181818182
10346075623.72727272727-1016.72727272727
10462496122.18181818182126.818181818182
10548095514.09090909091-705.090909090909
10631573249.18181818182-92.181818181818
10719101964.45454545455-54.4545454545456
10822282340.27272727273-112.272727272727
10915941526.5454545454567.4545454545454
11024672205262
11122222541.18181818182-319.181818181818
11236073448.09090909091158.909090909091
11346854966.63636363636-281.636363636364
11449625425.81818181818-463.818181818182
11557705623.72727272727146.272727272727
11654806122.18181818182-642.181818181818
11750005514.09090909091-514.090909090909
11832283249.18181818182-21.181818181818
11919931964.4545454545528.5454545454544
12022882340.27272727273-52.2727272727272
12115881526.5454545454561.4545454545454
12221052205-100
12321912541.18181818182-350.181818181818
12435913448.09090909091142.909090909091
12546684966.63636363636-298.636363636364
12648855425.81818181818-540.818181818182
12758225623.72727272727198.272727272727
12855996122.18181818182-523.181818181818
12953405514.09090909091-174.090909090909
13030823249.18181818182-167.181818181818
13120101964.4545454545545.5454545454544
13223012340.27272727273-39.2727272727272


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.1251862140527680.2503724281055370.874813785947232
160.2900445517834520.5800891035669040.709955448216548
170.2660759936639520.5321519873279050.733924006336048
180.3972123081095740.7944246162191480.602787691890426
190.5074041807727380.9851916384545250.492595819227262
200.8038609405065340.3922781189869320.196139059493466
210.9752540986052450.04949180278950960.0247459013947548
220.9617379688632220.07652406227355650.0382620311367782
230.9428689371161710.1142621257676580.0571310628838291
240.9239695910618270.1520608178763470.0760304089381734
250.8925500072131930.2148999855736140.107449992786807
260.8512748990858460.2974502018283070.148725100914154
270.851587818725140.2968243625497210.148412181274861
280.8173448196792930.3653103606414150.182655180320707
290.8260836112539770.3478327774920450.173916388746023
300.8737459213262180.2525081573475630.126254078673782
310.8786245835096990.2427508329806020.121375416490301
320.8978459319745270.2043081360509450.102154068025473
330.9431567383636840.1136865232726310.0568432616363156
340.9300898737112690.1398202525774630.0699101262887314
350.9088274474949560.1823451050100880.091172552505044
360.8923931030500960.2152137938998090.107606896949904
370.8616891892884790.2766216214230420.138310810711521
380.8243781876066430.3512436247867140.175621812393357
390.8243378488913950.351324302217210.175662151108605
400.803348496706310.393303006587380.19665150329369
410.8216509251234140.3566981497531720.178349074876586
420.92542339411030.1491532117793990.0745766058896996
430.9248197667793740.1503604664412510.0751802332206255
440.9395528319045770.1208943361908470.0604471680954235
450.9576048093191110.08479038136177710.0423951906808886
460.9473684329092450.1052631341815090.0526315670907547
470.9334775369472780.1330449261054440.0665224630527219
480.9242387958012540.1515224083974910.0757612041987457
490.9031337143068860.1937325713862280.0968662856931139
500.8810232653621850.237953469275630.118976734637815
510.8662767211260220.2674465577479560.133723278873978
520.8468473246682220.3063053506635560.153152675331778
530.8676156262115780.2647687475768440.132384373788422
540.92395543124410.1520891375118010.0760445687559003
550.9471803684005010.1056392631989980.052819631599499
560.9634898949762130.07302021004757490.0365101050237874
570.957136825315550.08572634936890020.0428631746844501
580.9493180480846660.1013639038306680.0506819519153342
590.934348337409280.1313033251814390.0656516625907195
600.9158102877842430.1683794244315140.0841897122157569
610.893848253361690.2123034932766190.10615174663831
620.8671313988710730.2657372022578540.132868601128927
630.8429566370058120.3140867259883770.157043362994188
640.8369392061602050.326121587679590.163060793839795
650.8330011749858840.3339976500282320.166998825014116
660.8259450071463230.3481099857073530.174054992853677
670.9257578580475280.1484842839049440.0742421419524721
680.9258228891689730.1483542216620530.0741771108310265
690.9806063141245420.03878737175091560.0193936858754578
700.978988840228830.04202231954234190.021011159771171
710.9736908829421180.05261823411576380.0263091170578819
720.9643939097759530.0712121804480940.035606090224047
730.9525298994599660.09494020108006870.0474701005400343
740.9397149057552920.1205701884894170.0602850942447084
750.9306453301616380.1387093396767240.0693546698383621
760.9442759601963290.1114480796073430.0557240398036715
770.9527528787465220.09449424250695620.0472471212534781
780.9629199156701340.07416016865973250.0370800843298663
790.9931511792939980.01369764141200340.00684882070600172
800.991777769244630.01644446151074110.00822223075537054
810.9948611828283250.010277634343350.00513881717167498
820.9941892753684460.01162144926310740.00581072463155371
830.9919531502799630.01609369944007370.00804684972003683
840.9888021116720320.0223957766559360.011197888327968
850.9873082882652660.02538342346946720.0126917117347336
860.9816430423455570.03671391530888580.0183569576544429
870.9755093236217770.04898135275644660.0244906763782233
880.9888885012983920.02222299740321680.0111114987016084
890.9896684030973290.02066319380534230.0103315969026711
900.9892632116570180.02147357668596460.0107367883429823
910.9990531327241690.001893734551662590.000946867275831297
920.999491126928830.001017746142340650.000508873071170326
930.9997558677175680.0004882645648638560.000244132282431928
940.9995719680744080.0008560638511846780.000428031925592339
950.999210604795310.00157879040937810.00078939520468905
960.9987676943715460.00246461125690820.0012323056284541
970.9981013401970.003797319605999440.00189865980299972
980.9966251668802460.006749666239507980.00337483311975399
990.995005230907590.009989538184821580.00499476909241079
1000.9965156725257060.006968654948587360.00348432747429368
1010.994045425278740.01190914944252040.00595457472126021
1020.9905949901726480.01881001965470390.00940500982735193
1030.9999768885079884.62229840248892e-052.31114920124446e-05
1040.9999998776818742.44636251704263e-071.22318125852132e-07
1050.9999999830687293.38625420164111e-081.69312710082056e-08
1060.9999999167221751.66555650718953e-078.32778253594767e-08
1070.999999684569976.30860058285634e-073.15430029142817e-07
1080.9999986960153472.60796930561417e-061.30398465280709e-06
1090.9999941427848281.17144303438604e-055.85721517193022e-06
1100.9999985486393982.90272120405374e-061.45136060202687e-06
1110.9999924290934331.51418131343731e-057.57090656718655e-06
1120.9999608022185857.83955628300864e-053.91977814150432e-05
1130.999810460117360.0003790797652795640.000189539882639782
1140.999239226931950.001521546136098140.000760773068049068
1150.9967885614684650.006422877063071060.00321143853153553
1160.9895472445456450.02090551090871080.0104527554543554
1170.9972551277063280.005489744587344640.00274487229367232


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level240.233009708737864NOK
5% type I error level420.407766990291262NOK
10% type I error level510.495145631067961NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/10mf6j1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/10mf6j1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/1khye1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/1khye1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/2khye1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/2khye1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/3khye1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/3khye1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/4vrfz1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/4vrfz1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/5vrfz1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/5vrfz1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/6vrfz1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/6vrfz1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/7ifqw1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/7ifqw1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/8t6pg1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/8t6pg1293616226.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/9t6pg1293616226.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616114h5a2fi2ztsrd0ea/9t6pg1293616226.ps (open in new window)


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