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 10:16:31 -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/t12586511819w26nl9wb5okb08.htm/, Retrieved Thu, 19 Nov 2009 18:19:53 +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/t12586511819w26nl9wb5okb08.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:
ws7l4
 
Dataseries X:
» Textbox « » Textfile « » CSV «
6,3 101,9 6,3 6,1 6,1 6,3 6 106,2 6,3 6,3 6,1 6,1 6,2 81 6 6,3 6,3 6,1 6,4 94,7 6,2 6 6,3 6,3 6,8 101 6,4 6,2 6 6,3 7,5 109,4 6,8 6,4 6,2 6 7,5 102,3 7,5 6,8 6,4 6,2 7,6 90,7 7,5 7,5 6,8 6,4 7,6 96,2 7,6 7,5 7,5 6,8 7,4 96,1 7,6 7,6 7,5 7,5 7,3 106 7,4 7,6 7,6 7,5 7,1 103,1 7,3 7,4 7,6 7,6 6,9 102 7,1 7,3 7,4 7,6 6,8 104,7 6,9 7,1 7,3 7,4 7,5 86 6,8 6,9 7,1 7,3 7,6 92,1 7,5 6,8 6,9 7,1 7,8 106,9 7,6 7,5 6,8 6,9 8 112,6 7,8 7,6 7,5 6,8 8,1 101,7 8 7,8 7,6 7,5 8,2 92 8,1 8 7,8 7,6 8,3 97,4 8,2 8,1 8 7,8 8,2 97 8,3 8,2 8,1 8 8 105,4 8,2 8,3 8,2 8,1 7,9 102,7 8 8,2 8,3 8,2 7,6 98,1 7,9 8 8,2 8,3 7,6 104,5 7,6 7,9 8 8,2 8,3 87,4 7,6 7,6 7,9 8 8,4 89,9 8,3 7,6 7,6 7,9 8,4 109,8 8,4 8,3 7,6 7,6 8,4 111,7 8,4 8,4 8,3 7,6 8,4 98,6 8,4 8,4 8,4 8,3 8,6 96,9 8,4 8,4 8,4 8,4 8,9 95,1 8,6 8,4 8,4 8,4 8,8 97 8,9 8,6 8,4 8,4 8,3 112,7 8,8 8,9 8,6 8,4 7,5 102,9 8,3 8,8 8,9 8,6 7,2 97,4 7,5 8,3 8,8 8,9 7,4 111,4 7,2 7,5 8,3 8,8 8,8 87,4 7,4 7,2 7,5 8,3 9,3 96,8 8,8 7,4 7,2 7,5 9,3 114,1 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 time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 0.933141956395697 -0.00599446355432254X[t] + 1.55409357038416Y1[t] -0.862743246928274Y2[t] -0.133170668301423Y3[t] + 0.394880751487633Y4[t] -0.107835895318313M1[t] + 0.00865868146602026M2[t] + 0.555132299015706M3[t] -0.358561693549813M4[t] + 0.194164167438996M5[t] + 0.377211037290883M6[t] + 0.0719094385043453M7[t] + 0.228312254709038M8[t] + 0.145801390152894M9[t] -0.0769332094556072M10[t] + 0.0653509691361015M11[t] -0.000644466348359865t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.9331419563956970.5003751.86490.0661090.033055
X-0.005994463554322540.004393-1.36450.1764790.08824
Y11.554093570384160.10742214.467200
Y2-0.8627432469282740.208198-4.14398.9e-054.4e-05
Y3-0.1331706683014230.20837-0.63910.52470.26235
Y40.3948807514876330.106413.71090.0003940.000197
M1-0.1078358953183130.086434-1.24760.2160550.108028
M20.008658681466020260.0938060.09230.9267020.463351
M30.5551322990157060.1173544.73041e-055e-06
M4-0.3585616935498130.121642-2.94770.0042660.002133
M50.1941641674389960.1254271.5480.1258260.062913
M60.3772110372908830.1039363.62930.0005160.000258
M70.07190943850434530.0845640.85040.3978320.198916
M80.2283122547090380.0916222.49190.0149150.007458
M90.1458013901528940.0947451.53890.128040.06402
M10-0.07693320945560720.093945-0.81890.415430.207715
M110.06535096913610150.0923640.70750.4814260.240713
t-0.0006444663483598650.000878-0.73430.4650760.232538


