Home » date » 2010 » Dec » 14 »

apple Inc - Multiple regression model 5

*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, 14 Dec 2010 11:13:03 +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/14/t12923252144c81ietw6n88imv.htm/, Retrieved Tue, 14 Dec 2010 12:13:34 +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/14/t12923252144c81ietw6n88imv.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 «
10.81 24563400 -0.2643 24.45 115.7 9.12 14163200 -0.2643 23.62 109.2 11.03 18184800 -0.2643 21.90 116.9 12.74 20810300 -0.1918 27.12 109.9 9.98 12843000 -0.1918 27.70 116.1 11.62 13866700 -0.1918 29.23 118.9 9.40 15119200 -0.2246 26.50 116.3 9.27 8301600 -0.2246 22.84 114.0 7.76 14039600 -0.2246 20.49 97.0 8.78 12139700 0.3654 23.28 85.3 10.65 9649000 0.3654 25.71 84.9 10.95 8513600 0.3654 26.52 94.6 12.36 15278600 0.0447 25.51 97.8 10.85 15590900 0.0447 23.36 95.0 11.84 9691100 0.0447 24.15 110.7 12.14 10882700 -0.0312 20.92 108.5 11.65 10294800 -0.0312 20.38 110.3 8.86 16031900 -0.0312 21.90 106.3 7.63 13683600 -0.0048 19.21 97.4 7.38 8677200 -0.0048 19.65 94.5 7.25 9874100 -0.0048 17.51 93.7 8.03 10725500 0.0705 21.41 79.6 7.75 8348400 0.0705 23.09 84.9 7.16 8046200 0.0705 20.70 80.7 7.18 10862300 -0.0134 19.00 78.8 7.51 8100300 -0.0134 19.04 64.8 7.07 7287500 -0.0134 19.45 61.4 7.11 14002500 0.0812 20.54 81.0 8.98 19037900 0.0812 19.77 83.6 9.53 10 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
APPLE[t] = -167.424814295902 -4.30135459798218e-07VOLUME[t] -8.7281919063852REV.GROWTH[t] + 8.83841129074743MICROSOFT[t] -0.668738093829939CONS.CONF[t] + 6.27872053212584M1[t] + 10.5105860530226M2[t] + 15.0431505457878M3[t] + 18.1188764739719M4[t] + 24.7843160355318M5[t] + 17.5713482106206M6[t] + 22.3168235770649M7[t] + 19.8568271551398M8[t] + 21.4874096649532M9[t] + 3.79266552398289M10[t] + 0.0655665756245166M11[t] + 1.54972876039673t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-167.42481429590219.521004-8.576600
VOLUME-4.30135459798218e-070-1.67450.097150.048575
REV.GROWTH-8.728191906385210.288069-0.84840.3982530.199126
MICROSOFT8.838411290747430.83274810.613500
CONS.CONF-0.6687380938299390.160171-4.17516.4e-053.2e-05
M16.2787205321258411.4153910.550.583530.291765
M210.510586053022611.0635740.950.3443940.172197
M315.043150545787811.0091871.36640.1748720.087436
M418.118876473971910.9571641.65360.1013430.050671
M524.784316035531811.0407272.24480.0269830.013492
M617.571348210620610.9927911.59840.11310.05655
M722.316823577064910.9839272.03180.0448290.022415
M819.856827155139811.0666571.79430.0757880.037894
M921.487409664953210.9574831.9610.0526630.026331
M103.7926655239828911.3293860.33480.7385050.369252
M110.065566575624516611.1459670.00590.9953180.497659
t1.549728760396730.14758410.500700


