Home » date » 2010 » Dec » 28 »

Multiple Regression X1 & X2

*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, 28 Dec 2010 18:45:22 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr.htm/, Retrieved Tue, 28 Dec 2010 19:45:01 +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/2010/Dec/28/t1293561889c6hlvu9560z7mrr.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
621 0 0 587 0 0 655 0 0 517 0 0 646 0 0 657 0 0 382 0 0 345 0 0 625 0 0 654 0 0 606 0 0 510 0 0 614 0 0 647 0 0 580 0 0 614 0 0 636 0 0 388 0 0 356 0 0 639 0 0 753 0 0 611 0 0 639 0 0 630 0 0 586 0 0 695 0 0 552 0 0 619 0 0 681 0 0 421 0 0 307 0 0 754 0 0 690 0 0 644 0 0 643 0 0 608 0 0 651 0 0 691 0 0 627 0 0 634 0 0 731 0 0 475 0 0 337 0 0 803 0 0 722 0 0 590 0 0 724 0 0 627 0 0 696 0 0 825 0 0 677 0 0 656 0 0 785 0 0 412 0 0 352 0 0 839 0 0 729 0 0 696 0 0 641 0 0 695 0 0 638 0 0 762 0 0 635 0 0 721 0 0 854 0 0 418 0 0 367 0 0 824 0 0 687 0 0 601 0 0 676 0 0 740 0 0 691 0 0 683 0 0 594 0 0 729 0 0 731 0 0 386 0 0 331 0 0 706 0 0 715 0 0 657 0 0 653 0 0 642 0 0 643 0 0 718 0 0 654 0 0 632 0 0 731 0 0 392 0 0 344 0 0 792 0 0 852 0 0 649 0 0 629 0 0 685 0 0 617 0 0 715 0 0 715 0 0 629 0 0 916 0 0 531 1 0 357 1 0 917 1 0 828 1 0 708 1 0 858 1 0 775 1 0 785 1 0 1006 1 0 789 1 0 734 1 0 906 1 0 532 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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 628.524752475248 + 93.8323903818953X1[t] + 99.3095238095238X2[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)628.52475247524814.0773444.64800
X193.832390381895340.3464652.32570.0216220.010811
X299.309523809523852.5739531.88890.0611790.03059


