Home » date » 2010 » Dec » 29 »

*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:13:15 +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/t1293613864n0f1v55vuzorrrw.htm/, Retrieved Wed, 29 Dec 2010 10:11:16 +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/t1293613864n0f1v55vuzorrrw.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 time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
marriages[t] = + 2340.27272727273 -813.727272727272M1[t] -135.272727272731M2[t] + 200.909090909092M3[t] + 1107.81818181818M4[t] + 2626.36363636363M5[t] + 3085.54545454545M6[t] + 3283.45454545455M7[t] + 3781.90909090908M8[t] + 3173.81818181818M9[t] + 908.909090909092M10[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.272727272731194.64399-0.6950.4884140.244207
M3200.909090909092194.643991.03220.304060.15203
M41107.81818181818194.643995.691500
M52626.36363636363194.6439913.493200
M63085.54545454545194.6439915.852300
M73283.45454545455194.6439916.86900
M83781.90909090908194.6439919.429900
M93173.81818181818194.6439916.305800
M10908.909090909092194.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.925075987932612
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.7272728


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
117751526.54545454545248.454545454552
221972205.00000000000-8.00000000000344
329202541.18181818181378.818181818187
442403448.09090909092791.909090909084
554154966.63636363638448.363636363622
661365425.81818181818710.181818181818
767195623.727272727271095.27272727273
862346122.18181818183111.818181818174
971525514.090909090891637.90909090911
1036463249.18181818181396.81818181819
1121651964.45454545455200.545454545454
1228032340.27272727273462.727272727272
1316151526.5454545454688.4545454545448
1423502205145
1533502541.18181818182808.818181818181
1635363448.0909090909187.909090909091
1758344966.63636363636867.363636363638
1867675425.818181818181341.18181818182
1959935623.72727272727369.272727272727
2072766122.181818181821153.81818181818
2156415514.09090909091126.909090909089
2234773249.18181818182227.818181818181
2322471964.45454545455282.545454545454
2424662340.27272727273125.727272727272
2515671526.5454545454640.4545454545448
262237220532
2725982541.1818181818256.8181818181814
2837293448.09090909091280.909090909091
2957154966.63636363636748.363636363638
3057765425.81818181818350.181818181819
3158525623.72727272727228.272727272727
3268786122.18181818182755.818181818183
3354885514.09090909091-26.0909090909108
3435833249.18181818182333.818181818181
3520541964.4545454545589.5454545454546
3622822340.27272727273-58.2727272727278
3715521526.5454545454625.4545454545448
382261220556
3924462541.18181818182-95.1818181818186
4035193448.0909090909170.909090909091
4151614966.63636363636194.363636363638
4250855425.81818181818-340.818181818182
4357115623.7272727272787.2727272727272
4460576122.18181818182-65.1818181818172
4552245514.09090909091-290.090909090911
4633633249.18181818182113.818181818181
4718991964.45454545455-65.4545454545453
4821152340.27272727273-225.272727272727
4914911526.54545454546-35.5454545454552
5020612205-144
5124192541.18181818182-122.181818181819
5234303448.09090909091-18.0909090909090
5347784966.63636363636-188.636363636362
5448625425.81818181818-563.818181818182
5561765623.72727272727552.272727272727
5656646122.18181818182-458.181818181817
5755295514.0909090909114.9090909090891
5834183249.18181818182168.818181818181
5919411964.45454545455-23.4545454545453
6024022340.2727272727361.7272727272721
6115791526.5454545454652.4545454545448
6221462205-59
6324622541.18181818182-79.1818181818186
6436953448.09090909091246.909090909091
6548314966.63636363636-135.636363636362
6651345425.81818181818-291.818181818182
6762505623.72727272727626.272727272727
6857606122.18181818182-362.181818181817
6962495514.09090909091734.90909090909
7029173249.18181818182-332.181818181819
7117411964.45454545455-223.454545454545
7223592340.2727272727318.7272727272722
7315111526.54545454546-15.5454545454552
7420592205-146
7526352541.1818181818293.8181818181814
7628673448.09090909091-581.090909090909
7744034966.63636363636-563.636363636362
7857205425.81818181818294.181818181819
7945025623.72727272727-1121.72727272727
8057496122.18181818182-373.181818181817
8156275514.09090909091112.909090909089
8228463249.18181818182-403.181818181819
8317621964.45454545455-202.454545454545
8424292340.2727272727388.7272727272721
8511691526.54545454546-357.545454545455
8621542205-50.9999999999999
8722492541.18181818182-292.181818181819
8826873448.09090909091-761.090909090909
8943594966.63636363636-607.636363636362
9053825425.81818181818-43.8181818181816
9144595623.72727272727-1164.72727272727
9263986122.18181818182275.818181818183
9345965514.09090909091-918.090909090911
9430243249.18181818182-225.181818181819
9518871964.45454545455-77.4545454545453
9620702340.27272727273-270.272727272727
9713511526.54545454546-175.545454545455
982218220513.0000000000000
9924612541.18181818182-80.1818181818186
10030283448.09090909091-420.090909090909
10147844966.63636363636-182.636363636362
10249755425.81818181818-450.818181818181
10346075623.72727272727-1016.72727272727
10462496122.18181818182126.818181818183
10548095514.09090909091-705.09090909091
10631573249.18181818182-92.181818181819
10719101964.45454545455-54.4545454545453
10822282340.27272727273-112.272727272727
10915941526.5454545454667.4545454545448
11024672205262
11122222541.18181818182-319.181818181819
11236073448.09090909091158.909090909091
11346854966.63636363636-281.636363636362
11449625425.81818181818-463.818181818181
11557705623.72727272727146.272727272727
11654806122.18181818182-642.181818181817
11750005514.09090909091-514.090909090911
11832283249.18181818182-21.1818181818189
11919931964.4545454545528.5454545454546
12022882340.27272727273-52.2727272727278
12115881526.5454545454661.4545454545448
12221052205-100
12321912541.18181818182-350.181818181819
12435913448.09090909091142.909090909091
12546684966.63636363636-298.636363636362
12648855425.81818181818-540.818181818182
12758225623.72727272727198.272727272727
12855996122.18181818182-523.181818181817
12953405514.09090909091-174.090909090911
13030823249.18181818182-167.181818181819
13120101964.4545454545545.5454545454546
13223012340.27272727273-39.2727272727278


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.1251862140527680.2503724281055350.874813785947232
160.2900445517834510.5800891035669020.709955448216549
170.2660759936639550.5321519873279090.733924006336045
180.3972123081095710.7944246162191430.602787691890429
190.5074041807727340.9851916384545310.492595819227266
200.8038609405065350.392278118986930.196139059493465
210.9752540986052450.04949180278950990.0247459013947549
220.9617379688632210.07652406227355750.0382620311367788
230.942868937116170.1142621257676590.0571310628838294
240.9239695910618280.1520608178763450.0760304089381724
250.8925500072131930.2148999855736130.107449992786807
260.8512748990858470.2974502018283060.148725100914153
270.851587818725140.2968243625497220.148412181274861
280.8173448196792920.3653103606414160.182655180320708
290.8260836112539760.3478327774920470.173916388746023
300.873745921326220.252508157347560.12625407867378
310.8786245835096970.2427508329806070.121375416490303
320.8978459319745270.2043081360509450.102154068025473
330.9431567383636850.1136865232726310.0568432616363153
340.930089873711270.1398202525774620.0699101262887308
350.9088274474949560.1823451050100890.0911725525050444
360.8923931030500990.2152137938998020.107606896949901
370.861689189288480.2766216214230400.138310810711520
380.8243781876066440.3512436247867130.175621812393356
390.8243378488913920.3513243022172170.175662151108608
400.8033484967063120.3933030065873770.196651503293688
410.821650925123410.3566981497531790.178349074876589
420.92542339411030.1491532117793990.0745766058896997
430.9248197667793740.1503604664412520.075180233220626
440.9395528319045770.1208943361908450.0604471680954227
450.9576048093191110.08479038136177760.0423951906808888
460.9473684329092460.1052631341815080.052631567090754
470.9334775369472770.1330449261054450.0665224630527227
480.9242387958012550.1515224083974890.0757612041987446
490.9031337143068860.1937325713862290.0968662856931143
500.8810232653621870.2379534692756250.118976734637813
510.8662767211260180.2674465577479640.133723278873982
520.8468473246682230.3063053506635530.153152675331777
530.8676156262115780.2647687475768430.132384373788422
540.92395543124410.1520891375118010.0760445687559006
550.94718036840050.1056392631990.0528196315995
560.9634898949762130.0730202100475740.036510105023787
570.9571368253155480.08572634936890320.0428631746844516
580.9493180480846670.1013639038306660.0506819519153329
590.934348337409280.1313033251814400.0656516625907198
600.9158102877842440.1683794244315130.0841897122157564
610.8938482533616920.2123034932766160.106151746638308
620.8671313988710710.2657372022578570.132868601128929
630.8429566370058120.3140867259883760.157043362994188
640.8369392061602060.3261215876795880.163060793839794
650.833001174985880.3339976500282410.166998825014121
660.8259450071463220.3481099857073560.174054992853678
670.9257578580475260.1484842839049480.0742421419524738
680.9258228891689730.1483542216620550.0741771108310274
690.9806063141245420.03878737175091570.0193936858754579
700.978988840228830.04202231954234150.0210111597711708
710.9736908829421180.0526182341157630.0263091170578815
720.9643939097759540.0712121804480930.0356060902240465
730.9525298994599640.09494020108007120.0474701005400356
740.9397149057552920.1205701884894150.0602850942447075
750.930645330161640.138709339676720.06935466983836
760.944275960196330.1114480796073410.0557240398036704
770.9527528787465220.09449424250695510.0472471212534776
780.9629199156701340.07416016865973230.0370800843298662
790.9931511792939980.01369764141200410.00684882070600203
800.991777769244630.01644446151074120.00822223075537058
810.9948611828283250.01027763434334990.00513881717167493
820.9941892753684460.01162144926310720.00581072463155362
830.9919531502799630.01609369944007370.00804684972003685
840.9888021116720320.02239577665593610.0111978883279680
850.9873082882652660.02538342346946730.0126917117347336
860.9816430423455570.03671391530888540.0183569576544427
870.9755093236217770.04898135275644570.0244906763782229
880.9888885012983920.02222299740321680.0111114987016084
890.9896684030973290.02066319380534220.0103315969026711
900.9892632116570170.0214735766859650.0107367883429825
910.9990531327241690.001893734551662590.000946867275831297
920.999491126928830.001017746142340660.000508873071170332
930.9997558677175680.000488264564863850.000244132282431925
940.9995719680744080.0008560638511847160.000428031925592358
950.999210604795310.001578790409378130.000789395204689064
960.9987676943715460.002464611256908160.00123230562845408
970.9981013401970.003797319605999320.00189865980299966
980.9966251668802460.006749666239508140.00337483311975407
990.995005230907590.009989538184821850.00499476909241093
1000.9965156725257060.006968654948586840.00348432747429342
1010.994045425278740.01190914944252090.00595457472126044
1020.9905949901726490.01881001965470300.00940500982735148
1030.9999768885079884.62229840248883e-052.31114920124441e-05
1040.9999998776818742.44636251704274e-071.22318125852137e-07
1050.9999999830687293.38625420164111e-081.69312710082055e-08
1060.9999999167221751.66555650718955e-078.32778253594773e-08
1070.999999684569976.3086005828563e-073.15430029142815e-07
1080.9999986960153472.60796930561416e-061.30398465280708e-06
1090.9999941427848281.17144303438595e-055.85721517192973e-06
1100.9999985486393982.90272120405385e-061.45136060202692e-06
1110.9999924290934331.51418131343729e-057.57090656718644e-06
1120.9999608022185857.83955628300839e-053.91977814150419e-05
1130.999810460117360.0003790797652795580.000189539882639779
1140.999239226931950.001521546136098190.000760773068049093
1150.9967885614684640.006422877063071310.00321143853153566
1160.9895472445456450.02090551090871040.0104527554543552
1170.9972551277063280.005489744587344330.00274487229367217


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/t1293613864n0f1v55vuzorrrw/104ns51293613986.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/104ns51293613986.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/28vcw1293613986.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/28vcw1293613986.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/38vcw1293613986.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/38vcw1293613986.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/48vcw1293613986.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/48vcw1293613986.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/58vcw1293613986.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/58vcw1293613986.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/61mbh1293613986.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293613864n0f1v55vuzorrrw/61mbh1293613986.ps (open in new window)


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


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


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