Multiple Linear Regression - Regression Statistics
Multiple R0.957710226610275
R-squared0.917208878153904
Adjusted R-squared0.903962298658528
F-TEST (value)69.241186260507
F-TEST (DF numerator)16
F-TEST (DF denominator)100
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation23.5449579349573
Sum Squared Residuals55436.5044158911


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110.81-29.128934633078839.9389346330788
29.12-21.862929304217530.9829293042175
311.03-37.861819558756348.8918195587563
412.7415.8191941614227-3.07919416142274
59.9828.4414830991174-18.4614830991174
611.6233.9882169765273-22.3682169765273
79.417.6408173547178-8.24081735471784
89.27-11.147446504416920.4174465044169
97.76-19.836971440676527.5969714406765
108.78-7.8310024869510416.6110024869510
1110.6512.807800388855-2.15780038885499
1210.9515.4526920100371-4.50269201003714
1312.3612.10364875749180.256351242508247
1410.850.62079412230711210.2292058776929
1511.845.723957407746986.11604259225302
1612.14-16.577512214561428.7175122145614
1711.65-14.08593792168725.735937921687
188.86-6.1075695953539114.9675695953539
197.63-16.856259971621524.4862599716215
207.38-9.7848560271802817.1648560271803
217.25-25.498583575938232.7485835759382
228.031.231962019382346.79803798061766
237.7511.3812859040640-3.63128590406404
247.16-5.3196679660133512.4796679660134
257.18-11.724924656876618.9049246568766
267.514.960573529628642.54942647037136
277.0717.2899390327428-10.2199390327428
287.1114.7279488222825-7.61794882228247
298.9812.2329173121377-3.25291731213772
309.5317.5267717732773-7.99677177327729
3110.5433.4039351298877-22.8639351298877
3211.3130.6567552749443-19.3467552749443
3310.3645.3067025210455-34.9467025210455
3411.4413.0754575258651-1.63545752586509
3510.451.347009806753759.10299019324625
3610.6915.3627618198796-4.67276181987964
3711.2820.3781618147631-9.09816181476312
3811.9625.2728146088783-13.3128146088783
3913.5216.2860072990066-2.76600729900657
4012.8927.5456874102571-14.6556874102571
4114.0339.0887992601857-25.0587992601857
4216.2741.4498449447815-25.1798449447815
4316.1743.7135139851325-27.5435139851325
4417.2541.0322112286433-23.7822112286433
4519.3847.9575666891021-28.5775666891021
4626.226.9848384046912-0.784838404691183
4733.5337.5638539443876-4.03385394438765
4832.233.7655396498255-1.56553964982551
4938.4527.104770988390611.3452290116094
5044.8628.215226267941916.6447737320581
5141.6734.45607886461837.2139211353817
5236.0647.4625291208946-11.4025291208946
5339.7661.4918559914739-21.7318559914739
5436.8147.5662944562746-10.7562944562746
5542.6563.3982633935495-20.7482633935495
5646.8977.702976868646-30.812976868646
5753.6176.7894369524919-23.1794369524919
5857.5956.29511783976681.29488216023321
5967.8266.02042132274971.79957867725034
6071.8951.71878696629620.1712130337040
6175.5168.86865668863566.64134331136439
6268.4969.071756514849-0.581756514848956
6362.7274.8427344024244-12.1227344024244
6470.3953.230771521988217.1592284780118
6559.7758.4543837171831.31561628281696
6657.2756.17793145923431.09206854076566
6767.9666.0774898296881.88251017031203
6867.8585.6368170614178-17.7868170614178
6976.9896.8473018730144-19.8673018730144
7081.0896.5646572599-15.4846572599
7191.6699.9915897284772-8.33158972847717
7284.8499.4434417737356-14.6034417737356
7385.73107.742314508485-22.0123145084845
7484.61101.362023352933-16.7520233529330
7592.91107.279193279517-14.3691932795170
7699.8130.430002832845-30.6300028328452
77121.19141.937008363237-20.7470083632374
78122.04123.507306046263-1.46730604626286
79131.76119.60496615199612.1550338480041
80138.48123.58478351589714.8952164841034
81153.47136.38049883539917.0895011646011
82189.95184.3740814527305.57591854727027
83182.22157.59316665924324.6268333407566
84198.08180.17946681527217.9005331847278
85135.36151.444911624608-16.0849116246079
86125.02127.552761331245-2.53276133124544
87143.5152.419301067743-8.91930106774267
88173.95163.40709865977210.5429013402276
89188.75176.90051492988911.8494850701110
90167.44168.277653301704-0.837653301703739
91158.95155.7847672863653.16523271363483
92169.53168.6504805852620.879519414737732
93113.66156.068556343813-42.4085563438126
94107.59113.744518120294-6.15451812029398
9592.67100.310998012182-7.64099801218243
9685.35104.266506063077-18.9165060630770
9790.13115.575994244093-25.4459942440925
9889.31102.575169337853-13.2651693378535
99105.12127.117420713788-21.9974207137881
100125.83139.387273796008-13.5572737960081
101135.81146.178344363205-10.3683443632049
102142.43167.312791478231-24.8827914782306
103163.39175.964235147452-12.5742351474520
104168.21182.912081270901-14.7020812709006
105185.35194.518521350729-9.16852135072932
106188.5194.720369864322-6.22036986432195
107199.91209.643874233287-9.73387423328692
108210.73217.020472867890-6.29047286789028
109192.06196.505400663489-4.44540066348926
110204.62218.581810238581-13.9618102385807
111235226.8271874911698.17281250883057
112261.09236.56700588909124.5229941109093
113256.88196.16063088525860.7193691147421
114251.53174.10075915906277.4292408409384
115257.25206.96827169283350.2817283071672
116243.1190.02619672588653.0738032741138
117283.75203.0369704510280.71302954898


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.0002980623412145840.0005961246824291680.999701937658785
212.10230122855614e-054.20460245711228e-050.999978976987714
221.64092555787285e-063.2818511157457e-060.999998359074442
231.3134321322866e-072.6268642645732e-070.999999868656787
247.44455761869434e-091.48891152373887e-080.999999992555442
257.72586811908547e-101.54517362381709e-090.999999999227413
267.01162955072654e-111.40232591014531e-100.999999999929884
273.94236890332904e-127.88473780665807e-120.999999999996058
283.23935930685226e-126.47871861370452e-120.99999999999676
292.92733709203219e-135.85467418406437e-130.999999999999707
304.10100907222039e-148.20201814444079e-140.99999999999996
311.62761385744920e-143.25522771489839e-140.999999999999984
323.16374958345142e-156.32749916690283e-150.999999999999997
332.28967388533605e-164.57934777067209e-161
342.34307109995582e-174.68614219991165e-171
352.35543625184074e-184.71087250368148e-181
362.01910832410829e-194.03821664821657e-191
375.47175796241618e-201.09435159248324e-191
385.57354219456846e-211.11470843891369e-201
391.01640108419724e-212.03280216839449e-211
409.93576426012005e-231.98715285202401e-221
411.82343342329803e-233.64686684659607e-231
427.36302382080744e-241.47260476416149e-231
438.04296570733289e-251.60859314146658e-241
442.52162742389229e-255.04325484778459e-251
454.81289543358371e-259.62579086716742e-251
468.94377176984187e-241.78875435396837e-231
479.2873509559074e-221.85747019118148e-211
481.32624221022531e-212.65248442045062e-211
492.25831446702500e-224.51662893405001e-221
501.86554228222619e-213.73108456445239e-211
516.44577065763044e-191.28915413152609e-181
521.27760077447776e-192.55520154895553e-191
537.99468666600866e-191.59893733320173e-181
541.39816679161453e-182.79633358322907e-181
552.90173885318732e-165.80347770637465e-161
561.04121122947437e-142.08242245894873e-140.99999999999999
579.4640665569416e-131.89281331138832e-120.999999999999054
581.09682883884725e-112.19365767769449e-110.999999999989032
594.69579445067328e-109.39158890134655e-100.99999999953042
601.13161093849961e-082.26322187699922e-080.99999998868389
612.77285856367914e-085.54571712735827e-080.999999972271414
622.26406705423354e-084.52813410846707e-080.99999997735933
631.21880737176311e-082.43761474352623e-080.999999987811926
641.37858336903612e-082.75716673807225e-080.999999986214166
657.21431811323126e-091.44286362264625e-080.999999992785682
663.17745026574134e-096.35490053148268e-090.99999999682255
671.68933674434146e-093.37867348868292e-090.999999998310663
686.37325753804294e-101.27465150760859e-090.999999999362674
692.32560519979753e-104.65121039959507e-100.99999999976744
708.95938626215323e-111.79187725243065e-100.999999999910406
715.0587852257088e-111.01175704514176e-100.999999999949412
722.21416893512473e-114.42833787024946e-110.999999999977858
731.21613418981504e-112.43226837963008e-110.999999999987839
744.66958290754625e-129.33916581509249e-120.99999999999533
753.4537656171977e-126.9075312343954e-120.999999999996546
766.83441154359367e-121.36688230871873e-110.999999999993166
771.82677310352169e-103.65354620704339e-100.999999999817323
781.46059632304135e-092.92119264608271e-090.999999998539404
791.29112628497995e-082.5822525699599e-080.999999987088737
801.06272791761511e-072.12545583523021e-070.999999893727208
811.72609360441871e-063.45218720883741e-060.999998273906396
822.42790336043982e-054.85580672087964e-050.999975720966396
830.0001106524641527830.0002213049283055660.999889347535847
840.002487142693682140.004974285387364280.997512857306318
850.001699650196427610.003399300392855220.998300349803572
860.001715192023096800.003430384046193600.998284807976903
870.001732552739991310.003465105479982630.998267447260009
880.01449759115136710.02899518230273420.985502408848633
890.05249456858552420.1049891371710480.947505431414476
900.1129096353902780.2258192707805570.887090364609722
910.1574510854876780.3149021709753570.842548914512322
920.9628714274580670.07425714508386650.0371285725419332
930.9848906662479230.03021866750415350.0151093337520767
940.9742042282461630.05159154350767310.0257957717538365
950.9538482279839570.09230354403208640.0461517720160432
960.9206668982989930.1586662034020140.079333101701007
970.824171674672080.351656650655840.17582832532792


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level680.871794871794872NOK
5% type I error level700.897435897435897NOK
10% type I error level730.935897435897436NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/10vdmq1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/10vdmq1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/16uqf1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/16uqf1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/26uqf1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/26uqf1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/3hlpz1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/3hlpz1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/4hlpz1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/4hlpz1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/5hlpz1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/5hlpz1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/69cok1292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/69cok1292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/72ln51292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/72ln51292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/82ln51292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/82ln51292325173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/92ln51292325173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923252144c81ietw6n88imv/92ln51292325173.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by