Home » date » 2009 » Dec » 14 »

multiple linear regression

*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: Mon, 14 Dec 2009 08:03:46 -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/Dec/14/t1260803101s5l7fbay7kp5700.htm/, Retrieved Mon, 14 Dec 2009 16:05:13 +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/Dec/14/t1260803101s5l7fbay7kp5700.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 97.56592292 0 93.71196755 0 92.69776876 0 89.65517241 0 89.04665314 0 98.98580122 0 105.6795132 0 101.6227181 0 98.37728195 0 94.11764706 0 93.30628803 0 94.72616633 0 93.30628803 0 90.87221095 0 89.85801217 0 88.43813387 0 87.42393509 0 98.17444219 0 103.4482759 0 104.0567951 0 102.0283976 0 95.53752535 0 95.53752535 0 96.55172414 0 96.34888438 0 95.3346856 0 93.50912779 0 92.29208925 0 92.49492901 0 104.8681542 0 106.4908722 0 106.0851927 0 105.2738337 0 103.2454361 0 103.8539554 0 105.2738337 0 104.8681542 0 103.4482759 0 103.2454361 0 101.6227181 0 102.8397566 0 115.4158215 0 117.6470588 0 117.2413793 0 114.6044625 0 110.9533469 0 112.5760649 0 113.9959432 0 113.7931034 0 112.5760649 0 110.3448276 0 108.9249493 0 110.1419878 0 120.4868154 0 123.9350913 0 124.3407708 0 123.9350913 0 120.4868154 0 120.6896552 0 119.8782961 0 119.4726166 0 118.4584178 0 116.2271805 0 115.010142 0 115.4158215 0 125.9634888 0 127.5862069 0 127.3833671 0 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
TW[t] = + 108.225040679560 -4.21597254897221DUM[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)108.2250406795601.10128598.271600
DUM-4.215972548972212.775793-1.51880.1317810.065891


