Home » date » 2009 » Nov » 19 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 19 Nov 2009 01:09:26 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj.htm/, Retrieved Thu, 19 Nov 2009 09:10:19 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
100 0 108.1560276 0 114.0150276 0 102.1880309 0 110.3672031 0 96.8602511 0 94.1944583 0 99.51621961 0 94.06333487 0 97.5541476 0 78.15062422 0 81.2434643 0 92.36262465 0 96.06324371 0 114.0523777 0 110.6616666 0 104.9171949 0 90.00187193 0 95.7008067 0 86.02741157 0 84.85287668 0 100.04328 0 80.91713823 0 74.06539709 0 77.30281369 0 97.23043249 0 90.75515676 0 100.5614455 0 92.01293267 0 99.24012138 0 105.8672755 0 90.9920463 0 93.30624423 0 91.17419413 0 77.33295039 0 91.1277721 0 85.01249943 0 83.90390242 0 104.8626302 0 110.9039108 0 95.43714373 0 111.6238727 0 108.8925403 0 96.17511682 0 101.9740205 0 99.11953031 0 86.78158147 0 118.4195003 0 118.7441447 0 106.5296192 0 134.7772694 0 104.6778714 0 105.2954304 0 139.4139849 0 103.6060491 0 99.78182974 0 103.4610301 0 120.0594945 0 96.71377168 0 107.1308929 0 105.3608372 0 111.6942359 0 132.0519998 0 126.8037879 0 154.4824253 0 141.5570984 0 109.9506882 0 127.904198 0 133.0888617 0 120.079 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 85.3644295390171 -1.76326950435899X[t] + 5.27565729087253M1[t] + 4.40171315059118M2[t] + 16.4648034314210M3[t] + 9.49537782336185M4[t] + 9.24836954419162M5[t] + 15.0024448772436M6[t] + 2.10976788585115M7[t] -0.762959099985754M8[t] + 1.02460681417736M9[t] + 9.56288284167381M10[t] -9.89589302082977M11[t] + 0.366035712503561t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)85.36442953901715.81858314.67100
X-1.763269504358995.081565-0.3470.7293720.364686
M15.275657290872536.7440290.78230.4360220.218011
M24.401713150591186.7347160.65360.5149740.257487
M316.46480343142106.7262792.44780.0162280.008114
M49.495377823361856.7187211.41330.1608790.080439
M59.248369544191626.7120451.37790.1715130.085756
M615.00244487724366.7062542.23710.0276440.013822
M72.109767885851156.701350.31480.7535910.376795
M8-0.7629590999857546.697335-0.11390.9095440.454772
M91.024606814177366.6942110.15310.878680.43934
M109.562882841673816.6919781.4290.1563170.078159
M11-9.895893020829776.690638-1.47910.1424660.071233
t0.3660357125035610.0773144.73448e-064e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.685296660999714
R-squared0.469631513577357
Adjusted R-squared0.396282680348693
F-TEST (value)6.40271280271481
F-TEST (DF numerator)13
F-TEST (DF denominator)94
p-value1.59991639936408e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation14.1920393586397
Sum Squared Residuals18932.9142287749


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110091.00612254239318.99387745760688
2108.156027690.498214114615417.6578134853846
3114.0150276102.92734010794911.0876874920513
4102.188030996.32395021239315.86408068760685
5110.367203196.442977645726513.9242254542735
696.8602511102.563088691282-5.70283759128207
794.194458390.03644741239324.15801088760679
899.5162196187.529756139059811.9864634709402
994.0633348789.68335776572654.37997710427351
1097.554147698.5876695057265-1.03352190572648
1178.1506242279.4949293557265-1.34430513572649
1281.243464389.7568580890599-8.51339378905987
1392.3626246595.398551092436-3.03592644243589
1496.0632437194.89064266465811.17260104534188
15114.0523777107.3197686579916.73260904200854
16110.6616666100.7163787624369.9452878375641
17104.9171949100.8354061957694.08178870423077
1890.00187193106.955517241325-16.9536453113248
1995.700806794.4288759624361.27193073756411
2086.0274115791.9221846891026-5.89477311910256
2184.8528766894.0757863157692-9.22290963576923
22100.04328102.980098055769-2.93681805576923
2380.9171382383.8873579057692-2.97021967576922
2474.0653970994.1492866391026-20.0838895491026
2577.3028136999.7909796424786-22.4881659524786
2697.2304324999.2830712147009-2.05263872470086
2790.75515676111.712197208034-20.9570404480342
28100.5614455105.108807312479-4.54736181247863
2992.01293267105.227834745812-13.2149020758120
3099.24012138111.347945791368-12.1078244113675
31105.867275598.82130451247867.04597098752138
3290.992046396.3146132391453-5.3225669391453
3393.3062442398.468214865812-5.16197063581196
3491.17419413107.372526605812-16.1983324758120
3577.3329503988.279786455812-10.9468360658120
3691.127772198.5417151891453-7.4139430891453
3785.01249943104.183408192521-19.1709087625214
3883.90390242103.675499764744-19.7715973447436
39104.8626302116.104625758077-11.2419955580769
40110.9039108109.5012358625211.40267493747864
4195.43714373109.620263295855-14.1831195658547
42111.6238727115.740374341410-4.11650164141025
43108.8925403103.2137330625215.67880723747863
4496.17511682100.707041789188-4.53192496918803
45101.9740205102.860643415855-0.886622915854707
4699.11953031111.764955155855-12.6454248458547
4786.7815814792.6722150058547-5.89063353585469
48118.4195003102.93414373918815.4853565608120
49118.7441447108.57583674256410.1683079574359
50106.5296192108.067928314786-1.53830911478633
51134.7772694120.49705430812014.2802150918803
52104.6778714113.893664412564-9.2157930125641
53105.2954304114.012691845897-8.71726144589743
54139.4139849120.13280289145319.281182008547
55103.6060491107.606161612564-4.00011251256409
5699.78182974105.099470339231-5.31764059923076
57103.4610301107.253071965897-3.79204186589743
58120.0594945116.1573837058973.90211079410256
5996.7137716897.0646435558974-0.350871875897444
60107.1308929107.326572289231-0.195679389230766
61105.3608372112.968265292607-7.60742809260684
62111.6942359112.460356864829-0.766120964829072
63132.0519998124.8894828581627.16251694183761
64126.8037879118.2860929626078.51769493739316
65154.4824253118.40512039594036.0773049040598
66141.5570984124.52523144149617.0318669585043
67109.9506882111.998590162607-2.04790196260683
68127.904198109.49189888927418.4122991107265
69133.0888617111.64550051594021.4433611840598
70120.0796299120.549812255940-0.470182355940181
71117.5557142101.45707210594016.0986420940598
72143.0362309111.71900083927431.3172300607265
73159.982927115.59742433829144.3855026617094
74128.5991124115.08951591051313.5095964894872
75149.7373327127.51864190384622.2186907961538
76126.8169313120.9152520082915.9016792917094
77140.9639674121.03427944162419.9296879583761
78137.6691981127.15439048717910.5148076128205
79117.9402337114.6277492082913.31248449170940
80122.3095247112.12105793495710.1884667650427
81127.7804207114.27465956162413.5057611383761
82136.1677176123.17897130162412.9887462983761
83116.2405856104.08623115162412.1543544483761
84123.1576893114.3481598849578.80952941504274
85116.3400234119.989852888333-3.64982948833333
86108.6119282119.481944460556-10.8700162605556
87125.8982264131.911070453889-6.01284405388889
88112.8003105125.307680558333-12.5073700583333
89107.5182447125.426707991667-17.9084632916667
90135.0955413131.5468190372223.54872226277779
91115.5096488119.020177758333-3.51052895833333
92115.8640759116.513486485-0.649410584999993
93104.5883906118.667088111667-14.0786975116667
94163.7213386127.57139985166736.1499387483333
95113.4482275108.4786597016674.96956779833334
9698.0428844118.740588435-20.697704035
97116.7868521124.382281438376-7.59542933837607
98126.5330444123.8743730105982.65867138940171
99113.0336597136.303499003932-23.2698393039316
100124.3392163129.700109108376-5.36089280837607
101109.8298759129.819136541709-19.9892606417094
102124.4434777135.939247587265-11.4957698872650
103111.5039454123.412606308376-11.9086609083761
104102.0350019120.905915035043-18.8709131350427
105116.8726598123.059516661709-6.1868568617094
106112.2073122131.963828401709-19.7565162017094
107101.1513902112.871088251709-11.7196980517094
108124.4255108123.1330169850431.29249381495726


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.09698373264467640.1939674652893530.903016267355324
180.03667025728234150.0733405145646830.963329742717658
190.01453258026429580.02906516052859170.985467419735704
200.00960856956224180.01921713912448360.990391430437758
210.003712354189488170.007424708378976330.996287645810512
220.001782931216675930.003565862433351860.998217068783324
230.000817470964887560.001634941929775120.999182529035112
240.0003094032443061790.0006188064886123570.999690596755694
250.0004797155262234880.0009594310524469770.999520284473776
260.0001810065694682910.0003620131389365810.999818993430532
270.0004221239148126140.0008442478296252280.999577876085187
280.0001778692372146380.0003557384744292760.999822130762785
298.91331760153943e-050.0001782663520307890.999910866823985
300.0002041066356751570.0004082132713503130.999795893364325
310.0006093316916673170.001218663383334630.999390668308333
320.0003060314711059270.0006120629422118540.999693968528894
330.0002227160965488300.0004454321930976600.999777283903451
340.0001201546909389490.0002403093818778970.99987984530906
356.21472805330555e-050.0001242945610661110.999937852719467
360.0001691715077756090.0003383430155512170.999830828492224
370.0001253107074440650.000250621414888130.999874689292556
380.0001448494641271180.0002896989282542360.999855150535873
399.95345156116222e-050.0001990690312232440.999900465484388
409.77874073622333e-050.0001955748147244670.999902212592638
416.7770858998776e-050.0001355417179975520.999932229141001
420.000302507275189460.000605014550378920.99969749272481
430.0003138057795670220.0006276115591340440.999686194220433
440.0002250280321053450.0004500560642106910.999774971967895
450.0002549665905904360.0005099331811808720.99974503340941
460.0003121853770880810.0006243707541761620.999687814622912
470.0003699811628794160.0007399623257588320.99963001883712
480.006508426035671480.01301685207134300.993491573964329
490.01715660014911890.03431320029823770.982843399850881
500.01353165695581870.02706331391163730.986468343044181
510.02144029281322590.04288058562645190.978559707186774
520.01956628112667520.03913256225335050.980433718873325
530.02035058848358670.04070117696717350.979649411516413
540.05373738650318280.1074747730063660.946262613496817
550.04403772879116530.08807545758233070.955962271208835
560.04256495041293920.08512990082587840.95743504958706
570.04393705553462210.08787411106924410.956062944465378
580.05384232832703690.1076846566540740.946157671672963
590.06361329352776110.1272265870555220.936386706472239
600.08132977414837670.1626595482967530.918670225851623
610.1253832071507560.2507664143015120.874616792849244
620.1228437115481850.2456874230963710.877156288451814
630.1051930760841960.2103861521683920.894806923915804
640.08736869083774830.1747373816754970.912631309162252
650.2923762668927680.5847525337855360.707623733107232
660.2861229134222450.5722458268444910.713877086577755
670.2639719669210690.5279439338421390.73602803307893
680.2528138566082120.5056277132164240.747186143391788
690.2622545402452870.5245090804905740.737745459754713
700.3511960104583960.7023920209167920.648803989541604
710.3638142625182660.7276285250365320.636185737481734
720.399098733894390.798197467788780.60090126610561
730.5427715920275130.9144568159449740.457228407972487
740.5307575346962190.9384849306075620.469242465303781
750.5618986504929660.8762026990140690.438101349507034
760.5260564861444650.947887027711070.473943513855535
770.5980667751523110.8038664496953770.401933224847689
780.526426795438180.947146409123640.47357320456182
790.4699526874135140.9399053748270270.530047312586486
800.4030103985887550.806020797177510.596989601411245
810.3543427031550570.7086854063101140.645657296844943
820.2901721393457150.580344278691430.709827860654285
830.2204803832666800.4409607665333600.77951961673332
840.1690747603265900.3381495206531810.83092523967341
850.1300049088804540.2600098177609080.869995091119546
860.1521285672615910.3042571345231810.84787143273841
870.1173237629145110.2346475258290210.88267623708549
880.1093742615669290.2187485231338590.89062573843307
890.08748178844474730.1749635768894950.912518211555253
900.04731592197875110.09463184395750230.952684078021249
910.02268137986363420.04536275972726840.977318620136366


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level270.36NOK
5% type I error level360.48NOK
10% type I error level410.546666666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/10darg1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/10darg1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/1ihhg1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/1ihhg1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/2kt9v1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/2kt9v1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/3adhp1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/3adhp1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/46c2e1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/46c2e1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/5kprj1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/5kprj1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/6a6dk1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/6a6dk1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/7hiit1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/7hiit1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/8x8hh1258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/8x8hh1258618159.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/9wm921258618159.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125861820789xeyj6m9n6jhqj/9wm921258618159.ps (open in new window)


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