Home » date » 2010 » Nov » 23 »

ws 7

*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, 23 Nov 2010 14:08:19 +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/23/t129052124358get5agh3t9wh9.htm/, Retrieved Tue, 23 Nov 2010 15:07:26 +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/23/t129052124358get5agh3t9wh9.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 12 12 8 13 5 15 10 12 16 6 12 9 7 12 6 10 10 10 11 5 12 12 7 12 3 15 13 16 18 8 9 12 11 11 4 12 12 14 14 4 11 6 6 9 4 11 5 16 14 6 11 12 11 12 6 15 11 16 11 5 7 14 12 12 4 11 14 7 13 6 11 12 13 11 4 10 12 11 12 6 14 11 15 16 6 10 11 7 9 4 6 7 9 11 4 11 9 7 13 2 15 11 14 15 7 11 11 15 10 5 12 12 7 11 4 14 12 15 13 6 15 11 17 16 6 9 11 15 15 7 13 8 14 14 5 13 9 14 14 6 16 12 8 14 4 13 10 8 8 4 12 10 14 13 7 14 12 14 15 7 11 8 8 13 4 9 12 11 11 4 16 11 16 15 6 12 12 10 15 6 10 7 8 9 5 13 11 14 13 6 16 11 16 16 7 14 12 13 13 6 15 9 5 11 3 5 15 8 12 3 8 11 10 12 4 11 11 8 12 6 16 11 13 14 7 17 11 15 14 5 9 15 6 8 4 9 11 12 13 5 13 12 16 16 6 10 12 5 13 6 6 9 15 11 6 12 12 12 14 5 8 12 8 13 4 14 13 13 13 5 12 11 14 13 5 11 9 12 12 4 16 9 16 16 6 8 11 10 15 2 15 11 15 15 8 7 12 8 12 3 16 12 16 14 6 14 9 19 12 6 16 11 14 15 6 9 9 6 12 5 14 12 13 13 5 11 12 15 12 6 13 12 7 12 5 15 12 13 13 6 5 14 4 5 2 15 11 14 13 5 13 12 13 13 5 11 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'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Celebrity [t] = + 0.423591992490597 + 0.154094039023444Popularity[t] -0.0194376966141408FindingFriends[t] + 0.103356510337141KnowingPeople[t] + 0.147677870542411Liked[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.4235919924905970.7057130.60020.5492510.274625
Popularity0.1540940390234440.0383424.01899.2e-054.6e-05
FindingFriends-0.01943769661414080.047694-0.40760.684180.34209
KnowingPeople0.1033565103371410.0308483.35050.0010190.00051
Liked0.1476778705424110.0483843.05220.0026850.001342


