Home » date » 2010 » Dec » 05 »

Paper: Multiple Linear Regression + geslacht

*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, 05 Dec 2010 12:58:27 +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/05/t1291553824xauqqc4w4yz5sjs.htm/, Retrieved Sun, 05 Dec 2010 13:57:15 +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/05/t1291553824xauqqc4w4yz5sjs.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 14 13 3 0 12 8 13 5 0 15 12 16 6 12 12 7 12 6 10 10 10 11 5 12 12 7 12 3 0 15 16 18 8 0 9 11 11 4 12 12 14 14 4 0 11 6 9 4 0 11 16 14 6 0 11 11 12 6 15 15 16 11 5 7 7 12 12 4 11 11 7 13 6 0 11 13 11 4 10 10 11 12 6 0 14 15 16 6 10 10 7 9 4 6 6 9 11 4 11 11 7 13 2 15 15 14 15 7 11 11 15 10 5 14 14 15 13 6 0 9 15 15 7 13 13 14 14 5 16 16 8 14 4 13 13 8 8 4 0 12 14 13 7 0 14 14 15 7 11 11 8 13 4 9 9 11 11 4 16 16 16 15 6 12 12 10 15 6 0 10 8 9 5 13 13 14 13 6 16 16 16 16 7 14 14 13 13 6 15 15 5 11 3 0 5 8 12 3 8 8 10 12 4 11 11 8 12 6 16 16 13 14 7 17 17 15 14 5 9 9 6 8 4 9 9 12 13 5 13 13 16 16 6 12 12 12 14 5 8 8 8 13 4 0 14 13 13 5 12 12 14 13 5 11 11 12 12 4 16 16 16 16 6 8 8 10 15 2 15 15 15 15 8 7 7 8 12 3 0 16 16 14 6 14 14 19 12 6 9 9 6 12 5 14 14 13 13 5 11 11 15 12 6 0 15 13 13 6 15 15 14 13 5 13 13 13 13 5 11 11 11 14 5 0 11 14 17 6 12 12 12 13 6 12 12 15 13 6 12 12 14 12 5 12 12 13 13 5 14 14 8 14 4 6 6 6 11 2 7 7 7 12 4 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 time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 1.59055007677943 + 0.142714990424374`Pop*geslacht`[t] + 0.213531241972043KnowingPeople[t] + 0.25873921064204Liked[t] + 0.591645271703441Celebrity[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.590550076779431.115611.42570.1564210.078211
`Pop*geslacht`0.1427149904243740.0330254.32153.1e-051.6e-05
KnowingPeople0.2135312419720430.063963.33850.0011080.000554
Liked0.258739210642040.0996372.59680.0105280.005264
Celebrity0.5916452717034410.1539453.84320.0001929.6e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.730462854365973
R-squared0.533575981608485
Adjusted R-squared0.518768869913516
F-TEST (value)36.035115598526
F-TEST (DF numerator)4
F-TEST (DF denominator)126
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.92784466060862
Sum Squared Residuals468.289714465082


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.57382789336161.42617210663836
2129.62063610941952.3793638905805
31511.84262398093723.15737601906279
41211.45259081360130.547409186398668
51010.9573700763232-0.957370076323233
6129.6776549984912.32234500150900
71514.39751791351640.602482086483648
899.1521061423481-0.152106142348093
91212.2814973852828-0.281497385282823
10117.56697151120383.4330284887962
111112.1792705275413-1.17927052754131
121110.59413589639700.405864103602983
131512.95213248027742.04786751972265
14710.6233815279328-3.62338152793279
151111.568615033819-0.568615033818996
16119.579168626292181.42083137370782
171012.0212858006408-2.02128580064075
181412.48321770685331.51678229314665
19109.207652657419580.79234734258042
2069.58133360095025-3.58133360095025
21119.202033947005231.79796605299477
221514.74331738230830.256682617691691
231111.9090020659658-0.909002065965774
241413.70500994086850.294990059131544
25912.8161237679147-3.81612376791475
261313.0158576474106-0.0158576474106384
271611.57116989514814.42883010485194
28139.59058966002273.4094103399773
291212.0851141046586-0.085114104658626
301412.60259252594271.39740747405729
311110.59885573238420.401144267615845
32910.4365410561675-1.43654105616746
331614.72144958497331.27855041502667
341212.8694021714436-0.869402171443577
35108.585679266851331.41432073314867
361313.3487637084720-0.34876370847204
371615.57183406731880.428165932681193
381413.27794745692440.722052543075628
39159.4199982751785.580001724822
4058.17860635537057-3.17860635537056
41810.3390340344131-2.33903403441308
421111.523407065149-0.523407065148999
431614.41376192011861.5862380798814
441713.80024885108023.19975114891982
4598.592667214381120.407332785618876
46911.7591959911270-2.75919599112702
471314.5520438243422-1.55204382434224
481212.4460801730422-0.44608017304218
49810.1707107611110-2.17071076111103
501410.68829231927973.3117076807203
511212.6144034463442-0.614403446344225
521111.1942414896303-0.194241489630285
531614.98018879561541.01981120438463
5489.93196112293232-1.93196112293232
551515.5484938959838-0.548493895983793
5679.17761128834118-2.17761128834118
571612.17927052754133.82072947245869
581414.3003956981146-0.300395698114586
59910.2192693286527-1.21926932865272
601412.68630218522091.31369781477907
611113.0181257589533-2.01812575895330
621511.27993759098313.72006240901686
631513.04254841761731.95745158238265
641312.54358719479660.456412805203444
651112.0898339406458-1.08983394064576
661112.5284256755233-1.52842567552334
671212.7789862341036-0.778986234103582
681213.4195799600197-1.41957996001971
691212.3556642357022-0.355664235702185
701212.4008722043722-0.400872204372183
711411.28573991429932.71426008570068
7267.75744933162724-1.75744933162724
7379.55572531807258-2.55572531807258
741414.0541650888505-0.0541650888504911
751011.4296405289373-1.42964052893731
76137.538012629454445.46198737054556
771212.5202470234615-0.520247023461542
7899.53720811960929-0.537208119609288
791210.77870825661971.22129174338031
801615.47767764443610.522322355563876
811010.4109327732898-0.410932773289784
821013.2245659165110-3.22456591651096
831613.28839422052882.71160577947117
841514.06125617326490.938743826735128
85108.511512416431971.48848758356803
86810.4998763366297-2.49987633662975
8788.58931661550943-0.589316615509431
881112.9891668772039-1.98916687720393
891312.70816998255590.291830017444087
901615.78536530929080.214634690709151
911415.4257684780227-1.42576847802274
92910.3623742057481-1.36237420574809
93810.2648671839937-2.26486718399372
94810.9017204243672-2.90172042436716
951112.3033651826178-1.30336518261781
961214.0112252317232-2.01122523172315
971413.79542587820850.204574121791549
981514.57499410900630.425005890993736
991614.03564789038721.9643521096128
1001614.03564789038721.9643521096128
1011112.5583639077172-1.55836390771716
1021413.96374915151050.0362508484895038
1031411.62238646090342.37761353909659
1041211.59569569069670.404304309303302
1051313.8210341610861-0.821034161086123
106129.452312836117442.54768716388256
1071615.73641685507820.263583144921837
1081213.4195799600197-1.41957996001971
1091111.8763026986737-0.876302698673722
11046.8441354196911-2.84413541969110
1111615.73641685507820.263583144921837
1121011.2323583738859-1.23235837388590
1131313.22564840384-0.225648403839993
1141413.96374915151050.0362508484895038
115710.2452674982014-3.24526749820139
1161212.8731426569863-0.873142656986265
1171210.73724077349241.26275922650761
1181313.6075029191141-0.60750291911408
1191513.22712077784001.77287922215998
1201211.16863320675260.831366793247386
1211010.7853063174785-0.785306317478495
122811.0210952434565-3.02109524345652
1231013.6516284004550-3.65162840045504
1241514.31999538390690.680004616093088
1251615.05061516049200.949384839507961
1261313.5133464962314-0.513346496231397
1271615.35830282534680.641697174653236
128910.2682177828654-1.26821778286541
1291413.58189463623640.418105363763591
1301413.23273948825440.767260511745626
1311210.45761311595981.54238688404019


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.04595354426522450.09190708853044890.954046455734776
90.04589348726237270.09178697452474540.954106512737627
100.1277432794368540.2554865588737080.872256720563146
110.06873605173833930.1374721034766790.93126394826166
120.03404280927714990.06808561855429980.96595719072285
130.3312297281726810.6624594563453610.66877027182732
140.7252158810310350.549568237937930.274784118968965
150.7034159533141340.5931680933717330.296584046685866
160.6360246792289080.7279506415421830.363975320771092
170.6271060767841150.745787846431770.372893923215885
180.5618192941173990.8763614117652020.438180705882601
190.4825969314018640.9651938628037270.517403068598136
200.7484103102429350.503179379514130.251589689757065
210.6930453609802630.6139092780394750.306954639019737
220.6334926020477350.733014795904530.366507397952265
230.5653083785475610.8693832429048780.434691621452439
240.5057151201596730.9885697596806530.494284879840327
250.6894664575860180.6210670848279630.310533542413982
260.6266776338369620.7466447323260750.373322366163038
270.7336424831971550.532715033605690.266357516802845
280.8191222652566420.3617554694867160.180877734743358
290.7791730843110120.4416538313779750.220826915688988
300.7589015139662290.4821969720675430.241098486033771
310.7234607334841060.5530785330317880.276539266515894
320.713636702294540.5727265954109190.286363297705459
330.6825958850409320.6348082299181370.317404114959068
340.6651539759398290.6696920481203430.334846024060171
350.6329339773557560.7341320452884870.367066022644244
360.5765980991560990.8468038016878010.423401900843901
370.5229466900762960.9541066198474080.477053309923704
380.4719569568034230.9439139136068460.528043043196577
390.7437059324988760.5125881350022480.256294067501124
400.8660739511549570.2678520976900850.133926048845043
410.8923697132016820.2152605735966370.107630286798318
420.8757531156578580.2484937686842840.124246884342142
430.8622755432993790.2754489134012420.137724456700621
440.9030208886389690.1939582227220620.0969791113610309
450.8837241758093520.2325516483812960.116275824190648
460.916725638299660.1665487234006820.0832743617003408
470.914147666879410.1717046662411810.0858523331205903
480.8956295553894760.2087408892210470.104370444610524
490.9123470379889060.1753059240221880.087652962011094
500.9447684101627820.1104631796744370.0552315898372184
510.9305358459109820.1389283081780360.0694641540890178
520.912299596542240.1754008069155210.0877004034577605
530.8949272760972360.2101454478055270.105072723902764
540.8991115537051570.2017768925896850.100888446294843
550.8781788702926530.2436422594146940.121821129707347
560.8861322346618550.2277355306762900.113867765338145
570.9400791361791720.1198417276416560.0599208638208278
580.9233257163910990.1533485672178030.0766742836089014
590.913332036280780.1733359274384420.0866679637192208
600.9026914045507590.1946171908984820.097308595449241
610.904382134150770.1912357316984580.0956178658492292
620.9503085841894140.09938283162117120.0496914158105856
630.9516760141621540.09664797167569240.0483239858378462
640.9388416837230740.1223166325538530.0611583162769263
650.9277605449467090.1444789101065830.0722394550532913
660.9244108753535370.1511782492929270.0755891246464633
670.9078240883091880.1843518233816240.092175911690812
680.8967267158224610.2065465683550780.103273284177539
690.8722676291568070.2554647416863860.127732370843193
700.8442519096990320.3114961806019370.155748090300968
710.8836531680385580.2326936639228850.116346831961443
720.8743022230081630.2513955539836750.125697776991837
730.8893134073628030.2213731852743940.110686592637197
740.8627630006160850.2744739987678290.137236999383915
750.8468127325490080.3063745349019830.153187267450992
760.9834273498159120.03314530036817680.0165726501840884
770.9773801601195670.04523967976086560.0226198398804328
780.970006526333560.05998694733288090.0299934736664404
790.9658846582632390.06823068347352210.0341153417367611
800.9549940680158350.09001186396833050.0450059319841652
810.9416663428150780.1166673143698440.0583336571849218
820.9669030799950170.0661938400099660.033096920004983
830.9798708456204030.04025830875919420.0201291543795971
840.9741229921697260.05175401566054750.0258770078302737
850.9850146994500670.02997060109986550.0149853005499328
860.9853124560113740.02937508797725120.0146875439886256
870.9795930708251570.04081385834968640.0204069291748432
880.9791124106741350.04177517865173000.0208875893258650
890.9714368319815450.05712633603691050.0285631680184552
900.960463472183210.0790730556335790.0395365278167895
910.9586679029266370.0826641941467260.041332097073363
920.9486531059762340.1026937880475320.051346894023766
930.9505711900630150.09885761987397060.0494288099369853
940.9664511367566830.06709772648663460.0335488632433173
950.959550564041970.08089887191606160.0404494359580308
960.9575951999324880.08480960013502380.0424048000675119
970.9412768506538670.1174462986922650.0587231493461326
980.9207151625616740.1585696748766520.0792848374383261
990.9205754677979180.1588490644041640.0794245322020822
1000.923388320978430.1532233580431390.0766116790215694
1010.9160699600164460.1678600799671070.0839300399835536
1020.8869301920189450.2261396159621100.113069807981055
1030.9249369042481930.1501261915036130.0750630957518066
1040.9030050285433540.1939899429132930.0969949714566465
1050.8728149836197510.2543700327604990.127185016380249
1060.9695305450572750.06093890988544910.0304694549427246
1070.9539254544186630.09214909116267470.0460745455813373
1080.943842480154140.1123150396917180.056157519845859
1090.9186687390672790.1626625218654430.0813312609327213
1100.895653445642590.2086931087148190.104346554357410
1110.853343380779460.2933132384410790.146656619220539
1120.8070789912232250.385842017553550.192921008776775
1130.7418021464740790.5163957070518420.258197853525921
1140.6650338367705520.6699323264588950.334966163229448
1150.8104059137134780.3791881725730440.189594086286522
1160.7729476032875590.4541047934248820.227052396712441
11711.03952623803669e-1415.19763119018347e-142
11811.28888100164261e-1226.44440500821304e-123
11911.51917273998704e-1087.5958636999352e-109
12012.97616944314037e-921.48808472157019e-92
12113.9516372614307e-781.97581863071535e-78
12214.50595214666178e-622.25297607333089e-62
12315.42176106127711e-482.71088053063855e-48


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level70.0603448275862069NOK
5% type I error level140.120689655172414NOK
10% type I error level330.284482758620690NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/10bf5b1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/10bf5b1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/1xopl1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/1xopl1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/2xopl1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/2xopl1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/3xopl1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/3xopl1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/48f7o1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/48f7o1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/58f7o1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/58f7o1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/68f7o1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/68f7o1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/71o6q1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/71o6q1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/8bf5b1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/8bf5b1291553896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/9bf5b1291553896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291553824xauqqc4w4yz5sjs/9bf5b1291553896.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; 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