Home » date » 2010 » Dec » 19 »

WS 10 verbetering

*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: Sun, 19 Dec 2010 17:10:32 +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/19/t1292778536dts2e9wieisp70r.htm/, Retrieved Sun, 19 Dec 2010 18:09:07 +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/19/t1292778536dts2e9wieisp70r.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 «
24 26 38 23 10 11 25 23 36 15 10 11 30 25 23 25 10 11 19 23 30 18 10 11 22 19 26 21 10 11 22 29 26 19 10 11 25 25 30 15 13 12 23 21 27 22 10 11 17 22 34 19 10 11 21 25 28 20 13 9 19 24 36 26 10 11 19 18 42 26 10 11 15 22 31 21 10 11 23 22 26 19 10 11 27 28 16 19 13 12 14 12 23 19 10 11 23 20 45 28 10 11 19 21 30 27 10 11 18 23 45 18 10 11 20 28 30 19 10 11 23 24 24 24 10 11 25 24 29 21 13 12 19 24 30 22 13 9 24 23 31 25 10 11 25 29 34 15 10 11 26 24 41 34 10 11 29 18 37 23 10 11 32 25 33 19 10 11 29 26 48 15 10 11 28 22 44 15 10 11 17 22 29 17 10 11 28 22 44 30 13 9 26 30 43 28 10 11 25 23 31 23 10 11 14 17 28 23 10 11 25 23 26 21 10 11 26 23 30 18 10 11 20 25 27 19 15 11 18 24 34 24 10 11 32 24 47 15 10 11 25 21 37 24 13 16 21 24 27 20 10 11 20 28 30 20 10 11 30 20 36 44 10 11 24 29 39 20 10 11 26 27 32 20 10 11 24 22 25 20 10 11 22 28 19 11 10 11 14 16 29 21 10 11 24 25 26 21 13 9 24 24 31 19 13 12 24 28 31 21 10 11 24 24 31 17 10 11 22 24 39 19 10 11 27 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'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 2.56178589149283 + 0.401224374199192O[t] + 0.104589813674580CMD[t] + 0.186385617399127PEC[t] + 0.183599932659208happiness[t] + 0.113176959210136depression[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.561785891492835.0712030.50520.6143710.307185
O0.4012243741991920.0910214.4082.3e-051.1e-05
CMD0.1045898136745800.0517282.02190.0454090.022704
PEC0.1863856173991270.0674652.76270.0066360.003318
happiness0.1835999326592080.2704160.6790.4984750.249237
depression0.1131769592101360.2648920.42730.6699580.334979