Multiple Linear Regression - Regression Statistics
Multiple R0.677446083231663
R-squared0.458933195685921
Adjusted R-squared0.444600300207403
F-TEST (value)32.0195731821072
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.04372839595306
Sum Squared Residuals164.494713642332


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
135.54092790558286-2.54092790558286
254.786132501150710.213867498849285
366.14374966442513-0.143749664425127
464.593411210113581.40658878988641
554.428177095921570.571822904078432
634.53509812027116-1.53509812027116
786.79421835701611.20578164298391
844.33856417400698-0.338564174006983
945.55394943371597-1.55394943371597
1043.951240138968190.048759861031813
1165.74263229166580.257367708334203
1264.794430122596281.20556987740372
1355.79934865644749-0.799348656447494
1444.24253508361137-0.242535083611366
1564.489806558561851.51019344143815
1644.85346527272815-0.853465272728154
1764.640336083572841.35966391642716
1866.28028745979897-0.280287459798966
1943.803314127211180.19668587278882
2043.766757519333070.233242480666927
2124.58699504163255-2.58699504163255
2276.183347117942860.816652882057142
2354.931938119474170.0680618805258348
2444.38742024972875-0.38742024972875
2565.817816151557590.182183848442409
2666.6410945194967-0.641094519496693
2775.362139394139341.63786060586067
2855.78579425919598-0.78579425919598
2965.766356562581840.23364343741816
3045.5501865277869-1.5501865277869
3144.24071258069038-0.240712580690383
3275.445146956401841.55485304359816
3376.009815382305270.990184617694727
3444.70978924858383-0.709789248583834
3544.33856417400698-0.338564174006983
3666.54415417764058-0.544154177640584
3765.288201262909820.71179873709018
3853.984421424004881.01557857599512
3965.579803298811150.420196701188853
4076.6918320481830.308167951817004
4165.611103130883310.388896869116691
4234.70130243596722-1.70130243596722
4333.50148326760177-0.501483267601773
4444.24822919180295-0.24822919180295
4564.5037982881991.496201711801
4676.086406776086750.91359322391325
4756.44721383578448-1.44721383578448
4843.320434920851620.67956507914838
4954.756714122043090.243285877956912
5066.21011223449852-0.210112234498523
5164.16787489209241.8321251079076
5264.348021188127641.65197881187236
5355.34723641304169-0.347236413041691
5444.16975634505694-0.169756345056939
5555.59166543426917-0.591665434269168
5655.4257092597877-0.425709259787703
5744.95609972277585-0.956099722775846
5866.73070744141128-0.730707441411277
5924.69126280343018-2.69126280343019
6086.286703628281.71329637172
6133.86798443549108-0.867984435491083
6266.37703861048403-0.377038610484032
6366.14187741220617-0.141877412206167
6466.3374411569663-0.337441156966302
6554.027772582706110.972227417293889
6655.61110313088331-0.611103130883309
6765.207856163944850.792143836055152
6854.689192159294610.310807840705394
6965.765197169906750.234802830093247
7022.07374982907047-0.0737498290704678
7155.88799137685803-0.887991376858035
7255.45700909185986-0.457009091859865
7355.10922356029525-0.109223560295247
7465.959515186004610.0404848139953915
7565.238433935727560.761566064272439
7665.50962807351070.490371926489297
7755.23915599601701-0.23915599601701
7855.38066583929298-0.380665839292984
7945.24199844974001-1.24199844974001
8023.35949950525094-1.35949950525094
8143.764627925153940.235372074846058
8265.580051440025740.419948559974258
8366.07357443912468-0.0735744391246839
8454.679211476801120.32078852319888
8534.48247913862032-1.48247913862032
8665.032442975342730.967557024657273
8743.900254469067290.099745530932711
8855.48874625631767-0.488746256317665
8986.33744115696631.6625588430337
9044.4530607595127-0.453060759512697
9165.763504908113260.23649509188674
9265.30952041248850.690479587511504
9376.672394351568850.327605648431145
9466.11414209414646-0.114142094146458
9554.967961858233870.0320381417661324
9644.182588682019-0.182588682019004
9763.853518786779082.14648121322092
9833.60392852647842-0.603928526478422
9955.6252840516915-0.625284051691504
10065.250296071185580.749703928814418
10176.795188558520140.204811441479863
10276.42135997068930.578640029310698
10366.72404313171565-0.72404313171565
10434.36084432434413-1.36084432434413
10522.73579592921564-0.735795929215645
10685.724629514884982.27537048511502
10734.67279530832009-1.67279530832009
10886.132609589256561.86739041074345
10934.56302262950191-1.56302262950191
11044.66565707954961-0.665657079549607
11155.23201776724653-0.232017767246529
11275.587378859967271.41262114003273
11364.528681951790131.47131804820987
11465.906458871968130.0935411280318684
11576.104874271196850.895125728803154
11666.18976328642389-0.18976328642389
11766.17032558980975-0.170325589809749
11865.07507207375450.924927926245495
11965.96549402210.0345059778999974
12045.3795064466179-1.3795064466179
12145.19955854249928-1.19955854249928
12255.79293248796646-0.792932487966462
12344.14487268146581-0.144872681465809
12465.791962286462420.208037713537582
12566.27368210014689-0.273682100146891
12654.727097351018840.272902648981156
12786.465681330894571.53431866910543
12865.50962807351070.490371926489297
12955.06418013980053-0.0641801398005278
13042.095317119863741.90468288013626
13186.465681330894571.53431866910543
13265.681278356183750.318721643816248
13344.92097803473106-0.920978034731061
13465.526214115656260.473785884343736
13565.912875040449160.0871249595508358
13644.88948901148786-0.889489011487856
13765.984931718714140.0150682812858566
13834.38476698717679-1.38476698717679
13966.88364208775963-0.883642087759634
14055.59282482694425-0.592824826944255
14145.63242228046199-1.63242228046199
14265.708043472739420.291956527260583
14346.31158729187113-2.31158729187113
14443.381599665162620.618400334837378
14544.992845521825-0.992845521824997
14664.045080685141121.95491931485888
14754.317434215599350.68256578440065
14865.438482646706220.561517353293784
14966.24238226807473-0.242382268074729
15086.111290439677881.88870956032212
15175.373090278136861.62690972186314
15276.569037841231710.430962158768286
15344.29896672048925-0.298966720489253
15465.841977754859270.158022245140728
15565.586219467292180.413780532707821
15625.26331759931869-3.26331759931869


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.4569425415262590.9138850830525180.543057458473741
90.581608144669770.836783710660460.41839185533023
100.4356314601843830.8712629203687670.564368539815617
110.5707932408418730.8584135183162530.429206759158127
120.769143892972110.4617122140557790.23085610702789
130.8502638431764490.2994723136471020.149736156823551
140.787057473314890.4258850533702190.21294252668511
150.8099990831076890.3800018337846220.190000916892311
160.7484016101014160.5031967797971670.251598389898584
170.7862863479790210.4274273040419580.213713652020979
180.7258965763396360.5482068473207280.274103423660364
190.6598457406054570.6803085187890860.340154259394543
200.6176058744728070.7647882510543860.382394125527193
210.9324951936242320.1350096127515370.0675048063757683
220.9277161053178180.1445677893643630.0722838946821815
230.9073711623420880.1852576753158240.0926288376579122
240.8780129298005990.2439741403988030.121987070199401
250.8474142922593580.3051714154812850.152585707740642
260.8150414142021830.3699171715956330.184958585797817
270.8356400833139220.3287198333721560.164359916686078
280.8116769774629410.3766460450741180.188323022537059
290.7705752250551020.4588495498897960.229424774944898
300.7795274586272720.4409450827454570.220472541372728
310.7446011236254450.510797752749110.255398876374555
320.7952865095481750.4094269809036490.204713490451825
330.792953561618860.4140928767622810.207046438381141
340.770534108073440.4589317838531210.229465891926561
350.7332804789099240.5334390421801520.266719521090076
360.6900869781233180.6198260437533640.309913021876682
370.6561258956241620.6877482087516760.343874104375838
380.6603923930544060.6792152138911880.339607606945594
390.6192231820812480.7615536358375050.380776817918752
400.5746023469772330.8507953060455350.425397653022767
410.5345291235434260.9309417529131470.465470876456574
420.5715137879932170.8569724240135670.428486212006783
430.5577464606888350.884507078622330.442253539311165
440.5135295314933480.9729409370133030.486470468506652
450.5761286446431430.8477427107137140.423871355356857
460.5762541304800480.8474917390399050.423745869519952
470.6035494414739030.7929011170521940.396450558526097
480.5839149096481020.8321701807037970.416085090351898
490.5361285059318020.9277429881363970.463871494068198
500.4899279419712710.9798558839425420.510072058028729
510.5729243301683760.8541513396632470.427075669831624
520.6213087216797270.7573825566405460.378691278320273
530.5803458030421450.839308393915710.419654196957855
540.5434046011169880.9131907977660230.456595398883012
550.5050766587352050.989846682529590.494923341264795
560.4643073160879530.9286146321759070.535692683912047
570.4617893652553410.9235787305106830.538210634744659
580.4325376901342260.8650753802684530.567462309865774
590.7246774426695750.5506451146608490.275322557330425
600.7933903702370090.4132192595259820.206609629762991
610.7833851823285570.4332296353428850.216614817671443
620.7505992577007460.4988014845985090.249400742299254
630.7121615106453780.5756769787092430.287838489354622
640.6744290555151280.6511418889697440.325570944484872
650.6653338715133280.6693322569733440.334666128486672
660.6347315475496650.730536904900670.365268452450335
670.6167390012163840.7665219975672310.383260998783616
680.5772804705411020.8454390589177950.422719529458898
690.5345231435683290.9309537128633430.465476856431671
700.4889531970258970.9779063940517940.511046802974103
710.4751262062375420.9502524124750850.524873793762458
720.4363712467742930.8727424935485860.563628753225707
730.3908473614340770.7816947228681540.609152638565923
740.3476299047423890.6952598094847770.652370095257611
750.3271872499029870.6543744998059730.672812750097013
760.2962822661031920.5925645322063840.703717733896808
770.2584583662931510.5169167325863020.741541633706849
780.2267687116495480.4535374232990960.773231288350452
790.2463016887388490.4926033774776980.753698311261151
800.2732238152404070.5464476304808130.726776184759593
810.2379084078413910.4758168156827810.76209159215861
820.207212544111930.414425088223860.79278745588807
830.1754490533732280.3508981067464560.824550946626772
840.1494671392772270.2989342785544530.850532860722773
850.2032271935677740.4064543871355480.796772806432226
860.198117752100360.396235504200720.80188224789964
870.1670584008590310.3341168017180630.832941599140969
880.144915474182260.2898309483645190.85508452581774
890.1882847430758590.3765694861517180.81171525692414
900.1643946535766990.3287893071533970.835605346423301
910.139542431935230.2790848638704590.86045756806477
920.133134560809570.266269121619140.86686543919043
930.1120760191079420.2241520382158830.887923980892058
940.09118448115813880.1823689623162780.908815518841861
950.07328805722522120.1465761144504420.926711942774779
960.05959723263858060.1191944652771610.94040276736142
970.1140648631956030.2281297263912060.885935136804397
980.10464965856490.20929931712980.8953503414351
990.09036414368495480.180728287369910.909635856315045
1000.07878486359201810.1575697271840360.921215136407982
1010.06422268151710380.1284453630342080.935777318482896
1020.05398301611882930.1079660322376590.94601698388117
1030.04487922341693430.08975844683386860.955120776583066
1040.06243903969415220.1248780793883040.937560960305848
1050.05706803648283060.1141360729656610.94293196351717
1060.1134633654613950.226926730922790.886536634538605
1070.1415979998467670.2831959996935340.858402000153233
1080.2344029793143410.4688059586286820.765597020685659
1090.2620995856002180.5241991712004370.737900414399782
1100.2301401809829320.4602803619658630.769859819017068
1110.193406395319840.386812790639680.80659360468016
1120.2772159982986280.5544319965972560.722784001701372
1130.2796754459816550.5593508919633090.720324554018345
1140.2375449083144470.4750898166288930.762455091685553
1150.2249067365638620.4498134731277240.775093263436138
1160.1872728955439510.3745457910879020.812727104456049
1170.1546699165509360.3093398331018720.845330083449064
1180.1457173751519580.2914347503039170.854282624848042
1190.1176438571801250.235287714360250.882356142819875
1200.156235625930720.3124712518614410.84376437406928
1210.1712141703957150.342428340791430.828785829604285
1220.1538781877537630.3077563755075250.846121812246237
1230.1223338654066330.2446677308132670.877666134593367
1240.09664516949326810.1932903389865360.903354830506732
1250.07712922581684140.1542584516336830.922870774183159
1260.0606389121879260.1212778243758520.939361087812074
1270.08456153404926950.1691230680985390.91543846595073
1280.07208643603214780.1441728720642960.927913563967852
1290.06089306605561760.1217861321112350.939106933944382
1300.08385564923991910.1677112984798380.91614435076008
1310.1184285906448090.2368571812896180.881571409355191
1320.08933067925493150.1786613585098630.910669320745069
1330.07169915036971180.1433983007394240.928300849630288
1340.05202553599359790.1040510719871960.947974464006402
1350.0359390360193620.07187807203872410.964060963980638
1360.04176298597506090.08352597195012170.95823701402494
1370.03137876819164330.06275753638328670.968621231808357
1380.02640894674742540.05281789349485090.973591053252575
1390.03063694858893580.06127389717787160.969363051411064
1400.02537973168652510.05075946337305020.974620268313475
1410.01932017786915430.03864035573830860.980679822130846
1420.01186890310771210.02373780621542410.988131096892288
1430.04267307013607820.08534614027215630.957326929863922
1440.02796650822450410.05593301644900830.972033491775496
1450.04814843274662460.09629686549324910.951851567253375
1460.03343124461142630.06686248922285250.966568755388574
1470.03346119857295510.06692239714591020.966538801427045
1480.02891844151925070.05783688303850140.97108155848075


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0141843971631206OK
10% type I error level150.106382978723404NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/10zlse1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/10zlse1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/1s2v31290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/1s2v31290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/23bdo1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/23bdo1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/33bdo1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/33bdo1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/43bdo1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/43bdo1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/53bdo1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/53bdo1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/6elc91290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/6elc91290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/76ctc1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/76ctc1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/86ctc1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/86ctc1290521286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/9zlse1290521286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052124358get5agh3t9wh9/9zlse1290521286.ps (open in new window)


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