Home » date » 2010 » Dec » 18 »

statistiek Multiple Regression + lineaire trend

*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: Sat, 18 Dec 2010 19:32:07 +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/18/t1292700637rbzljlk8jxl1cxx.htm/, Retrieved Sat, 18 Dec 2010 20:30:48 +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/18/t1292700637rbzljlk8jxl1cxx.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 «
6.5 8.9 -0.6 9 6.3 8.4 1.1 11 5.9 8.1 1.4 13 5.5 8.3 1.4 12 5.2 8.1 1.3 13 4.9 8 1.4 15 5.4 8.7 -0.1 13 5.8 9.2 1.8 16 5.7 9 1.5 10 5.6 8.9 1.5 14 5.5 8.5 1.4 14 5.4 8.1 1.6 15 5.4 7.5 1.6 13 5.4 7.1 1.6 8 5.5 6.9 1.4 7 5.8 7.1 1.7 3 5.7 7 1.8 3 5.4 6.7 1.9 4 5.6 7 2.2 4 5.8 7.3 2.1 0 6.2 7.7 2.4 -4 6.8 8.4 2.6 -14 6.7 8.4 2.8 -18 6.7 8.8 2.7 -8 6.4 9.1 2.6 -1 6.3 9 2.9 1 6.3 8.6 2.8 2 6.4 7.9 2.2 0 6.3 7.7 2.2 1 6 7.8 2.2 0 6.3 9.2 2 -1 6.3 9.4 2 -3 6.6 9.2 1.7 -3 7.5 8.7 1.4 -3 7.8 8.4 1.3 -4 7.9 8.6 1.4 -8 7.8 9 1.3 -9 7.6 9.1 1.3 -13 7.5 8.7 1.4 -18 7.6 8.2 2 -11 7.5 7.9 1.7 -9 7.3 7.9 1.8 -10 7.6 9.1 1.7 -13 7.5 9.4 1.6 -11 7.6 9.4 1.7 -5 7.9 9.1 1.9 -15 7.9 9 1.8 -6 8.1 9.3 1.7 -6 8.2 9.9 1.6 -3 8 9.8 1.8 -1 7.5 9.3 1.6 -3 6.8 8.3 1.5 -4 6.5 8 1.5 -6 6.6 8.5 1.3 0 7.6 10.4 1.4 -4 8 11.1 1.4 -2 8.1 10.9 1.3 -2 7.7 10 1.3 -6 7.5 9.2 1.2 -7 7.6 9.2 1.1 -6 7.8 9.5 1.4 -6 7.8 9.6 1.2 -3 7.8 9.5 1.5 -2 7.5 9.1 1.1 -5 7.5 8.9 1.3 -11 7.1 9 1.5 -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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Mannen[t] = + 3.51184532722517 + 0.424759546585032Vrouwen[t] -0.431370175281263Inflatie[t] -0.0540453662063982Consumvertr[t] + 0.00511209506842643t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.511845327225170.5467316.423400
Vrouwen0.4247595465850320.0529878.016300
Inflatie-0.4313701752812630.093452-4.61591e-055e-06
Consumvertr-0.05404536620639820.006619-8.165100
t0.005112095068426430.0016513.09590.0024650.001232