Multiple Linear Regression - Regression Statistics
Multiple R0.980250524311518
R-squared0.960891090413006
Adjusted R-squared0.952026404239954
F-TEST (value)108.395387231424
F-TEST (DF numerator)17
F-TEST (DF denominator)75
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.162365640018282
Sum Squared Residuals1.97719507939096


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.36.4172891034347-0.1172891034347
266.2558382209039-0.255838220903900
36.26.45986564889862-0.259865648898616
46.46.112020877743370.287979122256635
56.86.80455841717319-0.00455841717318884
67.57.240597746481840.259402253518158
77.57.77232258971748-0.27232258971748
87.67.419404326931120.180595673068879
97.67.523421636300320.0765783636996842
107.47.4907842180474-0.090784218047402
117.37.248942960195980.0510570398040157
127.17.25695883651506-0.156958836515059
136.96.95716212903442-0.0571621290344202
146.86.85289803971516-0.0528980397151625
157.57.51510901024108-0.0151090102410793
167.67.68600213097033-0.0860021309703315
177.87.635195465728050.164804534271954
1887.875266273396180.124733726603819
198.18.036029384905780.0639706150942221
208.28.24564868038028-0.0456486803802792
218.38.251600295265260.0483997047347368
228.28.16541313054310.0345868694568924
2388.04118667551752-0.0411866755175201
247.97.793002910564350.106997089435653
257.67.7820415155737-0.182041515573704
267.67.466719371351110.133280628648889
278.38.30821773994245-0.00821773994245075
288.48.46722174675334-0.0672217467533438
298.48.33303817540510.066961824594893
308.48.32455730565160.0754426943484016
318.48.360238172289530.0397618277104728
328.68.565675185336970.0343248146630277
338.98.804128602907080.095871397092920
348.88.8630394779266-0.0630394779266007
358.38.4696996475899-0.169699647589903
367.57.81070244424565-0.310702444245649
377.27.055069691560990.144930308439011
387.47.338061097665770.0619389023342349
398.88.506495221223470.29350477877653
409.39.263037753351450.0369622466485494
419.39.135522808888040.164477191111958
428.78.8018697651094-0.101869765109394
438.28.088079842423640.111920157576364
448.38.195664997163610.10433500283639
458.58.82115429262278-0.321154292622775
468.68.64418369668743-0.0441836966874283
478.58.50517539473154-0.00517539473154078
488.28.22173969975753-0.0217396997575299
498.17.827138653841130.272861346158865
507.98.00449499913778-0.104494999137783
518.68.524060183589410.0759398164105859
528.78.676270654109980.0237293458900206
538.78.662084079249930.0379159207500705
548.58.62977612389866-0.129776123898662
558.48.25872685959060.141273140409403
568.58.51007659004603-0.0100765900460287
578.78.71502080426232-0.015020804262318
588.78.640336456179730.0596635438202719
598.68.467904316454540.132095683545457
608.58.348071526024120.151928473975882
618.38.194283217609620.105716782390385
6288.07073202678641-0.0707320267864107
638.28.47174908372574-0.271749083725740
648.18.023681971808430.0763180281915747
658.18.12305958139089-0.0230595813908927
6688.23644736243832-0.236447362438324
677.97.888965226188240.0110347738117600
687.98.00144012129234-0.101440121292337
6987.993898327693510.00610167230648676
7087.903953734944470.0960462650555279
717.97.838905789362880.0610942106371242
7287.680313617149750.319686382850246
737.77.83382272898925-0.133822728989254
747.27.36313124836815-0.163131248368146
757.57.485994696268740.0140053037312642
767.37.47855998398786-0.178559983987857
7777.35936675167654-0.359366751676536
7876.951352968028430.0486470319715659
7977.10387785442293-0.103877854422928
807.27.30033761974465-0.100337619744651
817.37.34539601743944-0.0453960174394394
827.17.092289285671260.00771071432873867
836.86.82818521614763-0.0281852161476333
846.46.48921096574354-0.0892109657435433
856.16.13319295995618-0.0331929599561825
866.56.048124996071720.451875003928279
877.77.528508416110490.171491583889507
887.97.99320488127525-0.0932048812752471
897.57.54717472048826-0.0471747204882575
906.96.94013245499557-0.0401324549955651
916.66.591760070461810.00823992953818632
926.96.961752479105-0.061752479105001
937.77.54538002350930.154619976490705


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.5351504339810290.9296991320379420.464849566018971
220.5797160290729340.8405679418541320.420283970927066
230.4364369942332550.872873988466510.563563005766745
240.3892927074654310.7785854149308620.610707292534569
250.3073328570457530.6146657140915060.692667142954247
260.2507415252751340.5014830505502670.749258474724867
270.1971040305744970.3942080611489930.802895969425503
280.1318904349410660.2637808698821320.868109565058934
290.1204448567051010.2408897134102020.8795551432949
300.1623992377152620.3247984754305240.837600762284738
310.1195985515294980.2391971030589960.880401448470502
320.1564998201141300.3129996402282610.84350017988587
330.1103961794660620.2207923589321230.889603820533938
340.07937873661642380.1587574732328480.920621263383576
350.09569508077917980.1913901615583600.90430491922082
360.2244018399151920.4488036798303840.775598160084808
370.1893039795516310.3786079591032620.810696020448369
380.1418259012267890.2836518024535790.85817409877321
390.2171479105978660.4342958211957320.782852089402134
400.2150615484652360.4301230969304730.784938451534763
410.2116913814947330.4233827629894670.788308618505267
420.1693991872283920.3387983744567830.830600812771608
430.1259610013363440.2519220026726880.874038998663656
440.1186527064383420.2373054128766840.881347293561658
450.5136460143213370.9727079713573260.486353985678663
460.4513698224353870.9027396448707740.548630177564613
470.44045170610660.88090341221320.5595482938934
480.4416078734621050.883215746924210.558392126537895
490.5136285991545780.9727428016908440.486371400845422
500.5626287425523520.8747425148952970.437371257447648
510.494455509108970.988911018217940.50554449089103
520.4321793199517590.8643586399035180.567820680048241
530.4132402162592830.8264804325185650.586759783740717
540.4646253908798380.9292507817596750.535374609120162
550.4257160324439680.8514320648879370.574283967556032
560.3623251586861200.7246503173722410.63767484131388
570.2965716606510030.5931433213020060.703428339348997
580.2389606144913480.4779212289826970.761039385508652
590.2142577874986690.4285155749973370.785742212501331
600.1961190387598100.3922380775196210.80388096124019
610.209189332210820.418378664421640.79081066778918
620.1855107241826130.3710214483652260.814489275817387
630.3128326241557820.6256652483115630.687167375844218
640.3220991314307910.6441982628615830.677900868569209
650.2828996574387080.5657993148774160.717100342561292
660.3720837311929120.7441674623858240.627916268807088
670.3628264655343030.7256529310686060.637173534465697
680.2709769485788660.5419538971577310.729023051421134
690.1954868012897790.3909736025795580.804513198710221
700.1277572518313110.2555145036626220.872242748168689
710.3001829612021680.6003659224043360.699817038797832
720.3859123594920830.7718247189841660.614087640507917


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/1036ex1258650986.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/1036ex1258650986.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/4vepk1258650986.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/4vepk1258650986.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/66c411258650986.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/66c411258650986.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/9x60q1258650986.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t12586511819w26nl9wb5okb08/9x60q1258650986.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