Home » date » 2008 » Nov » 23 »

iraq

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 23 Nov 2008 06:02:33 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi.htm/, Retrieved Sun, 23 Nov 2008 13:03:11 +0000
 
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/2008/Nov/23/t1227445391sm021h6rqr1k1hi.htm/},
    year = {2008},
}
@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 = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
31,54 0 32,43 0 26,54 0 25,85 0 27,6 0 25,71 0 25,38 0 28,57 0 27,64 0 25,36 0 25,9 0 26,29 0 21,74 0 19,2 0 19,32 0 19,82 0 20,36 0 24,31 0 25,97 0 25,61 0 24,67 0 25,59 0 26,09 0 28,37 0 27,34 0 24,46 0 27,46 0 30,23 0 32,33 0 29,87 1 24,87 1 25,48 1 27,28 1 28,24 1 29,58 1 26,95 1 29,08 1 28,76 1 29,59 1 30,7 1 30,52 1 32,67 1 33,19 1 37,13 1 35,54 1 37,75 1 41,84 1 42,94 1 49,14 1 44,61 1 40,22 1 44,23 1 45,85 1 53,38 1 53,26 1 51,8 1 55,3 1 57,81 1 63,96 1 63,77 1 59,15 1 56,12 1 57,42 1 63,52 1 61,71 1 63,01 1 68,18 1 72,03 1 69,75 1 74,41 1 74,33 1 64,24 1 60,03 1 59,44 1 62,5 1 55,04 1 58,34 1 61,92 1 67,65 1 67,68 1 70,3 1 75,26 1 71,44 1 76,36 1 81,71 1 92,6 1 90,6 1 92,23 1 94,09 1 102,79 1 109,65 1 124,05 1 132,69 1 135,81 1 116,07 1 101,42 1
 
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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
bel20[t] = + 6.92128195374315 -22.5174619598296iraq[t] + 1.34707576756611M1[t] -0.0974022790288692M2[t] -1.77438032562385M3[t] -1.95885837221883M4[t] -1.99208641881382M5[t] + 2.4993682795699M6[t] + 3.12989023297492M7[t] + 4.97416218637994M8[t] + 5.14593413978495M9[t] + 6.09770609318998M10[t] + 3.53947804659499M11[t] + 1.18072804659498t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.921281953743154.4530691.55430.1239710.061985
iraq-22.51746195982964.042953-5.569600
M11.347075767566115.4935350.24520.8069060.403453
M2-0.09740227902886925.489867-0.01770.9858880.492944
M3-1.774380325623855.487013-0.32340.7472320.373616
M4-1.958858372218835.484973-0.35710.7219110.360955
M5-1.992086418813825.483749-0.36330.7173370.358669
M62.49936827956995.4894370.45530.6500930.325047
M73.129890232974925.484950.57060.5698090.284905
M84.974162186379945.4812760.90750.3668110.183405
M95.145934139784955.4784170.93930.350330.175165
M106.097706093189985.4763741.11350.2687660.134383
M113.539478046594995.4751480.64650.5197850.259893
t1.180728046594980.06690517.647900


