Home » date » 2010 » Dec » 24 »

*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: Fri, 24 Dec 2010 17:22:11 +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/24/t1293211610j9sdrog79td6b95.htm/, Retrieved Fri, 24 Dec 2010 18:27:01 +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/24/t1293211610j9sdrog79td6b95.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 «
9506 1775 8704 2197 10079 2920 8993 4240 9957 5415 10240 6136 10098 6719 10090 6234 9867 7152 9736 3646 9040 2165 9232 2803 9520 1615 9217 2350 9868 3350 9455 3536 9984 5834 9556 6767 10190 5993 9906 7276 9824 5641 9972 3477 9185 2247 9765 2466 9838 1567 9084 2237 9643 2598 10051 3729 9987 5715 9827 5776 10491 5852 9722 6878 9472 5488 9728 3583 8510 2054 9511 2282 9492 1552 8638 2261 9792 2446 9605 3519 9237 5161 9533 5085 10293 5711 9938 6057 9984 5224 9563 3363 8871 1899 9301 2115 9215 1491 8834 2061 9998 2419 9604 3430 9507 4778 9718 4862 10095 6176 9583 5664 9883 5529 9365 3418 8919 1941 9449 2402 9769 1579 9321 2146 9939 2462 9336 3695 10195 4831 9464 5134 10010 6250 10213 5760 9563 6249 9890 2917 9305 1741 9391 2359 9743 1511 8587 2059 9731 2635 9563 2867 9998 4403 9437 5720 10038 4502 9918 5749 9252 5627 9737 2846 9035 1762 9133 2429 9487 1169 8700 2154 9627 2249 8947 2687 9283 4359 8829 5382 9947 4459 9628 6398 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
births[t] = + 9490.9744697614 + 0.0169475520578264marriages[t] + 112.608867133597M1[t] -617.071094776177M2[t] + 299.958719086564M3[t] -56.3202608524251M4[t] + 112.035020095399M5[t] + 54.79846687321M6[t] + 596.171664979584M7[t] + 341.269535167487M8[t] + 157.120642050651M9[t] + 205.505306775077M10[t] -497.358074526631M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9490.9744697614164.83697357.577900
marriages0.01694755205782640.0592110.28620.7752050.387602
M1112.608867133597135.1322060.83330.4063320.203166
M2-617.071094776177126.504551-4.87793e-062e-06
M3299.958719086564126.8099472.36540.0196260.009813
M4-56.3202608524251142.274214-0.39590.6929190.34646
M5112.035020095399200.3059550.55930.5769950.288497
M654.79846687321222.0762790.24680.8055230.402761
M7596.171664979584231.8125372.57180.0113480.005674
M8341.269535167487257.0683631.32750.186870.093435
M9157.120642050651226.3957050.6940.4890290.244515
M10205.505306775077137.2427051.49740.1369410.06847
M11-497.358074526631128.196817-3.87960.0001728.6e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.769552131893597
R-squared0.59221048370198
Adjusted R-squared0.551088851806381
F-TEST (value)14.4014343887302
F-TEST (DF numerator)12
F-TEST (DF denominator)119
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation296.084211333431
Sum Squared Residuals10432237.3639118


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
195069633.66524179767-127.665241797667
287048911.13714685626-207.137146856263
3100799840.42004085681238.579959143186
489939506.51182963416-513.511829634157
599579694.78048424993262.219515750072
6102409649.76311606143590.23688393857
71009810201.0167370175-103.016737017518
8100909937.89504445737152.104955542625
998679769.3040041296297.6959958703767
1097369758.2705513393-22.2705513393106
1190409030.307845439969.69215456003966
1292329538.47845817948-306.478458179485
1395209630.95363346839-110.953633468384
1492178913.73012232111303.269877678888
1598689847.7074882416820.2925117583198
1694559494.58075298545-39.5807529854470
1799849701.88150856216282.118491437843
1895569660.45702140992-104.457021409920
191019010188.71281422351.28718577646445
2099069955.55439370163-49.5543937016304
2198249743.6962529702580.3037470297523
2299729755.40641504154216.593584958462
2391859031.6975447087153.302455291298
2497659532.767133136232.232866864002
2598389630.14015096961207.859849030391
2690848911.81504893858172.184951061422
2796439834.9629290942-191.962929094195
28100519497.8516305326553.148369467393
2999879699.86474986727287.135250132725
3098279643.66199732061183.338002679387
311049110186.3232093834304.676790616618
3297229948.80926798261-226.809267982615
3394729741.1032775054-269.103277505400
3497289757.20285555967-29.2028555596671
3585109028.42666716154-518.426667161541
3695119529.64878355736-18.6487835573578
3794929629.88593768874-137.885937688742
3886388912.22179018796-274.221790187966
3997929832.3869011814-40.386901181405
4096059494.29264460046110.707355399536
4192379690.47580602724-453.475806027239
4295339631.95123884865-98.9512388486553
431029310183.9336045432109.066395456772
4499389934.895327743143.10467225686013
4599849736.62912376213247.370876237866
4695639753.47439410694-190.474394106945
4788719025.79979659258-154.799796592579
4893019526.8185423637-225.818542363701
4992159628.85213701321-413.852137013215
5088348908.8322797764-74.8322797764004
5199989831.92931727584166.070682724156
5296049492.78431246732111.215687532683
5395079683.9848935891-176.984893589092
5497189628.1719347397689.82806526024
551009510191.8142162501-96.8142162501177
5695839928.23493978441-345.234939784414
5798839741.79812713977141.201872860229
5893659754.40650947013-389.406509470126
5989199026.511593779-107.511593779007
6094499531.6824898043-82.682489804297
6197699630.3435215943138.656478405697
6293218910.27282170132410.727178298684
6399399832.65806201433106.341937985670
6493369497.27541376264-161.275413762642
65101959684.88311384816510.116886151843
6694649632.78166889949-168.781668899489
671001010193.0683351024-183.068335102397
68102139929.86190478196283.138095218035
6995639754.0003646214-191.000364621406
7098909745.91578588915144.084214110845
7193059023.12208336744281.877916632558
7293919530.9537450658-139.953745065811
7397439629.19108805437113.808911945629
7485878908.79838467229-321.798384672285
7597319835.58998852033-104.589988520334
7695639483.2428406587679.757159341239
7799989677.6295615674320.370438432593
7894379642.71293440538-205.712934405375
791003810163.4440141053-125.444014105316
8099189929.67548170933-11.6754817093293
8192529743.45898724144-491.458987241438
8297379744.71250969305-7.71250969304891
8390359023.4779819606611.5220180393436
8491339532.14007370986-399.140073709858
8594879623.3950252506-136.395025250594
8687008910.40840211778-210.408402117778
8796279829.04823342601-202.048233426013
8889479480.19228128835-533.192281288352
8992839676.88386927686-393.883869276862
9088299636.98466180983-807.98466180983
91994710162.7152693668-215.715269366830
9296289940.67444299486-312.674442994859
9393189725.98606106982-407.986061069819
9496059747.72917395934-142.729173959342
9586409025.59642596789-385.596425967885
9692149526.0559025211-312.055902521099
9796769626.4794797251249.5205202748811
9886428911.49304544948-269.493045449479
9994029832.64111446227-430.641114462272
10096109485.97139654007124.028603459929
10192949684.08657890144-390.086578901439
10294489630.0870081223-182.087008122294
1031031910165.2235070714153.776492928612
10495489938.14925773824-390.149257738243
10598019729.5958896581471.4041103418639
10695969749.98319838303-153.983198383033
10789239025.98621966521-102.986219665215
10897469528.73361574624217.266384253765
10998299630.59773487517198.402265124829
11091258915.71298591188209.287014088122
11197829828.59064952045-46.5906495204520
11294419495.78402918155-54.7840291815526
11391629682.40877124771-520.408771247714
11499159629.86668994554285.133310054457
1151044410184.9335101146259.06648988536
116102099925.11659020577283.883409794226
11799859732.83287210118252.167127898819
11898429751.1864745791490.8135254208613
11994299027.39286648601401.607133513986
120101329529.7504688697602.249531130295
12198499630.49604956282218.503950437176
12291728909.57797206695262.422027933055
123103139828.06527540666484.934724593341
12498199495.51286834863323.487131651373
12599559682.12066286273272.879337137269
126100489628.5617284371419.43827156291
1271008210185.8147828216-103.814782821647
128105419927.13334890066613.866651099344
129102089738.59503980084469.404960199158
130102339748.7121319787484.287868021304
13194399027.680974871411.319025129003
13299639529.97078704646433.029212953544


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.4284692958910540.8569385917821080.571530704108946
170.3080473641646320.6160947283292650.691952635835368
180.3017468608026840.6034937216053680.698253139197316
190.2451310669184630.4902621338369250.754868933081537
200.1838159249597260.3676318499194520.816184075040274
210.2036249553628420.4072499107256830.796375044637158
220.1530900189368320.3061800378736630.846909981063168
230.1074584382497770.2149168764995550.892541561750223
240.1337760666225020.2675521332450030.866223933377498
250.1234898141321590.2469796282643190.87651018586784
260.08726873703321020.1745374740664200.91273126296679
270.1143147079426110.2286294158852230.885685292057389
280.3656770339965370.7313540679930750.634322966003463
290.3125697780407930.6251395560815850.687430221959207
300.2726196691582510.5452393383165030.727380330841749
310.2509644636805160.5019289273610320.749035536319484
320.2197422082357160.4394844164714310.780257791764284
330.2741349233068190.5482698466136370.725865076693181
340.2227939111616260.4455878223232520.777206088838374
350.3412675799254050.682535159850810.658732420074595
360.2804284371076160.5608568742152320.719571562892384
370.2352635599669690.4705271199339380.764736440033031
380.2394062085909490.4788124171818970.760593791409051
390.1954298844149290.3908597688298590.80457011558507
400.1566636158012060.3133272316024120.843336384198794
410.3138038212816080.6276076425632170.686196178718391
420.2976153407428520.5952306814857050.702384659257148
430.2501698012898010.5003396025796020.749830198710199
440.2039915359866230.4079830719732460.796008464013377
450.1880530348149780.3761060696299560.811946965185022
460.1665615928497680.3331231856995350.833438407150232
470.1358106258275950.271621251655190.864189374172405
480.1187773960714080.2375547921428150.881222603928592
490.1373533134311340.2747066268622680.862646686568866
500.1089985465685280.2179970931370550.891001453431472
510.09035638503700430.1807127700740090.909643614962996
520.07101305608694550.1420261121738910.928986943913054
530.06217643852950330.1243528770590070.937823561470497
540.04750102561825210.09500205123650420.952498974381748
550.03721312890509680.07442625781019370.962786871094903
560.03862596123741030.07725192247482070.96137403876259
570.03021518066815490.06043036133630990.969784819331845
580.03526133165980470.07052266331960940.964738668340195
590.02669031189679510.05338062379359030.973309688103205
600.01944341293531500.03888682587062990.980556587064685
610.01609446451045930.03218892902091850.98390553548954
620.02213732251427980.04427464502855960.97786267748572
630.01648116311048500.03296232622097000.983518836889515
640.01289748795876550.02579497591753100.987102512041234
650.02575552741017110.05151105482034230.97424447258983
660.02213351634560320.04426703269120650.977866483654397
670.01767645213775420.03535290427550840.982323547862246
680.01815819044832620.03631638089665240.981841809551674
690.01465719634148120.02931439268296250.985342803658519
700.01142074344421140.02284148688842280.988579256555789
710.01161962068995490.02323924137990990.988380379310045
720.008749354602731510.01749870920546300.991250645397268
730.006441993797813780.01288398759562760.993558006202186
740.006970003371895220.01394000674379040.993029996628105
750.004956650282011070.009913300564022130.995043349717989
760.003341106470148460.006682212940296920.996658893529851
770.003826181815739840.007652363631479670.99617381818426
780.003070399262274550.006140798524549090.996929600737726
790.002258705075440640.004517410150881290.99774129492456
800.001455002012768480.002910004025536970.998544997987232
810.002952247656682040.005904495313364070.997047752343318
820.00192271094857270.00384542189714540.998077289051427
830.001236080750321110.002472161500642210.998763919249679
840.002038408717536500.004076817435072990.997961591282464
850.001514233214325510.003028466428651020.998485766785674
860.001204257255000390.002408514510000790.998795742745
870.00091132503415750.0018226500683150.999088674965843
880.002691738009459860.005383476018919720.99730826199054
890.003132251326853930.006264502653707860.996867748673146
900.02910558081924450.0582111616384890.970894419180756
910.02643178950461720.05286357900923440.973568210495383
920.02847298969829860.05694597939659720.971527010301701
930.05157949639298690.1031589927859740.948420503607013
940.0439118628380160.0878237256760320.956088137161984
950.07206556193536270.1441311238707250.927934438064637
960.1513151511814190.3026303023628380.848684848818581
970.1264761712439440.2529523424878880.873523828756056
980.1545676256921030.3091352513842050.845432374307897
990.2251271379761690.4502542759523380.774872862023831
1000.1873094583251510.3746189166503020.812690541674849
1010.1784684914951120.3569369829902230.821531508504888
1020.2142041921267550.4284083842535090.785795807873245
1030.2071732188219660.4143464376439310.792826781178034
1040.3974518862206070.7949037724412150.602548113779393
1050.3460743335134920.6921486670269840.653925666486508
1060.3824039486997870.7648078973995740.617596051300213
1070.4659271784412990.9318543568825980.534072821558701
1080.4616319393979530.9232638787959070.538368060602047
1090.3766878797636070.7533757595272130.623312120236393
1100.2946399727005400.5892799454010790.70536002729946
1110.3508644843104010.7017289686208020.649135515689599
1120.3358523801279410.6717047602558820.66414761987206
1130.752930245911230.4941395081775420.247069754088771
1140.664679336282950.67064132743410.33532066371705
1150.6923054826070140.6153890347859720.307694517392986
1160.6647486719724990.6705026560550020.335251328027501


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level150.148514851485149NOK
5% type I error level290.287128712871287NOK
10% type I error level400.396039603960396NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/10o6j91293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/10o6j91293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/1ckfr1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/1ckfr1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/2ckfr1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/2ckfr1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/35twc1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/35twc1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/45twc1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/45twc1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/55twc1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/55twc1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/6xkdf1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/6xkdf1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/78uci1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/78uci1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/88uci1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/88uci1293211321.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/98uci1293211321.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293211610j9sdrog79td6b95/98uci1293211321.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