Home » date » 2010 » Nov » 19 »

Paper Multiple Linear Regression - interactie

*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, 19 Nov 2010 13:18:31 +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/Nov/19/t1290173213l4djsnx1wp8stf2.htm/, Retrieved Fri, 19 Nov 2010 14:27:05 +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/Nov/19/t1290173213l4djsnx1wp8stf2.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 «
13 13 0 14 0 13 0 3 0 0 12 12 12 8 8 13 13 5 5 1 10 10 0 10 0 11 0 5 0 0 15 13 13 16 16 18 18 8 8 1 9 12 12 11 11 11 11 4 4 1 12 12 12 14 14 14 14 4 4 1 11 5 0 16 0 14 0 6 0 0 11 12 12 11 11 12 12 6 6 1 15 11 11 16 16 11 11 5 5 1 7 14 0 12 0 12 0 4 0 0 11 14 0 7 0 13 0 6 0 0 11 12 12 13 13 11 11 4 4 1 10 12 12 11 11 12 12 6 6 1 14 11 0 15 0 16 0 6 0 0 10 11 11 7 7 9 9 4 4 1 6 7 0 9 0 11 0 4 0 0 11 9 9 7 7 13 13 2 2 1 15 11 0 14 0 15 0 7 0 0 11 11 11 15 15 10 10 5 5 1 12 12 0 7 0 11 0 4 0 0 14 12 12 15 15 13 13 6 6 1 15 11 0 17 0 16 0 6 0 0 9 11 0 15 0 15 0 7 0 0 13 8 8 14 14 14 14 5 5 1 13 9 0 14 0 14 0 6 0 0 13 10 10 8 8 8 8 4 4 1 12 10 0 14 0 13 0 7 0 0 14 12 12 14 14 15 15 7 7 1 11 8 0 8 0 13 0 4 0 0 9 12 12 11 11 11 11 4 4 1 16 11 0 16 0 15 0 6 0 0 13 11 11 14 14 13 13 6 6 1 16 11 11 16 16 16 16 7 7 1 15 9 9 5 5 11 11 3 3 1 5 15 15 8 8 12 12 3 3 1 11 11 11 8 8 12 12 6 6 1 16 11 0 13 0 14 0 7 0 0 17 11 11 15 15 14 14 5 5 1 9 15 0 6 0 8 0 4 0 0 9 11 11 12 12 13 13 5 5 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 time8 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
populair[t] = -1.89771513378114 + 0.259413164999801vrienden[t] -0.299812901556042vrienden_G[t] + 0.280958680758531kennen[t] + 0.0293102671918129kennen_G[t] + 0.309425519926918geliefd[t] -0.0744689878374152geliefd_G[t] + 0.600578736213396celebrity[t] -0.0325734070475991celebrity_G[t] + 4.98632723777635`geslacht(dummy)`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.897715133781142.809863-0.67540.500980.25049
vrienden0.2594131649998010.1674581.54910.124480.06224
vrienden_G-0.2998129015560420.241835-1.23970.2179430.108972
kennen0.2809586807585310.1447331.94120.0550180.027509
kennen_G0.02931026719181290.1764410.16610.8683950.434197
geliefd0.3094255199269180.1816171.70370.0915070.045753
geliefd_G-0.07446898783741520.250898-0.29680.7672210.38361
celebrity0.6005787362133960.3515031.70860.0905960.045298
celebrity_G-0.03257340704759910.437678-0.07440.9408210.47041
`geslacht(dummy)`4.986327237776353.8546191.29360.1987550.099377