Multiple Linear Regression - Regression Statistics
Multiple R0.842249326263617
R-squared0.709383927591517
Adjusted R-squared0.699275542464266
F-TEST (value)70.1777701048472
F-TEST (DF numerator)4
F-TEST (DF denominator)115
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.473901715520587
Sum Squared Residuals25.8270261369358


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.57.06973119621155-0.569731196211554
26.36.021043487596520.278956512403478
35.95.661225933692260.238774066307739
45.55.8053353042841-0.305335304284093
55.25.71458714135724-0.514587141357239
64.95.52599553182624-0.62599553182624
75.46.58358530483888-1.18358530483888
85.85.81933774154623-0.0193377415462284
95.76.19318117712042-0.493181177120417
105.65.93963585270475-0.339635852704748
115.55.81798114666729-0.317981146667287
125.45.51287002183905-0.112870021839050
135.45.371217121369250.0287828786307469
145.45.47665222883566-0.0766522288356578
155.55.53713181584973-0.0371318158497295
165.85.713966232476380.0860337675236239
175.75.633465355358170.0665346446418273
185.45.41396720271657-0.0139672027165651
195.65.417096109176120.182903890823877
205.85.80895455057378-0.00895455057377787
216.26.070740876517430.129259123482569
226.86.82736428120311-0.0273642812031101
236.76.96238380604088-0.262383806040876
246.76.640083075207460.0599169247925401
256.46.43744248833473-0.037442488334734
266.36.162576843747480.137423156252517
276.35.986876771503620.313123228496376
286.46.061570021544080.338429978455918
296.35.92768484108910.372315158910896
3066.02931825702243-0.0293182570224317
316.36.76941311857255-0.469413118572554
326.36.96756785537078-0.667567855370784
336.67.01713909370658-0.417139093706582
347.56.939282468066870.560717531933129
357.86.914149082894310.885850917105687
367.97.177257534577210.722742465422788
377.87.449455832014180.350544167985824
387.67.7132253465667-0.113225346566699
397.57.77552343650498-0.275523436504977
407.66.931116089667340.668883910332658
417.56.830120640931840.669879359068159
427.36.846141084678540.45385891532146
437.67.566237751796330.0337622482036743
447.57.63382399595559-0.133823995955591
457.67.27152687625750.328473123742497
467.97.603390734358150.296609265641852
477.97.122755596438610.777244403561386
488.17.298432573010680.801567426989323
498.27.439401314939050.760598685060946
5087.207672687879930.792327312120072
517.57.194769777124890.305230222875112
526.86.8723047093428-0.0723047093428067
536.56.85807967284852-0.358079672848520
546.66.83757337902732-0.237573379027325
557.67.82277305990478-0.222773059904780
5688.01712610516993-0.0171261051699311
578.17.980423308449480.119576691550522
587.77.81943327641697-0.119433276416968
597.57.5819201179519-0.0819201179518932
607.67.576123864342050.0238761356579520
617.87.57925277080160.220747229198395
627.87.550978756965590.249021243034407
637.87.330158478584740.469841521415261
647.57.50005092375085-5.09237508521318e-05
657.57.65820927168441-0.158209271684409
667.17.61952328635509-0.519523286355086
677.58.26441895277955-0.764418952779553
687.58.1710265383742-0.671026538374209
697.68.39298116113785-0.792981161137851
707.77.73269129596062-0.0326912959606161
717.77.57880792107330.121192078926699
727.97.367077488446510.532922511553487
738.17.45730617851660.642693821483393
748.27.30077855215080.899221447849199
758.27.512485889105790.687514110894206
768.27.206052638538310.993947361461689
777.97.362392483547660.537607516452341
787.37.108186096262370.191813903737633
796.97.36683179354257-0.466831793542566
806.67.50003281545613-0.900032815456126
816.77.37705598367942-0.67705598367942
826.97.08301789321412-0.183017893214115
8377.05788450804156-0.0578845080415568
847.17.50626788143944-0.406267881439441
857.27.175538367721580.0244616322784173
867.17.029422712849090.070577287150913
876.97.01321448774593-0.113214487745930
8876.898666438853670.101333561146335
896.86.777011732816210.0229882671837939
906.46.71006345585477-0.310063455854767
916.76.82260522046637-0.122605220466367
926.66.71119780023756-0.111197800237556
936.46.63268011172822-0.232680111728221
946.36.53928769732288-0.239287697322878
956.26.87958033830797-0.679580338307965
966.56.58157587062492-0.0815758706249231
976.86.609165725919520.190834274080483
986.86.324713858393240.475286141606762
996.46.074309162641020.325690837358978
1006.16.34072292867204-0.240722928672038
1015.86.19708683959337-0.397086839593372
1026.16.35078243312423-0.250782433124230
1037.27.016172671165990.183827328834007
1047.37.082436789586010.217563210413987
1056.96.76641731607950.133582683920496
1066.16.99085150463698-0.890851504636977
1075.87.18256064715963-1.38256064715963
1086.27.56351073987902-1.36351073987902
1097.17.7264608648486-0.626460864848601
1107.77.86081932681674-0.160819326816744
11187.867253547624420.132746452375583
1127.87.380008129744650.419991870255351
1137.47.182491360144250.217508639855754
1147.47.304122970509910.0958770294900898
1157.77.93744922538648-0.237449225386482
1167.87.745716987192030.0542830128079709
1177.87.494651228570190.30534877142981
11887.4290250773480.570974922652003
1198.17.326707502873250.773292497126749
1208.47.815087265135810.584912734864194


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.1078794554480150.2157589108960290.892120544551985
90.06354325494298950.1270865098859790.93645674505701
100.06418805043198150.1283761008639630.935811949568018
110.1571601001980540.3143202003961080.842839899801946
120.2377194575912100.4754389151824190.76228054240879
130.2272135178969320.4544270357938640.772786482103068
140.1563823122678140.3127646245356290.843617687732186
150.1050809340410660.2101618680821330.894919065958934
160.06656908618523340.1331381723704670.933430913814767
170.04112458328807390.08224916657614790.958875416711926
180.02653284241354540.05306568482709080.973467157586455
190.01516978191574030.03033956383148060.98483021808426
200.00955624363100460.01911248726200920.990443756368995
210.005294010217303870.01058802043460770.994705989782696
220.003576079239107170.007152158478214330.996423920760893
230.003370065938636340.006740131877272680.996629934061364
240.002456766476465660.004913532952931310.997543233523534
250.00161062968780350.0032212593756070.998389370312196
260.001033018833276830.002066037666553660.998966981166723
270.000866263112842550.00173252622568510.999133736887157
280.0009235819880047880.001847163976009580.999076418011995
290.0007362595029362290.001472519005872460.999263740497064
300.0004257306640888760.0008514613281777520.999574269335911
310.0003629585279210330.0007259170558420670.999637041472079
320.0004238447313825110.0008476894627650210.999576155268618
330.0002827006235500930.0005654012471001860.99971729937645
340.004290174645510270.008580349291020540.99570982535449
350.02783375977744320.05566751955488640.972166240222557
360.04272854689216280.08545709378432560.957271453107837
370.03342674938274520.06685349876549040.966573250617255
380.02607309712947230.05214619425894450.973926902870528
390.02513900033808280.05027800067616570.974860999661917
400.02472037436114320.04944074872228630.975279625638857
410.02140053185094920.04280106370189840.97859946814905
420.01572563270349590.03145126540699180.984274367296504
430.01138964864633790.02277929729267590.988610351353662
440.008998803579628380.01799760715925680.991001196420372
450.006406876334357540.01281375266871510.993593123665642
460.004826906746042720.009653813492085440.995173093253957
470.006588026235789870.01317605247157970.99341197376421
480.01021923762917130.02043847525834260.989780762370829
490.01430755006544080.02861510013088160.98569244993456
500.02082686895223370.04165373790446750.979173131047766
510.02094450549159730.04188901098319470.979055494508403
520.03756637969746610.07513275939493210.962433620302534
530.08402105592198640.1680421118439730.915978944078014
540.1074218083672560.2148436167345120.892578191632744
550.1016011944529580.2032023889059160.898398805547042
560.08241650607631410.1648330121526280.917583493923686
570.06642391574296010.1328478314859200.93357608425704
580.05679829690243780.1135965938048760.943201703097562
590.04857611218120840.09715222436241690.951423887818792
600.0381233318181630.0762466636363260.961876668181837
610.03100672915787980.06201345831575950.96899327084212
620.02392524566123780.04785049132247560.976074754338762
630.02326740642963050.0465348128592610.97673259357037
640.01839112550845450.0367822510169090.981608874491545
650.01705527059128580.03411054118257160.982944729408714
660.02615199286722720.05230398573445450.973848007132773
670.04846606422002610.09693212844005220.951533935779974
680.06689512660393520.1337902532078700.933104873396065
690.1110631811702640.2221263623405270.888936818829736
700.08882132143505190.1776426428701040.911178678564948
710.06954129175336780.1390825835067360.930458708246632
720.07141986687647130.1428397337529430.928580133123529
730.07333846092268630.1466769218453730.926661539077314
740.1329942318854580.2659884637709170.867005768114542
750.1772213934627850.3544427869255690.822778606537215
760.4686567157252880.9373134314505760.531343284274712
770.7239259896349340.5521480207301330.276074010365066
780.8177169841294120.3645660317411750.182283015870588
790.837863648711540.3242727025769210.162136351288460
800.9031826518010790.1936346963978430.0968173481989214
810.91807390213010.1638521957398000.0819260978698998
820.8986477823858620.2027044352282760.101352217614138
830.8748370270781930.2503259458436150.125162972921807
840.8735290394701950.252941921059610.126470960529805
850.8601228809783520.2797542380432950.139877119021648
860.837787029007010.3244259419859810.162212970992990
870.8097771729176620.3804456541646760.190222827082338
880.7739727590049770.4520544819900460.226027240995023
890.7293741969344830.5412516061310340.270625803065517
900.6959555913166220.6080888173667560.304044408683378
910.6439576778015420.7120846443969150.356042322198458
920.5915635729710270.8168728540579470.408436427028973
930.5360548933244440.9278902133511110.463945106675556
940.4896824974510890.9793649949021780.510317502548911
950.509526628342960.980946743314080.49047337165704
960.4481024307531730.8962048615063460.551897569246827
970.3914424673195640.7828849346391270.608557532680436
980.3728944044722330.7457888089444660.627105595527767
990.3315363628120710.6630727256241420.668463637187929
1000.273857468937320.547714937874640.72614253106268
1010.2420690262134120.4841380524268240.757930973786588
1020.1987639268492580.3975278536985170.801236073150742
1030.1953564755488090.3907129510976170.804643524451191
1040.2598395796753180.5196791593506360.740160420324682
1050.5917301265966580.8165397468066840.408269873403342
1060.5983044488729590.8033911022540830.401695551127041
1070.7085824171401410.5828351657197170.291417582859859
1080.9882408536759280.02351829264814410.0117591463240720
1090.9733319146390.05333617072199930.0266680853609996
1100.937954380539740.1240912389205220.0620456194602608
1110.9555299671504770.08894006569904630.0444700328495232
1120.995841407676310.008317184647382660.00415859232369133


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level150.142857142857143NOK
5% type I error level340.323809523809524NOK
10% type I error level490.466666666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/10qgk51292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/10qgk51292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/1jw4t1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/1jw4t1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/2jw4t1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/2jw4t1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/3c64x1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/3c64x1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/4c64x1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/4c64x1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/5c64x1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/5c64x1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/6mf3z1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/6mf3z1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/7mf3z1292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/7mf3z1292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/8x6221292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/8x6221292700717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/9x6221292700717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292700637rbzljlk8jxl1cxx/9x6221292700717.ps (open in new window)


 
Parameters (Session):
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal 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