Home » date » 2009 » Nov » 20 »

Workshop 7

*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: Fri, 20 Nov 2009 08:54:20 -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/20/t12587326867upo1di34d03l93.htm/, Retrieved Fri, 20 Nov 2009 16:58:18 +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/20/t12587326867upo1di34d03l93.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 «
33 62 39 64 45 62 46 64 45 64 45 69 49 69 50 65 54 56 59 58 58 53 56 62 48 55 50 60 52 59 53 58 55 53 43 57 42 57 38 53 41 54 41 53 39 57 34 57 27 55 15 49 14 50 31 49 41 54 43 58 46 58 42 52 45 56 45 52 40 59 35 53 36 52 38 53 39 51 32 50 24 56 21 52 12 46 29 48 36 46 31 48 28 48 30 49 38 53 27 48 40 51 40 48 44 50 47 55 45 52 42 53 38 52 46 55 37 53 41 53 40 56 33 54 34 52 36 55 36 54 38 59 42 56 35 56 25 51 24 53 22 52 27 51 17 46 30 49 30 46 34 55 37 57 36 53 33 52 33 53 33 50 37 54 40 53 35 50 37 51 43 52 42 47 33 51 39 49 40 53 37 52 44 45 42 53 43 51 40 48 30 48 30 48 31 48 18 40 24 43 22 40 26 39 28 39 23 36 17 41 12 39 9 40 19 39 21 46 18 40 18 37 15 37 24 44 18 41 19 40 30 36 33 38 35 43 36 42 47 45 46 46
 
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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Spaar[t] = + 50.6298826025243 + 0.224827909425653Alg_E[t] + 0.85574414100791M1[t] + 0.479212425823561M2[t] -1.78112277147162M3[t] -0.431389132537066M4[t] + 0.271033806029273M5[t] + 2.11538884570027M6[t] + 0.824847139715868M7[t] -1.74790201229214M8[t] -1.58340930016167M9[t] -0.766227288399419M10[t] -0.207113175532512M11[t] -0.11952713024534t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)50.62988260252432.22846422.719600
Alg_E0.2248279094256530.038415.853400
M10.855744141007911.6480740.51920.6046660.302333
M20.4792124258235611.6958350.28260.7780430.389022
M3-1.781122771471621.691833-1.05280.2948150.147407
M4-0.4313891325370661.687817-0.25560.7987580.399379
M50.2710338060292731.6851060.16080.8725220.436261
M62.115388845700271.6849151.25550.2120370.106018
M70.8248471397158681.6847640.48960.6254250.312712
M8-1.747902012292141.684281-1.03780.3017150.150858
M9-1.583409300161671.684061-0.94020.3492160.174608
M10-0.7662272883994191.684891-0.45480.6502010.3251
M11-0.2071131755325121.683906-0.1230.9023410.451171
t-0.119527130245340.011623-10.284100