Multiple Linear Regression - Regression Statistics
Multiple R0.702750472577834
R-squared0.493858226708369
Adjusted R-squared0.448756484533867
F-TEST (value)10.9498702909878
F-TEST (DF numerator)9
F-TEST (DF denominator)101
p-value9.68036761861413e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.24839448407162
Sum Squared Residuals510.58305335637


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.23234550952571.76765449047427
21210.98042841191561.01957158808442
3109.912577724065250.0874222759347496
41516.300978906907-1.30097890690700
5910.8733168624218-1.87331686242182
61212.5089933025414-0.50899330254136
71111.8301192796116-0.830119279611582
81112.2442840528429-1.24428405284292
91513.03306666789561.96693333210443
10711.2209945292950-4.22099452929504
111111.3267841178561-0.326784117856096
121111.4938547583225-0.493854758322506
131012.2442840528429-2.24428405284292
141413.72449062870570.275509371294307
15109.202727742997680.797272257002321
1668.25280081209392-2.25280081209392
17119.087342686136581.91265731386342
181513.73468516423361.26531483576636
191112.4878411878557-1.48784118785573
20128.987949275575863.01205072442413
211413.72031637673380.279683623266207
221514.28640799022280.713592009777246
23914.0156438449922-5.01564384499217
241313.2385975779321-0.238597577932119
251312.30585457809370.694145421906276
26139.318439895414763.68156010458524
271212.85642095938-0.856420959380003
281414.4479658221283-0.447965822128252
29118.850106336189032.14989366381097
30910.8733168624218-1.87331686242182
311613.69602378953732.30397621046269
321313.4504471653397-0.450447165339691
331615.34385998667470.656140013325316
34158.564897055222686.43510294477732
3559.48826201182577-4.48826201182577
361111.3538769455481-0.353876945548125
371613.14430096354822.85569903645181
381713.42766731621373.57233268378626
3998.556953530035980.443046469964017
40912.2619039402732-3.26190394027321
411314.7354549209526-1.73545492095265
42611.6585366990715-5.6585366990715
431211.92159797536270.0784020246373308
4489.88775899618823-1.88775899618823
451412.15254430119411.84745569880592
461212.8824418361739-0.882441836173893
471614.85665413062141.14334586937863
4889.60795676013254-1.60795676013254
491515.3666398358006-0.366639835800635
5078.97775474004792-1.97775474004792
511613.64601143461022.35398856538981
521414.8476348461144-0.847634846114387
531613.92036022951872.07963977048130
54910.2461331935941-1.24613319359412
551112.7462017139978-1.74620171399782
5655.60618897131157-0.606188971311574
571512.88244183617392.11755816382611
581312.53177315166730.468226848332692
591111.3812261296043-0.381226129604338
601112.4558916428751-1.45589164287508
611212.5666858309719-0.566685830971908
621410.64737961483933.35262038516070
6368.1859614643385-2.18596146433850
6479.29737479550278-2.29737479550278
651413.10722036808100.892779631918951
661413.84504781365790.154952186342145
671011.7570781967896-1.7570781967896
68138.134878697772334.86512130222767
691212.1627388367220-0.162738836722030
7098.700069271407680.299930728592323
711212.5831470027268-0.583147002726832
72109.599878992020040.400121007979956
731013.6100912815684-3.61009128156835
741615.30346025011840.696539749881558
751514.11138479779660.88861520220338
76810.5093566320612-2.50935663206122
7788.33735818443535-0.337358184435352
781311.93179251089061.06820748910938
791615.65412893462500.345871065374972
801614.75823477007861.24176522992140
811415.683498525076-1.68349852507599
82118.994410382845452.00558961715455
831413.96945215502590.0305478449740627
84910.8560240705475-1.85602407054751
85810.7807116546867-2.78071165468667
86811.3946037776603-3.39460377766035
871112.5372602089189-1.53726020891895
881214.4499206521246-2.44992065212455
891413.56969154501210.430308454987889
901612.82468090809333.17531909190667
911613.64500396087302.35499603912705
921413.36505275385170.634947246148343
931410.44275503429563.55724496570436
941412.16716849354321.83283150645685
9589.59987899202004-1.59987899202004
961613.36505275385172.63494724614834
971210.59484704810441.40515295189559
981213.7203163767338-1.72031637673379
991614.90410258537381.09589741462625
1001512.8299092694392.17009073056100
1011011.1172926790183-1.11729267901830
1021210.72269203070011.27730796929986
1031413.10563958885190.894360411148143
1041914.19022944091284.8097705590872
1051512.97890636672042.02109363327964
10687.764871388217260.235128611782735
107810.7977632523285-2.79776325232855
1081014.4527177687780-4.45271776877798
1091513.38659826961041.61340173038961
1101614.39543325539341.60456674460664
1111313.3979145986048-0.397914598604801


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.1655972887199710.3311945774399420.83440271128003
140.2103511097428530.4207022194857060.789648890257147
150.1143486742104470.2286973484208930.885651325789553
160.3582347989049380.7164695978098770.641765201095062
170.3628062880003570.7256125760007140.637193711999643
180.2950139904817970.5900279809635940.704986009518203
190.2600263809170580.5200527618341160.739973619082942
200.3956682641949180.7913365283898350.604331735805082
210.3206838091495860.6413676182991730.679316190850414
220.2435309482530180.4870618965060370.756469051746982
230.4106533584394790.8213067168789580.589346641560521
240.3671185202999060.7342370405998110.632881479700094
250.3255534354313260.6511068708626520.674446564568674
260.3853845872690690.7707691745381390.614615412730931
270.3695971376851470.7391942753702940.630402862314853
280.3036828619292280.6073657238584550.696317138070772
290.2489686070832460.4979372141664930.751031392916754
300.2238224216569310.4476448433138620.776177578343069
310.2498217387119010.4996434774238020.750178261288099
320.1967101417301220.3934202834602450.803289858269878
330.1611404544375260.3222809088750510.838859545562474
340.3745617850750890.7491235701501770.625438214924911
350.410817719148840.821635438297680.589182280851160
360.3772179083030430.7544358166060850.622782091696958
370.4631941106663490.9263882213326970.536805889333651
380.573972659563010.8520546808739810.426027340436991
390.5333261377768450.933347724446310.466673862223155
400.6291032088893560.7417935822212870.370896791110644
410.6030832261507080.7938335476985830.396916773849292
420.8048840694828050.3902318610343910.195115930517195
430.7650113975807550.469977204838490.234988602419245
440.803697454848810.3926050903023820.196302545151191
450.8015937515907490.3968124968185030.198406248409252
460.7659253404141290.4681493191717420.234074659585871
470.7275215466228470.5449569067543060.272478453377153
480.7424090090510740.5151819818978510.257590990948926
490.6978120135283980.6043759729432050.302187986471602
500.6890646652790110.6218706694419780.310935334720989
510.7037956940115640.5924086119768730.296204305988436
520.6718776214253770.6562447571492460.328122378574623
530.6611846714576610.6776306570846770.338815328542339
540.6876569342758270.6246861314483460.312343065724173
550.669745541885830.6605089162283390.330254458114170
560.6303102629553820.7393794740892370.369689737044618
570.6265577065380670.7468845869238660.373442293461933
580.5762097695441140.8475804609117720.423790230455886
590.5206023528648160.9587952942703670.479397647135183
600.643982553770780.712034892458440.35601744622922
610.6076046420109380.7847907159781230.392395357989062
620.6843584618156640.6312830763686720.315641538184336
630.6958461866627760.6083076266744480.304153813337224
640.7133071717394620.5733856565210760.286692828260538
650.7616201316648920.4767597366702160.238379868335108
660.7112612350038010.5774775299923980.288738764996199
670.6972489181033630.6055021637932740.302751081896637
680.9053516579801540.1892966840396920.094648342019846
690.8813749970135620.2372500059728760.118625002986438
700.8482401162205610.3035197675588780.151759883779439
710.8707878358283880.2584243283432230.129212164171612
720.8337499856736570.3325000286526850.166250014326343
730.9109821160919570.1780357678160860.0890178839080432
740.8859167742980480.2281664514039040.114083225701952
750.8619342934052130.2761314131895730.138065706594787
760.8496877144424420.3006245711151160.150312285557558
770.8822777284767750.2354445430464500.117722271523225
780.8775571287794610.2448857424410770.122442871220539
790.838561605936660.3228767881266790.161438394063340
800.7998272856517230.4003454286965540.200172714348277
810.7629766903466530.4740466193066940.237023309653347
820.8432393077446640.3135213845106730.156760692255336
830.8580423976561760.2839152046876480.141957602343824
840.8206238086569030.3587523826861930.179376191343097
850.8055363905432860.3889272189134280.194463609456714
860.776764507002210.4464709859955810.223235492997791
870.7201739104465660.5596521791068680.279826089553434
880.6765907856672620.6468184286654770.323409214332738
890.6194160811659730.7611678376680530.380583918834026
900.5826160955416130.8347678089167740.417383904458387
910.5163726239665960.9672547520668070.483627376033404
920.418788608853550.83757721770710.58121139114645
930.5458706028938930.9082587942122150.454129397106107
940.4442332761599020.8884665523198040.555766723840098
950.3350500665319440.6701001330638870.664949933468056
960.3507977279877310.7015954559754610.64920227201227
970.2828482649719870.5656965299439740.717151735028013
980.8216776931346750.3566446137306490.178322306865325


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/103qfr1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/103qfr1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/1e7jy1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/1e7jy1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/2ph0j1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/2ph0j1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/3ph0j1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/3ph0j1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/4ph0j1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/4ph0j1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/50qhm1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/50qhm1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/60qhm1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/60qhm1290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/7shy71290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/7shy71290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/8shy71290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/8shy71290172702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/93qfr1290172702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290173213l4djsnx1wp8stf2/93qfr1290172702.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by