Multiple Linear Regression - Regression Statistics
Multiple R0.145942818764672
R-squared0.021299306348978
Adjusted R-squared0.0120662809371759
F-TEST (value)2.30686101239927
F-TEST (DF numerator)1
F-TEST (DF denominator)106
p-value0.131781018435829
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation10.5055873700832
Sum Squared Residuals11698.9407949879


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1100108.225040679560-8.22504067956022
297.56592292108.225040679560-10.6591177595604
393.71196755108.225040679560-14.5130731295604
492.69776876108.225040679560-15.5272719195604
589.65517241108.225040679560-18.5698682695604
689.04665314108.225040679560-19.1783875395604
798.98580122108.225040679560-9.23923945956044
8105.6795132108.225040679560-2.54552747956044
9101.6227181108.225040679560-6.60232257956044
1098.37728195108.225040679560-9.84775872956044
1194.11764706108.225040679560-14.1073936195604
1293.30628803108.225040679560-14.9187526495604
1394.72616633108.225040679560-13.4988743495604
1493.30628803108.225040679560-14.9187526495604
1590.87221095108.225040679560-17.3528297295604
1689.85801217108.225040679560-18.3670285095604
1788.43813387108.225040679560-19.7869068095604
1887.42393509108.225040679560-20.8011055895604
1998.17444219108.225040679560-10.0505984895604
20103.4482759108.225040679560-4.77676477956044
21104.0567951108.225040679560-4.16824557956044
22102.0283976108.225040679560-6.19664307956044
2395.53752535108.225040679560-12.6875153295604
2495.53752535108.225040679560-12.6875153295604
2596.55172414108.225040679560-11.6733165395604
2696.34888438108.225040679560-11.8761562995604
2795.3346856108.225040679560-12.8903550795604
2893.50912779108.225040679560-14.7159128895604
2992.29208925108.225040679560-15.9329514295604
3092.49492901108.225040679560-15.7301116695604
31104.8681542108.225040679560-3.35688647956043
32106.4908722108.225040679560-1.73416847956044
33106.0851927108.225040679560-2.13984797956045
34105.2738337108.225040679560-2.95120697956044
35103.2454361108.225040679560-4.97960457956043
36103.8539554108.225040679560-4.37108527956044
37105.2738337108.225040679560-2.95120697956044
38104.8681542108.225040679560-3.35688647956043
39103.4482759108.225040679560-4.77676477956044
40103.2454361108.225040679560-4.97960457956043
41101.6227181108.225040679560-6.60232257956044
42102.8397566108.225040679560-5.38528407956044
43115.4158215108.2250406795607.19078082043957
44117.6470588108.2250406795609.42201812043955
45117.2413793108.2250406795609.01633862043956
46114.6044625108.2250406795606.37942182043956
47110.9533469108.2250406795602.72830622043956
48112.5760649108.2250406795604.35102422043957
49113.9959432108.2250406795605.77090252043956
50113.7931034108.2250406795605.56806272043957
51112.5760649108.2250406795604.35102422043957
52110.3448276108.2250406795602.11978692043956
53108.9249493108.2250406795600.699908620439554
54110.1419878108.2250406795601.91694712043956
55120.4868154108.22504067956012.2617747204396
56123.9350913108.22504067956015.7100506204396
57124.3407708108.22504067956016.1157301204396
58123.9350913108.22504067956015.7100506204396
59120.4868154108.22504067956012.2617747204396
60120.6896552108.22504067956012.4646145204396
61119.8782961108.22504067956011.6532554204396
62119.4726166108.22504067956011.2475759204396
63118.4584178108.22504067956010.2333771204396
64116.2271805108.2250406795608.00213982043956
65115.010142108.2250406795606.78510132043956
66115.4158215108.2250406795607.19078082043957
67125.9634888108.22504067956017.7384481204395
68127.5862069108.22504067956019.3611662204396
69127.3833671108.22504067956019.1583264204396
70124.137931108.22504067956015.9128903204396
71120.6896552108.22504067956012.4646145204396
72121.0953347108.22504067956012.8702940204396
73120.2839757108.22504067956012.0589350204396
74119.6754564108.22504067956011.4504157204396
75117.6470588108.2250406795609.42201812043955
76116.4300203108.2250406795608.20497962043955
77116.2271805108.2250406795608.00213982043956
78116.2271805108.2250406795608.00213982043956
79125.7606491108.22504067956017.5356084204396
80126.9776876108.22504067956018.7526469204396
81125.7606491108.22504067956017.5356084204396
82119.2697769108.22504067956011.0447362204396
83114.8073022108.2250406795606.58226152043955
84112.9817444108.2250406795604.75670372043956
85113.7931034108.2250406795605.56806272043957
86111.3590264108.2250406795603.13398572043956
87107.9107505108.225040679560-0.314290179560434
88106.693712108.225040679560-1.53132867956044
89103.6511156108.225040679560-4.57392507956044
90101.2170385108.225040679560-7.00800217956044
91112.5760649108.2250406795604.35102422043957
92114.6044625104.00906813058810.5953943694118
93109.9391481104.0090681305885.93007996941176
94106.8965517104.0090681305882.88748356941177
95103.4482759104.009068130588-0.560792230588236
96104.2596349104.0090681305880.25056676941176
97104.8681542104.0090681305880.859086069411772
98103.0425963104.009068130588-0.966471830588235
99100104.009068130588-4.00906813058823
10099.39148073104.009068130588-4.61758740058824
10195.13184584104.009068130588-8.87722229058824
10296.95740365104.009068130588-7.05166448058823
103107.0993915104.0090681305883.09032336941176
104108.31643104.0090681305884.30736186941176
105105.0709939104.0090681305881.06192576941177
106102.6369168104.009068130588-1.37215133058824
107101.8255578104.009068130588-2.18351033058824
108104.6653144104.0090681305880.656246269411765


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.1111506071870250.2223012143740490.888849392812975
60.07787546450223010.155750929004460.92212453549777
70.05035244207766830.1007048841553370.949647557922332
80.09963943163927790.1992788632785560.900360568360722
90.07150436795777530.1430087359155510.928495632042225
100.03960823583995110.07921647167990220.96039176416005
110.02309927239358300.04619854478716610.976900727606417
120.01416826687881550.0283365337576310.985831733121185
130.007704947728999340.01540989545799870.992295052271
140.004652694334136440.009305388668272890.995347305665863
150.003973833021175150.00794766604235030.996026166978825
160.004069323769636770.008138647539273540.995930676230363
170.005492605768025620.01098521153605120.994507394231974
180.008911873157042310.01782374631408460.991088126842958
190.006711381708693760.01342276341738750.993288618291306
200.009685302162944630.01937060432588930.990314697837055
210.01331481623683080.02662963247366160.98668518376317
220.01290753795152450.02581507590304890.987092462048476
230.01014976235884060.02029952471768120.98985023764116
240.008225204048955810.01645040809791160.991774795951044
250.006676639100521970.01335327820104390.993323360899478
260.005647648693549870.01129529738709970.99435235130645
270.005250568395872250.01050113679174450.994749431604128
280.006144084399582620.01228816879916520.993855915600417
290.009307352608289720.01861470521657940.99069264739171
300.01542330374480020.03084660748960050.9845766962552
310.02791798039576370.05583596079152750.972082019604236
320.05300477262107130.1060095452421430.946995227378929
330.08212157138453220.1642431427690640.917878428615468
340.1098246208566510.2196492417133020.890175379143349
350.1306181883967350.2612363767934700.869381811603265
360.1572744890736210.3145489781472430.842725510926379
370.1948094552668420.3896189105336840.805190544733158
380.2339743546117300.4679487092234610.76602564538827
390.2754438462713940.5508876925427880.724556153728606
400.3266707481024150.653341496204830.673329251897585
410.4010410364737190.8020820729474380.598958963526281
420.4860932785338020.9721865570676050.513906721466198
430.7002218510250560.5995562979498870.299778148974944
440.8625191115313880.2749617769372240.137480888468612
450.9328584686858980.1342830626282030.0671415313141017
460.9557987710159280.0884024579681440.044201228984072
470.9640014776424950.07199704471501070.0359985223575053
480.97136067097320.05727865805360.0286393290268
490.977764646640550.04447070671889890.0222353533594494
500.9818142845310140.03637143093797140.0181857154689857
510.9840324847336530.03193503053269320.0159675152663466
520.9857255009889960.02854899802200870.0142744990110044
530.9879055163463640.0241889673072720.012094483653636
540.9894987108892240.02100257822155150.0105012891107757
550.9939376749583340.01212465008333190.00606232504166594
560.9976659484572720.004668103085455920.00233405154272796
570.9990835167187130.001832966562574070.000916483281287037
580.9995781888698480.0008436222603037110.000421811130151856
590.999652136688060.0006957266238815990.000347863311940799
600.999702528648840.0005949427023217540.000297471351160877
610.999708184062210.0005836318755779340.000291815937788967
620.9996903664465410.0006192671069175620.000309633553458781
630.9996333451054930.0007333097890146650.000366654894507333
640.9995094837624790.0009810324750423150.000490516237521158
650.999327330950040.001345338099921220.000672669049960611
660.9990774832233820.001845033553236280.00092251677661814
670.9994963674041390.001007265191721740.000503632595860869
680.999805067574670.0003898648506621140.000194932425331057
690.9999278440292190.0001443119415629367.21559707814682e-05
700.9999501509121649.96981756714394e-054.98490878357197e-05
710.9999412882631850.0001174234736298155.87117368149077e-05
720.999934653265810.0001306934683810726.5346734190536e-05
730.9999198585945330.0001602828109337258.01414054668625e-05
740.9998953996024870.0002092007950259770.000104600397512989
750.9998361537969360.0003276924061269520.000163846203063476
760.9997254605490120.0005490789019760010.000274539450988001
770.9995408822913070.000918235417386780.00045911770869339
780.9992424825151250.001515034969748990.000757517484874493
790.9996779456671310.0006441086657370930.000322054332868546
800.9999411829724770.0001176340550456895.88170275228444e-05
810.9999941269594231.17460811541272e-055.87304057706359e-06
820.9999969515463226.09690735669494e-063.04845367834747e-06
830.999995808798468.38240308031956e-064.19120154015978e-06
840.999992702020281.45959594400310e-057.29797972001548e-06
850.9999907657996881.84684006229333e-059.23420031146667e-06
860.9999838979368723.22041262563276e-051.61020631281638e-05
870.9999610527498027.78945003962261e-053.89472501981131e-05
880.99990461861160.0001907627768020859.53813884010426e-05
890.9997976803532570.000404639293485970.000202319646742985
900.999841252068270.0003174958634601640.000158747931730082
910.9996127163821540.0007745672356928730.000387283617846436
920.9999128045618550.0001743908762890498.71954381445244e-05
930.9999279678662870.0001440642674253737.20321337126865e-05
940.9998691716371570.0002616567256852600.000130828362842630
950.9996227661703130.000754467659374120.00037723382968706
960.999005960201850.001988079596302270.000994039798151136
970.9976475420315610.004704915936877950.00235245796843898
980.9938623069232460.01227538615350790.00613769307675397
990.985976046625990.0280479067480190.0140239533740095
1000.9713663091809960.05726738163800820.0286336908190041
1010.9807564873591340.03848702528173130.0192435126408657
1020.9916947522368570.01661049552628550.00830524776314273
1030.973983105242520.05203378951496120.0260168947574806


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level450.454545454545455NOK
5% type I error level730.737373737373737NOK
10% type I error level800.808080808080808NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/10jieb1260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/10jieb1260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/1nc401260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/1nc401260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/267a71260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/267a71260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/3p76w1260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/3p76w1260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/4bmzu1260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/4bmzu1260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/5dkcm1260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/5dkcm1260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/6luah1260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/6luah1260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/755cp1260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/755cp1260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/8inh81260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/8inh81260803020.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/9wtr31260803020.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260803101s5l7fbay7kp5700/9wtr31260803020.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by