Multiple Linear Regression - Regression Statistics
Multiple R0.857292104916475
R-squared0.73494975315212
Adjusted R-squared0.702747386712659
F-TEST (value)22.8228492006564
F-TEST (DF numerator)13
F-TEST (DF denominator)107
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.76483670875441
Sum Squared Residuals1516.61751246357


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16258.78542062433343.21457937566656
26459.63832923545774.36167076454234
36258.6074343644713.39256563552894
46460.0624687825863.93753121741406
56460.42053668148133.57946331851871
66962.1453645909076.85463540909306
76961.63460739237987.36539260762019
86559.16715901955215.83284098044788
95660.1114362391399-4.11143623913986
105861.933230667785-3.93323066778503
115362.1479897409809-9.14798974098094
126261.78591996741680.214080032583189
135560.7235137027742-5.72351370277416
146060.6771106761958-0.677110676195773
155958.74690416750660.253095832493444
165860.2019385856214-2.20193858562142
175361.2344902127937-8.23449021279373
185760.2613832091115-3.26138320911155
195758.6264864634562-1.62648646345616
205355.0348985435002-2.0348985435002
215455.7543478536623-1.75434785366229
225356.4520027351792-3.4520027351792
235756.44193389894950.55806610105054
245755.40538039710841.59461960289163
255554.56780204189140.43219795810863
264951.3738082833538-2.37380828335385
275048.76911804638771.23088195361233
284953.821399015313-4.82139901531298
295456.6525739178905-2.65257391789051
305858.8270576461675-0.827057646167467
315858.0914725382147-0.0914725382146861
325254.4998846182587-2.49988461825873
335655.21933392842080.780666071579181
345255.9169888099377-3.91698880993773
355955.2324362454313.76756375456897
365354.19588274359-1.19588274358994
375255.1569276637782-3.15692766377816
385355.1105246371998-2.11052463719978
395152.9554902190849-1.95549021908491
405052.6119013617946-2.61190136179455
415651.39617389471034.60382610528967
425252.446518075859-0.446518075859024
434649.0129980547984-3.01299805479841
444850.1427962327812-2.14279623278116
454651.7615571806459-5.76155718064586
464851.3350725150345-3.33507251503451
474851.1001757693791-3.10017576937912
484951.6374176335176-2.63741763351759
495354.1722579196854-1.17225791968539
504851.2030920705735-3.20309207057352
515151.7459925655665-0.74599256556648
524852.9761990742557-4.9761990742557
535054.4584065202793-4.45840652027931
545556.8577181579819-1.85771815798191
555254.9979935029009-2.99799350290087
565351.63123349237061.36876650762943
575250.77688743655311.22311256344691
585553.27316559347521.72683440652478
595351.68930139126591.31069860873409
605352.67619907425570.323800925744307
615653.18758817559262.81241182440739
625451.11773396418342.88226603581665
635248.96269954606853.03730045393152
645550.6425618736094.357438126391
655451.225457681932.77454231807000
665953.3999414102075.60005858979304
675652.88918421167983.11081578832017
685648.62311256344697.37688743655308
695146.41979905107554.58020094892448
705346.89262602316686.10737397683322
715246.8825571869375.11744281306296
725148.09428277935252.90571722064753
734646.5822206958585-0.582220695858516
744949.0089246729623-0.00892467296231159
754646.6290623454218-0.62906234542179
765548.75858049181366.24141950818638
775750.01596002841166.98403997158843
785351.51596002841161.48403997158843
795249.43140746390492.56859253609512
805346.73913118165156.26086881834847
815046.78409676353673.21590323646334
825448.38106328275625.61893671724382
835349.49513399365473.50486600634529
845048.45858049181361.54141950818638
855149.64445332142751.35554667857251
865250.49736193255171.50263806744828
874747.8926716955855-0.892671695585544
885147.09942701944393.90057298055612
894949.0312902843188-0.0312902843187983
905350.98094610317012.01905389682990
915248.89639353866343.10360646133659
924547.7779126223896-2.77791262238963
935347.37322238542355.62677761457654
945148.2957051763662.70429482363398
954848.0608084307106-0.0608084307106281
964845.90011538174132.09988461825873
974846.63633239250381.36366760749616
984846.36510145649981.63489854350020
994041.0624763064258-1.06247630642579
1004343.6416502716689-0.641650271668926
1014043.7748902611386-3.77489026113862
1023946.3990298082669-7.39902980826689
1033945.4386167908885-6.43861679088845
1043641.6222009615068-5.62220096150684
1054140.31819908683810.681800913161947
1063939.8917144212267-0.8917144212267
1074039.65681767557130.343182324428691
1083941.992682815115-2.99268281511501
1094643.17855564472892.82144435527112
1104042.0080130710222-2.00801307102224
1113739.6281507434817-2.62815074348171
1123740.1838735238940-3.18387352389397
1134442.79022051704581.20977948295416
1144143.1660809699176-2.16608096991758
1154041.9808400431135-1.98084004311349
1163641.7616707645423-5.76167076454233
1173842.4811200747044-4.48112007470442
1184343.6284307750726-0.628430775072634
1194244.2928456671198-2.29284566711985
1204546.8535387160892-1.85353871608921
1214647.3649278174261-1.36492781742612


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.3252348810478650.6504697620957290.674765118952135
180.3225219208337650.6450438416675310.677478079166235
190.1956578950246130.3913157900492250.804342104975387
200.1137101679673670.2274203359347340.886289832032633
210.3977901523412360.7955803046824710.602209847658764
220.3584686911358620.7169373822717250.641531308864138
230.6528763026910130.6942473946179730.347123697308987
240.5621589989722550.875682002055490.437841001027745
250.5555034862123170.8889930275753650.444496513787683
260.6127901802234780.7744196395530440.387209819776522
270.5518923492509340.8962153014981310.448107650749066
280.5166778236216950.966644352756610.483322176378305
290.535800385509080.928399228981840.46419961449092
300.5075708575145450.984858284970910.492429142485455
310.4650793883106120.9301587766212240.534920611689388
320.3999654044301360.7999308088602720.600034595569864
330.5531318114613840.8937363770772320.446868188538616
340.559930391398970.8801392172020610.440069608601031
350.7692043572226670.4615912855546650.230795642777333
360.7155477883046590.5689044233906830.284452211695341
370.6883071917746710.6233856164506570.311692808225329
380.6500712061873090.6998575876253820.349928793812691
390.595394311969730.809211376060540.40460568803027
400.55476414289170.89047171421660.4452358571083
410.642581473897410.714837052205180.35741852610259
420.585655127028010.828689745943980.41434487297199
430.6125359142738950.774928171452210.387464085726105
440.5615706234837430.8768587530325130.438429376516257
450.6104866802493020.7790266395013960.389513319750698
460.6324772763978160.7350454472043680.367522723602184
470.6307209034878610.7385581930242770.369279096512139
480.6134977051519230.7730045896961530.386502294848077
490.6461262208664460.7077475582671080.353873779133554
500.6553517570965990.6892964858068020.344648242903401
510.6291246215099070.7417507569801850.370875378490093
520.747156985334340.5056860293313180.252843014665659
530.8398243788260560.3203512423478890.160175621173944
540.8541381104914530.2917237790170940.145861889508547
550.8928285002527390.2143429994945220.107171499747261
560.9017794832470960.1964410335058080.0982205167529041
570.9396674828873940.1206650342252130.0603325171126064
580.9762785557272440.0474428885455130.0237214442727565
590.9841834434203480.03163311315930490.0158165565796525
600.9883471825235730.02330563495285340.0116528174764267
610.991683951198630.01663209760274190.00831604880137097
620.9915464868599490.01690702628010240.0084535131400512
630.9892131556454870.02157368870902640.0107868443545132
640.9917470846856360.01650583062872830.00825291531436416
650.992040807330850.0159183853383010.0079591926691505
660.9924703324043720.01505933519125650.00752966759562824
670.990107535552390.01978492889522010.00989246444761007
680.9950295954523340.009940809095331780.00497040454766589
690.9943690165354920.01126196692901580.00563098346450792
700.9946975278853140.01060494422937260.00530247211468631
710.9934870505775880.01302589884482370.00651294942241186
720.9902758460725760.01944830785484740.0097241539274237
730.9931480736621420.01370385267571630.00685192633785813
740.99353678119990.01292643760019950.00646321880009973
750.9929418088857150.01411638222856940.00705819111428468
760.99238592556120.01522814887760150.00761407443880074
770.9938893160451190.01222136790976280.00611068395488138
780.9903342727445250.01933145451094980.0096657272554749
790.9850207049961840.02995859000763220.0149792950038161
800.9960043131617330.007991373676534520.00399568683826726
810.993691725009060.01261654998187870.00630827499093935
820.9920400936888910.01591981262221740.00795990631110871
830.9876071773411220.0247856453177560.012392822658878
840.9807217623490270.03855647530194670.0192782376509734
850.9774091624453730.04518167510925440.0225908375546272
860.9669676721911840.06606465561763170.0330323278088158
870.9595791533930470.08084169321390680.0404208466069534
880.9489690455700970.1020619088598070.0510309544299035
890.932709138224120.1345817235517610.0672908617758806
900.9262140528278280.1475718943443430.0737859471721716
910.9366939852540290.1266120294919430.0633060147459715
920.9176621788590190.1646756422819630.0823378211409813
930.9557980753040360.08840384939192760.0442019246959638
940.9470025607627150.1059948784745700.0529974392372848
950.9190311877953380.1619376244093250.0809688122046623
960.9236113573316910.1527772853366180.0763886426683088
970.8801416384599260.2397167230801490.119858361540074
980.9095210902872380.1809578194255240.090478909712762
990.884406539455860.2311869210882790.115593460544140
1000.94642419098920.1071516180216000.0535758090108002
1010.930956339874710.1380873202505790.0690436601252893
1020.9013474316485540.1973051367028930.0986525683514464
1030.8869216108369340.2261567783261310.113078389163066
1040.8875897963205150.2248204073589700.112410203679485


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level20.0227272727272727NOK
5% type I error level280.318181818181818NOK
10% type I error level310.352272727272727NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/10euu91258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/10euu91258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/1fqiz1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/1fqiz1258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/2itah1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/2itah1258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/30g871258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/30g871258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/44bbq1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/44bbq1258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/50asu1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/50asu1258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/6qpcj1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/6qpcj1258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/79vqa1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/79vqa1258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/8kyw51258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/8kyw51258732455.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/94v5n1258732455.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587326867upo1di34d03l93/94v5n1258732455.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 2 ; 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