Home » date » 2009 » Nov » 17 »

ws3

*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: Tue, 17 Nov 2009 08:40:23 -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/17/t1258472553he7xlzplxx9kwad.htm/, Retrieved Tue, 17 Nov 2009 16:42:45 +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/17/t1258472553he7xlzplxx9kwad.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 «
405.7 0 403.3 403.5 395.1 395.3 406.7 0 405.7 403.3 403.5 395.1 407.2 0 406.7 405.7 403.3 403.5 412.4 0 407.2 406.7 405.7 403.3 415.9 0 412.4 407.2 406.7 405.7 414.0 0 415.9 412.4 407.2 406.7 411.8 0 414.0 415.9 412.4 407.2 409.9 0 411.8 414.0 415.9 412.4 412.4 0 409.9 411.8 414.0 415.9 415.9 0 412.4 409.9 411.8 414.0 416.3 0 415.9 412.4 409.9 411.8 417.2 0 416.3 415.9 412.4 409.9 421.8 0 417.2 416.3 415.9 412.4 421.4 0 421.8 417.2 416.3 415.9 415.1 0 421.4 421.8 417.2 416.3 412.4 0 415.1 421.4 421.8 417.2 411.8 0 412.4 415.1 421.4 421.8 408.8 0 411.8 412.4 415.1 421.4 404.5 0 408.8 411.8 412.4 415.1 402.5 0 404.5 408.8 411.8 412.4 409.4 0 402.5 404.5 408.8 411.8 410.7 0 409.4 402.5 404.5 408.8 413.4 0 410.7 409.4 402.5 404.5 415.2 0 413.4 410.7 409.4 402.5 417.7 0 415.2 413.4 410.7 409.4 417.8 0 417.7 415.2 413.4 410.7 417.9 0 417.8 417.7 415.2 413.4 418.4 0 417.9 417.8 417.7 415.2 418.2 0 418.4 417.9 417.8 417.7 416.6 0 418.2 418.4 417.9 417.8 418.9 0 416.6 418.2 418.4 417.9 4 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
Y[t] = + 17.0254941272264 -2.97333759398567X[t] + 1.41303661442087Y1[t] -0.370434738549315Y2[t] -0.0226275979163081Y3[t] -0.0678756241040444Y4[t] + 0.163198807114589t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.02549412722646.6014482.57910.0112780.005639
X-2.973337593985673.315291-0.89690.3718280.185914
Y11.413036614420870.09664814.620400
Y2-0.3704347385493150.168032-2.20460.0296470.014824
Y3-0.02262759791630810.168536-0.13430.8934520.446726
Y4-0.06787562410404440.097449-0.69650.4876240.243812
t0.1631988071145890.0692082.35810.0202030.010101