Multiple Linear Regression - Regression Statistics
Multiple R0.929821421679229
R-squared0.864567876213582
Adjusted R-squared0.843096929759638
F-TEST (value)40.2668731007319
F-TEST (DF numerator)13
F-TEST (DF denominator)82
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation10.9494785986818
Sum Squared Residuals9831.06868980524


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
131.549.449085767904222.0909142320958
232.439.1853357679042323.2446642320958
326.548.6890857679042417.8509142320958
425.859.6853357679042316.1646642320958
527.610.832835767904216.7671642320958
625.7116.50501851288299.20498148711706
725.3818.31626851288297.06373148711706
828.5721.34126851288297.22873148711708
927.6422.69376851288294.94623148711706
1025.3624.82626851288290.53373148711706
1125.923.44876851288292.45123148711706
1226.2921.09001851288295.19998148711707
1321.7423.6178223270440-1.87782232704403
1419.223.354072327044-4.154072327044
1519.3222.857822327044-3.53782232704402
1619.8223.8540723270440-4.03407232704402
1720.3625.0015723270440-4.64157232704403
1824.3130.6737550720227-6.36375507202273
1925.9732.4850050720227-6.51500507202272
2025.6135.5100050720227-9.90000507202273
2124.6736.8625050720227-12.1925050720227
2225.5938.9950050720227-13.4050050720227
2326.0937.6175050720227-11.5275050720227
2428.3735.2587550720227-6.88875507202272
2527.3437.7865588861838-10.4465588861838
2624.4637.5228088861838-13.0628088861838
2727.4637.0265588861838-9.5665588861838
2830.2338.0228088861838-7.7928088861838
2932.3339.1703088861838-6.84030888618382
3029.8722.32502967133297.54497032866708
3124.8724.13627967133290.733720328667068
3225.4827.1612796713329-1.68127967133293
3327.2828.5137796713329-1.23377967133292
3428.2430.6462796713329-2.40627967133293
3529.5829.26877967133290.311220328667074
3626.9526.91002967133290.0399703286670782
3729.0829.437833485494-0.357833485494021
3828.7629.174083485494-0.414083485494008
3929.5928.6778334854940.912166514505983
4030.729.6740834854941.02591651450598
4130.5230.821583485494-0.301583485494022
4232.6736.4937662304727-3.82376623047272
4333.1938.3050162304727-5.11501623047272
4437.1341.3300162304727-4.20001623047271
4535.5442.6825162304727-7.14251623047271
4637.7544.8150162304727-7.06501623047272
4741.8443.4375162304727-1.59751623047271
4842.9441.07876623047271.86123376952729
4949.1443.60657004463385.53342995536621
5044.6143.34282004463381.26717995536619
5140.2242.8465700446338-2.62657004463380
5244.2343.84282004463380.387179955366197
5345.8544.99032004463380.859679955366204
5453.3850.66250278961252.7174972103875
5553.2652.47375278961250.786247210387504
5651.855.4987527896125-3.6987527896125
5755.356.8512527896125-1.5512527896125
5857.8158.9837527896125-1.1737527896125
5963.9657.60625278961256.3537472103875
6063.7755.24750278961258.52249721038751
6159.1557.77530660377361.37469339622641
6256.1257.5115566037736-1.39155660377359
6357.4257.01530660377360.40469339622642
6463.5258.01155660377365.50844339622641
6561.7159.15905660377362.55094339622641
6663.0164.8312393487523-1.82123934875229
6768.1866.64248934875231.53751065124772
6872.0369.66748934875232.36251065124771
6969.7571.0199893487523-1.26998934875229
7074.4173.15248934875231.25751065124771
7174.3371.77498934875232.55501065124772
7264.2469.4162393487523-5.17623934875228
7360.0371.9440431629134-11.9140431629134
7459.4471.6802931629134-12.2402931629134
7562.571.1840431629134-8.68404316291337
7655.0472.1802931629134-17.1402931629134
7758.3473.3277931629134-14.9877931629134
7861.9278.999975907892-17.0799759078921
7967.6580.811225907892-13.1612259078921
8067.6883.836225907892-16.1562259078921
8170.385.188725907892-14.8887259078921
8275.2687.321225907892-12.0612259078921
8371.4485.943725907892-14.5037259078921
8476.3683.584975907892-7.22497590789206
8581.7186.1127797220532-4.40277972205317
8692.685.84902972205326.75097027794683
8790.685.35277972205325.24722027794684
8892.2386.34902972205325.88097027794683
8994.0987.49652972205326.59347027794685
90102.7993.16871246703199.62128753296816
91109.6594.979962467031914.6700375329681
92124.0598.004962467031826.0450375329681
93132.6999.357462467031833.3325375329682
94135.81101.48996246703234.3200375329682
95116.07100.11246246703215.9575375329681
96101.4297.75371246703183.66628753296815


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.01831032978264010.03662065956528020.98168967021736
180.01784372454009790.03568744908019590.982156275459902
190.01644398709288870.03288797418577740.983556012907111
200.006282755843635120.01256551168727020.993717244156365
210.002247255509978570.004494511019957130.997752744490021
220.001289375396325030.002578750792650060.998710624603675
230.0006495945056294070.001299189011258810.99935040549437
240.0004334819700211060.0008669639400422120.999566518029979
250.0003186780382219650.000637356076443930.999681321961778
260.0001284867012423230.0002569734024846470.999871513298758
270.0001637162060396160.0003274324120792330.99983628379396
280.0002833045101526460.0005666090203052920.999716695489847
290.0003749123344749460.0007498246689498910.999625087665525
300.0001736079614180020.0003472159228360030.999826392038582
318.65048609462803e-050.0001730097218925610.999913495139054
323.74417524820012e-057.48835049640023e-050.999962558247518
331.38228972525549e-052.76457945051099e-050.999986177102747
345.15944222973537e-061.03188844594707e-050.99999484055777
351.94620932926184e-063.89241865852368e-060.99999805379067
367.13973452900942e-071.42794690580188e-060.999999286026547
372.49210648859984e-074.98421297719969e-070.999999750789351
388.928744189494e-081.7857488378988e-070.999999910712558
393.83297253176259e-087.66594506352518e-080.999999961670275
401.61528928875455e-083.23057857750910e-080.999999983847107
415.37706908323729e-091.07541381664746e-080.99999999462293
422.52289247291354e-095.04578494582709e-090.999999997477108
431.59525737525935e-093.19051475051870e-090.999999998404743
441.99803412345418e-093.99606824690837e-090.999999998001966
451.36164971071193e-092.72329942142386e-090.99999999863835
461.62721572476737e-093.25443144953474e-090.999999998372784
473.98613805317228e-097.97227610634456e-090.999999996013862
481.01078285179238e-082.02156570358476e-080.999999989892172
491.21872354161731e-072.43744708323463e-070.999999878127646
501.98048036798832e-073.96096073597665e-070.999999801951963
511.18301787673869e-072.36603575347738e-070.999999881698212
521.15119579204046e-072.30239158408092e-070.99999988488042
531.12718928095667e-072.25437856191334e-070.999999887281072
544.69524897573204e-079.39049795146408e-070.999999530475102
551.08378131853528e-062.16756263707056e-060.999998916218681
569.40743788536571e-071.88148757707314e-060.999999059256211
571.26384173687125e-062.52768347374251e-060.999998736158263
581.86823747219201e-063.73647494438402e-060.999998131762528
596.5012481727394e-061.30024963454788e-050.999993498751827
602.69267301958462e-055.38534603916925e-050.999973073269804
613.11350613607116e-056.22701227214232e-050.99996886493864
622.19871732840851e-054.39743465681703e-050.999978012826716
631.90098957834388e-053.80197915668776e-050.999980990104217
645.2151197863072e-050.0001043023957261440.999947848802137
659.10415883777525e-050.0001820831767555050.999908958411622
660.0001119252803722770.0002238505607445530.999888074719628
670.0002051893558766990.0004103787117533980.999794810644123
680.0003886645813338310.0007773291626676610.999611335418666
690.0003681024558962050.000736204911792410.999631897544104
700.0005091668294949820.001018333658989960.999490833170505
710.005015187938623910.01003037587724780.994984812061376
720.07050609787020650.1410121957404130.929493902129794
730.1220445417611100.2440890835222210.87795545823889
740.1039061287542960.2078122575085920.896093871245704
750.1284463460140060.2568926920280110.871553653985994
760.1086167015557040.2172334031114070.891383298444296
770.09638144539988030.1927628907997610.90361855460012
780.06474956189937090.1294991237987420.93525043810063
790.03681501479233990.07363002958467980.96318498520766


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level500.793650793650794NOK
5% type I error level550.873015873015873NOK
10% type I error level560.888888888888889NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/106vp51227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/106vp51227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/1odco1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/1odco1227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/2j5fj1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/2j5fj1227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/3i1os1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/3i1os1227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/4xh691227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/4xh691227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/5yxan1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/5yxan1227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/6ygz41227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/6ygz41227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/72z7n1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/72z7n1227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/8z0pa1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/8z0pa1227445340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/9cobq1227445340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227445391sm021h6rqr1k1hi/9cobq1227445340.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