Multiple Linear Regression - Regression Statistics
Multiple R0.420632001624795
R-squared0.176931280790882
Adjusted R-squared0.163969568677353
F-TEST (value)13.6503016917187
F-TEST (DF numerator)2
F-TEST (DF denominator)127
p-value4.26768281913681e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation141.475512912452
Sum Squared Residuals2541945.73573786


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1621628.524752475242-7.52475247524237
2587628.524752475247-41.5247524752473
3655628.52475247524826.4752475247524
4517628.524752475248-111.524752475248
5646628.52475247524817.4752475247524
6657628.52475247524828.4752475247524
7382628.524752475248-246.524752475248
8345628.524752475248-283.524752475248
9625628.524752475248-3.52475247524757
10654628.52475247524825.4752475247524
11606628.524752475248-22.5247524752476
12510628.524752475248-118.524752475248
13614628.524752475248-14.5247524752476
14647628.52475247524818.4752475247524
15580628.524752475248-48.5247524752476
16614628.524752475248-14.5247524752476
17636628.5247524752487.47524752475243
18388628.524752475248-240.524752475248
19356628.524752475248-272.524752475248
20639628.52475247524810.4752475247524
21753628.524752475248124.475247524752
22611628.524752475248-17.5247524752476
23639628.52475247524810.4752475247524
24630628.5247524752481.47524752475243
25586628.524752475248-42.5247524752476
26695628.52475247524866.4752475247524
27552628.524752475248-76.5247524752476
28619628.524752475248-9.52475247524757
29681628.52475247524852.4752475247524
30421628.524752475248-207.524752475248
31307628.524752475248-321.524752475248
32754628.524752475248125.475247524752
33690628.52475247524861.4752475247524
34644628.52475247524815.4752475247524
35643628.52475247524814.4752475247524
36608628.524752475248-20.5247524752476
37651628.52475247524822.4752475247524
38691628.52475247524862.4752475247524
39627628.524752475248-1.52475247524757
40634628.5247524752485.47524752475243
41731628.524752475248102.475247524752
42475628.524752475248-153.524752475248
43337628.524752475248-291.524752475248
44803628.524752475248174.475247524752
45722628.52475247524893.4752475247524
46590628.524752475248-38.5247524752476
47724628.52475247524895.4752475247524
48627628.524752475248-1.52475247524757
49696628.52475247524867.4752475247524
50825628.524752475248196.475247524752
51677628.52475247524848.4752475247524
52656628.52475247524827.4752475247524
53785628.524752475248156.475247524752
54412628.524752475248-216.524752475248
55352628.524752475248-276.524752475248
56839628.524752475248210.475247524752
57729628.524752475248100.475247524752
58696628.52475247524867.4752475247524
59641628.52475247524812.4752475247524
60695628.52475247524866.4752475247524
61638628.5247524752489.47524752475243
62762628.524752475248133.475247524752
63635628.5247524752486.47524752475243
64721628.52475247524892.4752475247524
65854628.524752475248225.475247524752
66418628.524752475248-210.524752475248
67367628.524752475248-261.524752475248
68824628.524752475248195.475247524752
69687628.52475247524858.4752475247524
70601628.524752475248-27.5247524752476
71676628.52475247524847.4752475247524
72740628.524752475248111.475247524752
73691628.52475247524862.4752475247524
74683628.52475247524854.4752475247524
75594628.524752475248-34.5247524752476
76729628.524752475248100.475247524752
77731628.524752475248102.475247524752
78386628.524752475248-242.524752475248
79331628.524752475248-297.524752475248
80706628.52475247524877.4752475247524
81715628.52475247524886.4752475247524
82657628.52475247524828.4752475247524
83653628.52475247524824.4752475247524
84642628.52475247524813.4752475247524
85643628.52475247524814.4752475247524
86718628.52475247524889.4752475247524
87654628.52475247524825.4752475247524
88632628.5247524752483.47524752475243
89731628.524752475248102.475247524752
90392628.524752475248-236.524752475248
91344628.524752475248-284.524752475248
92792628.524752475248163.475247524752
93852628.524752475248223.475247524752
94649628.52475247524820.4752475247524
95629628.5247524752480.47524752475243
96685628.52475247524856.4752475247524
97617628.524752475248-11.5247524752476
98715628.52475247524886.4752475247524
99715628.52475247524886.4752475247524
100629628.5247524752480.47524752475243
101916628.524752475248287.475247524752
102531722.357142857143-191.357142857143
103357722.357142857143-365.357142857143
104917722.357142857143194.642857142857
105828722.357142857143105.642857142857
106708722.357142857143-14.3571428571429
107858722.357142857143135.642857142857
108775722.35714285714352.6428571428571
109785722.35714285714362.6428571428571
1101006722.357142857143283.642857142857
111789722.35714285714366.6428571428571
112734722.35714285714311.6428571428571
113906722.357142857143183.642857142857
114532722.357142857143-190.357142857143
115387722.357142857143-335.357142857143
116991821.666666666667169.333333333333
117841821.66666666666719.3333333333333
118892821.66666666666770.3333333333333
119782821.666666666667-39.6666666666667
120813821.666666666667-8.66666666666666
121793821.666666666667-28.6666666666667
122978821.666666666667156.333333333333
123775821.666666666667-46.6666666666667
124797821.666666666667-24.6666666666667
125946821.666666666667124.333333333333
126594821.666666666667-227.666666666667
127438821.666666666667-383.666666666667
1281022821.666666666667200.333333333333
129868821.66666666666746.3333333333333
130795821.666666666667-26.6666666666667


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.1284452420384490.2568904840768970.871554757961551
70.4337457388810410.8674914777620810.566254261118959
80.632604426232090.734791147535820.36739557376791
90.5335064340165850.9329871319668290.466493565983415
100.458696761979150.91739352395830.54130323802085
110.3553274190489590.7106548380979190.644672580951041
120.2808251717478140.5616503434956280.719174828252186
130.2084770130036560.4169540260073110.791522986996344
140.1622963341011930.3245926682023870.837703665898807
150.1103240644124850.2206481288249700.889675935587515
160.07484262293871980.1496852458774400.92515737706128
170.0521225655175730.1042451310351460.947877434482427
180.09578615383743020.1915723076748600.90421384616257
190.1790338382166980.3580676764333960.820966161783302
200.1455919066892220.2911838133784430.854408093310778
210.1870936614179430.3741873228358860.812906338582057
220.143737895924050.28747579184810.85626210407595
230.1128731143665060.2257462287330130.887126885633494
240.08553969932188170.1710793986437630.914460300678118
250.06116591755814320.1223318351162860.938834082441857
260.05525688365601810.1105137673120360.944743116343982
270.03999784164824040.07999568329648090.96000215835176
280.02802364523176530.05604729046353060.971976354768235
290.02312026679870720.04624053359741450.976879733201293
300.03241815598067220.06483631196134440.967581844019328
310.1090236007009240.2180472014018490.890976399299076
320.1279732077728160.2559464155456320.872026792227184
330.1145142842476230.2290285684952450.885485715752377
340.09165518943104820.1833103788620960.908344810568952
350.07222683481844310.1444536696368860.927773165181557
360.05427493009613850.1085498601922770.945725069903862
370.04215624210955610.08431248421911220.957843757890444
380.03595203857346650.0719040771469330.964047961426533
390.02631833413177390.05263666826354780.973681665868226
400.01912331554891720.03824663109783450.980876684451083
410.0188680206321790.0377360412643580.98113197936782
420.01913796888287210.03827593776574410.980862031117128
430.0526903040997980.1053806081995960.947309695900202
440.07377908316718420.1475581663343680.926220916832816
450.06884228305080.13768456610160.9311577169492
460.05322824515777110.1064564903155420.946771754842229
470.04936973155530270.09873946311060540.950630268444697
480.03740268922246440.07480537844492870.962597310777536
490.03125119190340900.06250238380681790.96874880809659
500.0471427974399410.0942855948798820.952857202560059
510.03755136982512260.07510273965024520.962448630174877
520.02863531312210080.05727062624420170.9713646868779
530.03297581056934460.06595162113868920.967024189430655
540.04845464483229740.09690928966459480.951545355167703
550.09929539352481320.1985907870496260.900704606475187
560.1363164827688680.2726329655377360.863683517231132
570.1247628842820880.2495257685641760.875237115717912
580.1064598694093710.2129197388187410.89354013059063
590.0851965359742820.1703930719485640.914803464025718
600.07120090142064150.1424018028412830.928799098579358
610.05559575046087590.1111915009217520.944404249539124
620.05464451416624370.1092890283324870.945355485833756
630.04199217191121530.08398434382243070.958007828088785
640.03597860215737720.07195720431475440.964021397842623
650.05471238979277080.1094247795855420.94528761020723
660.07478835037047040.1495767007409410.92521164962953
670.1310769915590430.2621539831180850.868923008440957
680.1544557764890550.308911552978110.845544223510945
690.1301861282719660.2603722565439330.869813871728034
700.1065782031118260.2131564062236510.893421796888174
710.08690213091099540.1738042618219910.913097869089005
720.07832803431176730.1566560686235350.921671965688233
730.0638837637328370.1277675274656740.936116236267163
740.05101568267917510.1020313653583500.948984317320825
750.03983112312213420.07966224624426850.960168876877866
760.03405775966464610.06811551932929220.965942240335354
770.02916548435264360.05833096870528710.970834515647356
780.0506534368078570.1013068736157140.949346563192143
790.1211622165483650.2423244330967290.878837783451635
800.1016721327483600.2033442654967200.89832786725164
810.08565965926701180.1713193185340240.914340340732988
820.0674684183222950.134936836644590.932531581677705
830.0523134616270830.1046269232541660.947686538372917
840.03993210106354840.07986420212709670.960067898936452
850.03002736249975960.06005472499951910.96997263750024
860.02398687813665930.04797375627331860.97601312186334
870.01753553373459340.03507106746918680.982464466265407
880.01264145642064270.02528291284128550.987358543579357
890.01006315088362360.02012630176724720.989936849116376
900.02066971637339470.04133943274678940.979330283626605
910.0674873009348880.1349746018697760.932512699065112
920.06210131644324920.1242026328864980.937898683556751
930.07182185769964320.1436437153992860.928178142300357
940.05576761653337170.1115352330667430.944232383466628
950.04385623004516850.0877124600903370.956143769954832
960.03309424054425470.06618848108850940.966905759455745
970.02698462758191140.05396925516382280.973015372418089
980.02027558682725390.04055117365450780.979724413172746
990.01514746947508620.03029493895017250.984852530524914
1000.01619227334605180.03238454669210370.983807726653948
1010.01742686687401880.03485373374803750.982573133125981
1020.01831836054835280.03663672109670570.981681639451647
1030.07217620448201180.1443524089640240.927823795517988
1040.1121566653183270.2243133306366530.887843334681673
1050.1005214874569340.2010429749138690.899478512543066
1060.07657596287118820.1531519257423760.923424037128812
1070.06985425065127630.1397085013025530.930145749348724
1080.05167860679346580.1033572135869320.948321393206534
1090.03795176033979060.07590352067958120.96204823966021
1100.09600941869933620.1920188373986720.903990581300664
1110.08462085782665440.1692417156533090.915379142173346
1120.06877851456285320.1375570291257060.931221485437147
1130.2363752101452970.4727504202905940.763624789854703
1140.2199835012007010.4399670024014030.780016498799299
1150.2010730527677310.4021461055354620.798926947232269
1160.2100158221985750.420031644397150.789984177801425
1170.1565080476670360.3130160953340710.843491952332964
1180.1198689528077050.2397379056154100.880131047192295
1190.08065472254309240.1613094450861850.919345277456908
1200.04982137216101690.09964274432203380.950178627838983
1210.0284346738283910.0568693476567820.97156532617161
1220.02948081872397540.05896163744795070.970519181276025
1230.01443240080051180.02886480160102360.985567599199488
1240.005998157604035210.01199631520807040.994001842395965


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level160.134453781512605NOK
10% type I error level440.369747899159664NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/10o2521293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/10o2521293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/1z17q1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/1z17q1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/2z17q1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/2z17q1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/3abpt1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/3abpt1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/4abpt1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/4abpt1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/5abpt1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/5abpt1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/63koe1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/63koe1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/7dt5h1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/7dt5h1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/8dt5h1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/8dt5h1293561911.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/9dt5h1293561911.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293561889c6hlvu9560z7mrr/9dt5h1293561911.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
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