Multiple Linear Regression - Regression Statistics
Multiple R0.997970467716217
R-squared0.995945054433724
Adjusted R-squared0.995715529212992
F-TEST (value)4339.153018805
F-TEST (DF numerator)6
F-TEST (DF denominator)106
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation7.27639098080917
Sum Squared Residuals5612.2617647937


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1405.7401.8245443805683.87545561943187
2406.7405.2766213123251.42337868767535
3407.2405.3981836384511.80181636154907
4412.4405.8567349040486.54326509595179
5415.9412.9969776411112.90302235888937
6414416.10035453518-2.1003545351796
7411.8412.130660868755-0.330660868755126
8409.9409.4568552893390.443144710660566
9412.4407.555668705544.84433129446036
10415.9412.1340294531643.76597054683632
11416.3416.509088373448-0.209088373447860
12417.2416.0133749324151.18662506758483
13421.8417.0512471441224.74875285587844
14421.4423.134407389347-1.73440738934716
15415.1420.9808766656-5.88087666560015
16412.4412.2249436851740.175056314825548
17411.8410.6035056545011.19649434549879
18408.8411.088760403561-2.28876040356085
19404.5407.723821156772-3.22382115677194
20402.5403.119107481355-0.619107481355438
21409.4402.1577106036027.24228939639828
22410.7413.112657070671-2.41265707067113
23413.4412.8939241600230.506075839977374
24415.2416.370377488545-1.17037748854498
25417.7417.5791107239250.120889276075128
26417.8420.458785711994-2.65878571199355
27417.9419.613207472847-1.71320747284674
28418.4419.70192134937-1.30192134937036
29418.2420.362643169789-2.16264316978871
30416.6420.048966962542-3.44896696254241
31418.9418.0072927729250.892707227074969
32421421.983759082418-0.983759082417645
33423.5424.31211416264-0.812114162639592
34432.3427.2865490782125.01345092178829
35432.3438.754751354793-6.45475135479311
36428.6435.459016657264-6.85901665726445
37426.7430.025168069098-3.32516806909827
38427.3428.27690034933-0.976900349330005
39428.5430.075469240631-1.57546924063121
40437432.0061833871474.99381661285283
41442443.851058857628-1.85105885762786
42444.9447.862866967216-2.96286696721563
43441.4449.997912932191-8.59791293219065
44440.3443.451142052573-3.15114205257325
45447.1442.951524014274.14847598572999
46455.3453.0132072946562.28679270534389
47478.6462.50680515995916.0931948400415
48486.5492.476987747659-5.97698774765852
49487.8494.524945853678-6.72494585367764
50485.9492.514854675897-6.61485467589668
51483.8487.751458690334-3.95145869033436
52488.4485.0854733026963.31452669730423
53494492.4813076118061.51869238819444
54493.6499.029993303772-5.42999330377211
55487.3496.591994789446-9.29199478944569
56482.1487.562294401919-5.46229440191858
57484.2482.3403892110891.85961078891073
58496.8487.5669296654589.23307033454159
59501.1505.301756804343-4.20175680434267
60499.8507.178970637462-7.37897063746242
61495.5503.484705925704-7.98470592570384
62498.1497.1008809161720.99911908382831
63503.8502.2683949901861.53160500981355
64516.2509.7083091616476.49169083835291
65526.1525.5147174069140.585282593085601
66527.1534.76813400799-7.66813400799054
67525.1532.009592246333-6.90959224633251
68528.9527.9106121277940.989387872205504
69540.1533.4896232702616.61037672973944
70549548.048559724130.95144027586986
71556556.688681703964-0.688681703964186
72568.9562.9349111706785.96508882932204
73589.1577.77164652255611.328353477444
74590.3600.937090573746-10.6370905737459
75603.3594.546126217628.7538737823794
76638.8611.30160629709627.4983937029043
77643655.413712590609-12.4137125906087
78656.7647.9856224379538.71437756204665
79656.1664.265934121345-8.16593412134524
80654.1656.00173447474-1.90173447473958
81659.9652.9660451834526.93395481654834
82662.1661.149406339830.950593660169812
83669.2662.358744785386.84125521462021
84673.1671.7440583103681.35594168963245
85678.3674.3445539348043.95544606519593
86677.4680.10086533833-2.70086533833003
87678.5676.4959059889972.00409401100289
88672.4678.164457893499-5.76445789349856
89665.3668.968066733025-3.66806673302521
90667.9661.3945551868886.5054448131119
91672.1667.9251009959724.17489900402786
92662.5673.634620515667-11.1346205156667
93682.3659.0999270989923.2000729010099
94692.1690.5259118277921.57408817220781
95702.7697.1344089517155.5655910482855
96721.4708.84911498656312.5508850134370
97733.2729.9438024378853.25619756211501
98747.7738.9486700301618.7513299698388
99737.6754.087152134959-16.4871521349586
100729.3733.0710976013-3.77109760129934
101706.1724.118450833854-18.0184508338545
102674.3693.81815070581-19.5181507058105
103659658.5142239748420.485776025158301
104645.7649.926115218907-4.2261152189072
105646.1639.2578506469816.8421493530187
106633644.444355623212-11.4443556232125
107622.3627.288044987073-4.98804498707281
108628.2618.07814185629710.1218581437027
109637.3630.8111796740356.48882032596509
110639.6642.778732688406-3.17873268840567
111638.5643.413725938097-4.9137259380967
112650.5640.5642072474339.93579275256742
113655.4657.421611985447-2.02161198544754


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.05327201463947070.1065440292789410.94672798536053
110.01652367602938210.03304735205876430.983476323970618
120.005648206057246970.01129641211449390.994351793942753
130.00431178648236020.00862357296472040.99568821351764
140.001456244284165340.002912488568330680.998543755715835
150.001496523857606210.002993047715212430.998503476142394
160.0005472342177990260.001094468435598050.9994527657822
170.0004250353112435940.0008500706224871880.999574964688756
180.0004179726542522950.000835945308504590.999582027345748
190.0001907467881291470.0003814935762582950.99980925321187
206.38627785698852e-050.0001277255571397700.99993613722143
210.0001494196198713250.000298839239742650.999850580380129
227.50041848527208e-050.0001500083697054420.999924995815147
235.13559479874637e-050.0001027118959749270.999948644052013
241.86608872214456e-053.73217744428912e-050.999981339112779
258.67637480874332e-061.73527496174866e-050.999991323625191
263.00552095746989e-066.01104191493977e-060.999996994479043
271.07778191072874e-062.15556382145748e-060.99999892221809
283.75309826427624e-077.50619652855249e-070.999999624690174
291.2125394178203e-072.4250788356406e-070.999999878746058
303.86348245074370e-087.72696490148741e-080.999999961365176
312.28301951754785e-084.56603903509570e-080.999999977169805
327.9097420867311e-091.58194841734622e-080.999999992090258
333.79559636741921e-097.59119273483842e-090.999999996204404
344.68148204914326e-089.36296409828652e-080.99999995318518
352.11885750837688e-084.23771501675376e-080.999999978811425
367.72114613779455e-091.54422922755891e-080.999999992278854
372.52651635098144e-095.05303270196289e-090.999999997473484
381.03685776461038e-092.07371552922076e-090.999999998963142
393.99284355974862e-107.98568711949725e-100.999999999600716
404.37612120623795e-098.75224241247591e-090.999999995623879
411.81180819039469e-093.62361638078937e-090.999999998188192
428.26637666212131e-101.65327533242426e-090.999999999173362
434.88249334042997e-109.76498668085993e-100.99999999951175
441.93863335889733e-103.87726671779465e-100.999999999806137
455.03063835514618e-101.00612767102924e-090.999999999496936
463.88639550646753e-107.77279101293506e-100.99999999961136
471.83966241515281e-063.67932483030561e-060.999998160337585
481.50603034866150e-063.01206069732299e-060.999998493969651
498.28950826127074e-071.65790165225415e-060.999999171049174
504.27765254061355e-078.5553050812271e-070.999999572234746
512.38473642953617e-074.76947285907233e-070.999999761526357
521.27741584388530e-072.55483168777060e-070.999999872258416
536.22207638783779e-081.24441527756756e-070.999999937779236
545.75404165003672e-081.15080833000734e-070.999999942459584
557.54332259129016e-081.50866451825803e-070.999999924566774
564.23991443181684e-088.47982886363368e-080.999999957600856
572.04788544157639e-084.09577088315279e-080.999999979521146
583.70346482775592e-087.40692965551185e-080.999999962965352
592.65806501537123e-085.31613003074245e-080.99999997341935
601.89134759333784e-083.78269518667568e-080.999999981086524
611.6962144823663e-083.3924289647326e-080.999999983037855
629.25130273445294e-091.85026054689059e-080.999999990748697
634.02602988655916e-098.05205977311832e-090.99999999597397
644.24061109482202e-098.48122218964405e-090.999999995759389
652.14749453614351e-094.29498907228703e-090.999999997852505
662.47084276148594e-094.94168552297187e-090.999999997529157
674.01096077768932e-098.02192155537864e-090.99999999598904
683.93597895746357e-097.87195791492715e-090.999999996064021
693.0156687393205e-096.031337478641e-090.999999996984331
701.71008198864545e-093.4201639772909e-090.999999998289918
712.12223151849986e-094.24446303699972e-090.999999997877768
727.62566033566779e-091.52513206713356e-080.99999999237434
732.243017201485e-084.48603440297e-080.999999977569828
742.01837987634177e-064.03675975268355e-060.999997981620124
751.91228249219319e-053.82456498438637e-050.999980877175078
760.0007759056840353550.001551811368070710.999224094315965
770.01300356788944020.02600713577888040.98699643211056
780.01793464347752020.03586928695504040.98206535652248
790.1133845226042810.2267690452085610.886615477395719
800.1534071089866370.3068142179732740.846592891013363
810.1205386034748430.2410772069496860.879461396525157
820.1005551658614740.2011103317229480.899444834138526
830.07926718155886440.1585343631177290.920732818441136
840.06068482415739430.1213696483147890.939315175842606
850.0437849749625980.0875699499251960.956215025037402
860.03926792686344440.07853585372688890.960732073136556
870.02732978453836060.05465956907672130.97267021546164
880.03365257155923720.06730514311847430.966347428440763
890.03927171187781470.07854342375562950.960728288122185
900.02688398619632120.05376797239264250.973116013803679
910.01731336511884210.03462673023768430.982686634881158
920.2072064923595260.4144129847190510.792793507640474
930.2411961628128950.482392325625790.758803837187105
940.2849703227504220.5699406455008450.715029677249578
950.2643632543364830.5287265086729650.735636745663517
960.2745849246269570.5491698492539140.725415075373043
970.2209564020870380.4419128041740760.779043597912962
980.3478632992961020.6957265985922030.652136700703898
990.3610572250513620.7221144501027240.638942774948638
1000.7300221435705480.5399557128589050.269977856429452
1010.71518003052880.5696399389424020.284819969471201
1020.6875017046696930.6249965906606140.312498295330307
1030.8217324391620050.356535121675990.178267560837995


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level640.680851063829787NOK
5% type I error level690.73404255319149NOK
10% type I error level750.797872340425532NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/10foa41258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/10foa41258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/162r11258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/162r11258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/2sh481258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/2sh481258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/3ao7b1258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/3ao7b1258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/4sfbf1258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/4sfbf1258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/53u551258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/53u551258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/6nax31258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/6nax31258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/7e9ca1258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/7e9ca1258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/8wrrn1258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/8wrrn1258472413.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/929ow1258472413.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258472553he7xlzplxx9kwad/929ow1258472413.ps (open in new window)


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