Multiple Linear Regression - Regression Statistics
Multiple R0.457337136720517
R-squared0.209157256623721
Adjusted R-squared0.176205475649709
F-TEST (value)6.34737335710863
F-TEST (DF numerator)5
F-TEST (DF denominator)120
p-value2.90293032559896e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.89738634624616
Sum Squared Residuals1822.75443982872


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.3358476183895-0.33584761838947
22521.43190992924963.56809007075041
33022.73854727386977.26145272613029
41921.3635278993995-2.36352789939949
52219.89942800010182.1005719998982
62223.5389005072955-1.53890050729546
72522.27079655278832.72920344721174
82320.99285217957392.00714782042611
91721.5670483972978-4.56704839729775
102122.6540141348043-1.65401413480433
111923.8833760948392-4.88337609483919
121922.1035687316915-3.10356873169152
131521.6260501910723-6.62605019107227
142320.73032988790112.26967011209888
152722.75575475353824.24424524646177
161416.4043167048855-2.40431670488546
172323.5925581559119-0.592558155911898
181922.2385497075933-3.23854970759327
191822.9323751045182-4.9323751045182
202023.5560353877946-3.55603538779458
212322.2555270959460.744472904054021
222522.88329606930932.11670393069075
231922.8347406227526-3.83474062275255
242422.77281703486801.22718296513203
252523.63007654709561.36992345290442
262625.89741010240510.102589897594889
272921.02146281112127.97853718887876
283222.66613170622079.33386829377925
292923.89066081594215.10933918405788
302821.86740406444706.13259593555296
311720.6713280941266-3.6713280941266
322824.98763420499133.01236579500869
332627.3956222705547-1.39562227055465
342522.40004580006972.59995419993028
351419.6789301138508-5.67893011385083
362521.50432549689863.49567450310144
372621.36352789939954.6364721006005
382022.9565924874693-2.95659248746931
391823.3014252326918-5.30142523269177
403222.98362225386929.01637774613084
412523.52820614514621.47179385485376
422121.8237540673732-0.823754067373208
432023.7424210051937-3.74242100519371
443025.63341971122674.36658028877328
452425.0849537024641-1.08495370246412
462623.55037625834372.44962374165632
472420.81212569162573.18787430837433
482220.91446249818121.08553750181881
491419.0095243185280-5.00952431852796
502422.63122012485431.3687798751457
512422.71970446186021.28029553813984
522424.0333964362674-0.0333964362674200
532421.68295646987412.31704353012586
542222.8924462140690-0.892446214069036
552720.91105637584936.08894362415066
561920.956486903603-1.95648690360299
572522.45695207887162.54304792112841
582021.7762280246469-1.77622802464691
592120.78157703725210.218422962747915
602724.62682304946312.37317695053694
612523.24808256836821.75191743163184
622021.2476198268231-1.24761982682311
632122.0385928241733-1.03859282417327
642223.0104498016181-1.01044980161807
652323.8754639582692-0.875463958269228
662522.08999746567072.91000253432935
672524.63248217891400.367517821086038
681722.1260477573487-5.12604775734872
692523.71063434263031.28936565736969
701923.4326027621104-4.43260276211044
712022.9058599879435-2.90585998794349
722622.16054760966283.83945239033723
732324.1438754707087-1.1438754707087
742724.24482907073562.75517092926436
751723.556192879941-6.556192879941
761919.4503625988835-0.450362598883485
771720.6286618683366-3.6286618683366
782221.25263713590580.747362864094181
792123.3184026210445-2.31840262104449
803226.51347323340445.48652676659564
812124.8759315672614-3.87593156726138
822124.0527843238856-3.05278432388561
831821.3896285700693-3.3896285700693
842322.17954791381870.82045208618125
852020.5006092577210-0.500609257720984
862025.0621596925141-5.06215969251409
871718.7222699940789-1.72226999407893
881818.6652062231306-0.665206223130644
891919.3994304338253-0.399430433825346
901520.9901148442330-5.99011484423305
911419.0037076969306-5.00370769693064
921824.2561473296374-6.25614732963745
933521.215603072943913.7843969270561
942919.98106631167999.01893368832007
952518.85870466458516.14129533541488
962018.99029392305621.00970607694381
972223.8243743010647-1.82437430106468
981316.6620061462447-3.66200614624475
992620.70350234015225.29649765984779
1001718.2183938290314-1.21839382903139
1012521.69086860644413.30913139355589
1022020.3155342476811-0.315534247681059
1031922.5481281186717-3.54812811867172
1042122.7728170348680-1.77281703486797
1052220.28708110828011.71291889171988
1062422.85817645307081.14182354692922
1072123.6143953612009-2.61439536120090
1082624.45483497722221.54516502277778
1091620.4109013174265-4.41090131742647
1102322.10051641205780.899483587942148
1111820.9634995101457-2.96349951014575
1122118.09682662700412.90317337299590
1132122.9176446514515-1.91764465145148
1142320.36111950476722.63888049523280
1152121.8303555965840-0.830355596583968
1162121.2739774512514-0.273977451251404
1172323.9084957110777-0.908495711077662
1182724.26389845534662.73610154465344
1192120.05526496312730.944735036872654
1201017.3874919412321-7.38749194123207
1212021.2781684811967-1.27816848119669
1222621.02130531897484.97869468102517
1232424.3473233694376-0.347323369437573
1242423.06022885146340.93977114853658
1252222.7899519153671-0.7899519153671
1261725.1064371050550-8.10643710505495


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.8102003440793320.3795993118413360.189799655920668
100.6861287577296980.6277424845406040.313871242270302
110.6855749943562960.6288500112874090.314425005643704
120.5694941126040420.8610117747919170.430505887395958
130.7250894477741030.5498211044517940.274910552225897
140.6359876699939030.7280246600121940.364012330006097
150.5691053374423180.8617893251153640.430894662557682
160.5329616975765680.9340766048468630.467038302423432
170.489449288501640.978898577003280.51055071149836
180.4487700537846580.8975401075693170.551229946215342
190.3954923932466080.7909847864932160.604507606753392
200.3755874461106250.7511748922212490.624412553889375
210.3003205420100910.6006410840201820.699679457989909
220.2371734789346720.4743469578693440.762826521065328
230.1917007465796840.3834014931593690.808299253420316
240.1540772864668470.3081545729336940.845922713533153
250.1297131847109100.2594263694218200.87028681528909
260.10027235637170.20054471274340.8997276436283
270.3732411593293120.7464823186586230.626758840670688
280.6971195527002940.6057608945994120.302880447299706
290.7442866485674220.5114267028651570.255713351432579
300.7868349166366540.4263301667266930.213165083363346
310.7914854916553680.4170290166892630.208514508344632
320.8031960804024220.3936078391951570.196803919597579
330.765907270481120.468185459037760.23409272951888
340.7369859223388080.5260281553223850.263014077661193
350.772479807402930.4550403851941390.227520192597070
360.7623812590902020.4752374818195960.237618740909798
370.7694976918974410.4610046162051180.230502308102559
380.7691258928620510.4617482142758970.230874107137949
390.8018200310940490.3963599378119020.198179968905951
400.89998489777710.2000302044458000.100015102222900
410.8776016383374080.2447967233251830.122398361662592
420.848818420850360.3023631582992790.151181579149639
430.8514236441409930.2971527117180130.148576355859007
440.879581343858290.2408373122834190.120418656141710
450.8553424053442640.2893151893114710.144657594655736
460.8334584650516660.3330830698966670.166541534948334
470.8201257979705480.3597484040589030.179874202029452
480.7843698112757810.4312603774484380.215630188724219
490.8044178461923660.3911643076152670.195582153807634
500.772745989476850.4545080210462990.227254010523150
510.7331307882565840.5337384234868330.266869211743416
520.6884281659332190.6231436681335610.311571834066781
530.6556094015525530.6887811968948930.344390598447447
540.6111570744988730.7776858510022540.388842925501127
550.6804800308970950.639039938205810.319519969102905
560.6442767408525680.7114465182948640.355723259147432
570.6155252083416370.7689495833167260.384474791658363
580.5761380369896540.8477239260206910.423861963010346
590.5244413613222930.9511172773554150.475558638677707
600.4933669324190260.9867338648380520.506633067580974
610.4540039760497440.9080079520994880.545996023950256
620.4069434475940110.8138868951880210.593056552405989
630.3600173709978450.720034741995690.639982629002155
640.3150196658979970.6300393317959930.684980334102003
650.2743876126862810.5487752253725620.725612387313719
660.2589051675416220.5178103350832440.741094832458378
670.2217752250455020.4435504500910030.778224774954498
680.2435989326466020.4871978652932050.756401067353398
690.2062068274833250.4124136549666510.793793172516675
700.2235101009309210.4470202018618410.77648989906908
710.2032691120319630.4065382240639260.796730887968037
720.2000814106326350.400162821265270.799918589367365
730.1683494266851370.3366988533702750.831650573314862
740.1540683921132700.3081367842265400.84593160788673
750.2071302062728530.4142604125457050.792869793727147
760.1708684407808310.3417368815616620.829131559219169
770.1605797942283140.3211595884566270.839420205771686
780.1316850796146310.2633701592292630.868314920385369
790.1118030688047350.2236061376094710.888196931195265
800.1482614015884880.2965228031769750.851738598411512
810.1401752479606070.2803504959212150.859824752039393
820.12393176640350.2478635328070.8760682335965
830.1186501909199020.2373003818398040.881349809080098
840.09483322634186220.1896664526837240.905166773658138
850.07338433906421590.1467686781284320.926615660935784
860.07856709408967020.1571341881793400.92143290591033
870.06249127697394710.1249825539478940.937508723026053
880.04728758196840330.09457516393680660.952712418031597
890.0348356379441890.0696712758883780.965164362055811
900.05026702204203100.1005340440840620.949732977957969
910.06198369793770860.1239673958754170.938016302062291
920.08548351229834940.1709670245966990.91451648770165
930.6162171183009440.7675657633981110.383782881699056
940.8425690249026820.3148619501946360.157430975097318
950.9135649543459450.1728700913081110.0864350456540555
960.8866779548737790.2266440902524430.113322045126221
970.857992093466190.2840158130676190.142007906533810
980.879564773726360.2408704525472780.120435226273639
990.892278687027270.2154426259454610.107721312972731
1000.857150618486650.2856987630266990.142849381513349
1010.8680938959193230.2638122081613550.131906104080677
1020.8228006334037380.3543987331925250.177199366596262
1030.8226725468230040.3546549063539920.177327453176996
1040.7691414049000290.4617171901999420.230858595099971
1050.7219930715756490.5560138568487020.278006928424351
1060.6681036188669220.6637927622661550.331896381133077
1070.6265502486089430.7468995027821140.373449751391057
1080.5452106049641650.909578790071670.454789395035835
1090.5356536820547540.9286926358904930.464346317945246
1100.4641091028399640.9282182056799290.535890897160036
1110.3938288945900450.787657789180090.606171105409955
1120.390390631272680.780781262545360.60960936872732
1130.4089099220253950.8178198440507890.591090077974605
1140.5417823438362330.9164353123275350.458217656163767
1150.9876297188331470.02474056233370630.0123702811668532
1160.9822982818375270.03540343632494690.0177017181624735
1170.9394714831491050.1210570337017890.0605285168508945


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.018348623853211OK
10% type I error level40.036697247706422OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/101wje1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/101wje1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/1nm3n1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/1nm3n1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/2nm3n1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/2nm3n1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/3nm3n1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/3nm3n1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/4gdkp1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/4gdkp1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/5gdkp1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/5gdkp1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/6gdkp1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/6gdkp1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/7q4kb1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/7q4kb1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/81wje1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/81wje1292778568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/91wje1292778568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778536dts2e9wieisp70r/91wje1292778568.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