Home » date » 2010 » Dec » 01 »

multiple regression - model 1

*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: Wed, 01 Dec 2010 17:31:46 +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/01/t1291224596nni4yngi7iif5la.htm/, Retrieved Wed, 01 Dec 2010 18:30:06 +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/01/t1291224596nni4yngi7iif5la.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 «
2 13 13 14 13 3 1 12 12 8 13 5 0 15 10 12 16 6 3 12 9 7 12 6 3 10 10 10 11 5 1 12 12 7 12 3 3 15 13 16 18 8 1 9 12 11 11 4 4 12 12 14 14 4 0 11 6 6 9 4 3 11 5 16 14 6 2 11 12 11 12 6 4 15 11 16 11 5 3 7 14 12 12 4 1 11 14 7 13 6 1 11 12 13 11 4 2 10 12 11 12 6 3 14 11 15 16 6 1 10 11 7 9 4 1 6 7 9 11 4 2 11 9 7 13 2 3 15 11 14 15 7 4 11 11 15 10 5 2 12 12 7 11 4 1 14 12 15 13 6 2 15 11 17 16 6 2 9 11 15 15 7 4 13 8 14 14 5 2 13 9 14 14 6 3 16 12 8 14 4 3 13 10 8 8 4 3 12 10 14 13 7 4 14 12 14 15 7 2 11 8 8 13 4 2 9 12 11 11 4 4 16 11 16 15 6 3 12 12 10 15 6 4 10 7 8 9 5 2 13 11 14 13 6 5 16 11 16 16 7 3 14 12 13 13 6 1 15 9 5 11 3 1 5 15 8 12 3 1 8 11 10 12 4 2 11 11 8 12 6 3 16 11 13 14 7 9 17 11 15 14 5 0 9 15 6 8 4 0 9 11 12 13 5 2 13 12 16 16 6 2 10 12 5 13 6 3 6 9 15 11 6 1 12 12 12 14 5 2 8 12 8 13 4 0 14 13 13 13 5 5 12 11 14 13 5 2 11 9 12 12 4 4 16 9 16 16 6 3 8 11 10 15 2 0 15 11 15 15 8 0 7 12 8 12 3 4 16 12 16 14 6 1 14 9 19 12 6 1 16 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
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
aantalVrienden[t] = + 1.23744674639409 + 0.0963613878771712Popularity[t] -0.0644187764141667FindingFriends[t] + 0.128803686232339KnowingPeople[t] -0.0747737175493632Liked[t] + 0.0387444743481176`Celebrity `[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.237446746394090.9528711.29870.1960560.098028
Popularity0.09636138787717120.0544041.77120.0785540.039277
FindingFriends-0.06441877641416670.064356-1.0010.3184510.159225
KnowingPeople0.1288036862323390.0431212.9870.0032910.001646
Liked-0.07477371754936320.067234-1.11210.2678560.133928
`Celebrity `0.03874447434811760.1097490.3530.7245630.362281


Multiple Linear Regression - Regression Statistics
Multiple R0.404565543716048
R-squared0.163673279162262
Adjusted R-squared0.135795721801004
F-TEST (value)5.8711485027638
F-TEST (DF numerator)5
F-TEST (DF denominator)150
p-value5.51936533799147e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.40758944238227
Sum Squared Residuals297.196205745903


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
122.60012739756854-0.600127397568545
211.87285161740772-0.872851617407716
302.62041140049695-2.62041140049695
432.050822452315360.94917754768464
532.216121202045110.783878797954886
611.74133270002851-0.741332700028511
732.870311329781310.129688670218689
812.08098147322383-1.08098147322383
942.532155542904271.46784445709573
1002.16574591140021-2.16574591140021
1133.22182191108718-0.221821911087177
1222.27641948012504-0.276419480125044
1343.406331482410830.593668517589166
1431.813451113324131.18654888667587
1511.55759346481799-0.557593464817993
1612.53131162144285-1.53131162144285
1722.18005809224787-0.180058092247873
1832.846042294902630.153957705097374
1911.87609432768454-0.87609432768454
2011.85638381919847-0.856383819198472
2121.724709449496360.275290550503643
2232.927118188444940.0728818115550605
2342.966855962219171.03314403778083
2421.854850891925990.145149108074011
2513.00594467113655-2.00594467113655
2623.20001105524447-1.20001105524447
2722.47775354741425-0.47775354741425
2842.924936510786231.07506348921377
2922.89926220872018-0.899262208720176
3032.144778977018920.855221022981077
3132.433174671511920.566825328488078
3232.852000236326320.147999763673682
3342.76633802415361.23366197584640
3421.995420860839100.00457913916090297
3522.08098147322383-0.0809814732238296
3643.242342474438670.75765752556133
3732.019656029121790.980343970878213
3842.301317593921661.69868240607834
3922.84519837344121-0.845198373441206
4053.206313231237421.79368676876258
4132.748337298671870.251662701328128
4212.04083953798721-1.04083953798721
4311.00235034187815-0.00235034187814842
4411.84546145797912-0.845461457979123
4521.954427197842190.0455728021578049
4632.969449607639140.0305503923608648
4793.245929419284755.75407058071525
4801.46802786546773-1.46802786546773
4902.16340097511973-2.16340097511973
5022.81406581684363-0.814065816843627
5121.332462257304480.667537742695522
5232.577857332460400.422142667539595
5312.31329264478771-1.31329264478771
5421.448661591550920.551338408449084
5502.64517404790959-2.64517404790959
5652.710092511215922.28990748878408
5722.52099054690365-0.520990546903648
5843.296406309717640.70359369028236
5931.543651356634801.45634864336520
6003.09466634902540-3.09466634902540
6101.38832944687499-1.38832944687499
6243.252697415573870.747302584426133
6313.78918946285777-2.78918946285777
6412.98473510197399-1.98473510197399
6541.594190128103392.40580987189661
6622.70959282432375-0.709592824323754
6742.79163422505441.20836577494560
6811.91518303660192-0.915183036601915
6942.844698686549041.15530131345096
7021.036225921860390.963774078139615
7152.999176674847432.00082332515257
7242.613231436446581.38676856355342
7342.152546347092371.84745365290763
7442.675474609560241.32452539043976
7542.555648389513521.44435161048648
7632.813221895382210.186778104617794
7732.656028675936950.343971324063053
7832.774545154226080.225454845773921
7921.952056201264580.0479437987354192
8011.07038992973439-0.0703899297343883
8111.29827023499077-0.29827023499077
8253.209623674706241.79037632529376
8342.588434922437951.41156507756205
8422.27015117072809-0.270151170728089
8531.580086715441001.41991328455900
8622.43716577782039-0.437165777820387
8721.833762908490340.166237091509656
8822.43180912307684-0.431809123076842
8923.06222405067023-1.06222405067023
9031.909380547501131.09061945249887
9122.20202386374093-0.202023863740933
9232.277763088478630.722236911521373
9343.141894454823260.858105545176742
9433.35994729807439-0.359947298074392
9532.398455170068260.601544829931735
9601.79093180240399-1.79093180240399
9711.33302967738863-0.333029677388631
9821.441015807204380.558984192795617
9922.65744001748252-0.65744001748252
10032.394368538330020.605631461669977
10143.335116917469760.664883082530237
10243.087864486140280.912135513859718
10312.76084590302608-1.76084590302608
10421.441427774965630.558572225034369
10520.8236710518930651.17632894810694
10632.150675259608830.849324740391165
10732.021527116605320.97847288339468
10832.998304961148220.00169503885177585
10911.72158832494645-0.721588324946446
11011.75001172475536-0.750011724755362
11112.34576880973887-1.34576880973887
11213.10964147538699-2.10964147538699
11301.68643101764633-1.68643101764633
11412.59878986357315-1.59878986357315
11532.530318322016730.469681677983268
11633.05950881952336-0.0595088195233563
11702.99509004310919-2.99509004310919
11821.590913551230580.409086448769424
11952.931170953587192.06882904641281
12022.68123715770683-0.681237157706828
12132.349321887988960.650678112011044
12233.2351963769843-0.235196376984300
12351.716657771746783.28334222825322
12442.770390789295851.22960921070415
12543.123893729341530.876106270658472
12601.54047052739368-1.54047052739368
12732.92303155670670.0769684432933017
12802.81322189538221-2.81322189538221
12922.21699899010253-0.216998990102528
13001.73624723117849-1.73624723117849
13162.92303155670673.0769684432933
13232.780313776730870.219686223269129
13311.41706321465717-0.41706321465717
13462.180402326817133.81959767318287
13522.76992496899968-0.76992496899968
13611.96291082929194-0.96291082929194
13732.995589730001350.00441026999864769
13812.03234787803668-1.03234787803668
13923.33820417542368-1.33820417542368
14042.699737570080721.30026242991928
14112.92895540933248-1.92895540933248
14222.70600587947768-0.706005879477676
14302.67169227143706-2.67169227143706
14452.358522539689472.64147746031053
14522.09171451552428-0.0917145155242786
14611.13923979465797-0.139239794657973
14711.41263234834967-0.412632348349671
14842.277695355286641.72230464471336
14933.22075480411086-0.220754804110862
15002.74019790179138-2.74019790179138
15132.626335475324650.373664524675354
15233.01309076859092-0.0130907685909193
15301.81301915962396-1.81301915962396
15422.59882373016914-0.598823730169140
15553.016333478867741.98366652113226
15622.13267431192519-0.132674311925186


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.8234240773885430.3531518452229130.176575922611457
100.7795588050183980.4408823899632040.220441194981602
110.6690695529090640.6618608941818730.330930447090936
120.5670464128136740.8659071743726520.432953587186326
130.4790198657162550.958039731432510.520980134283745
140.3747561545706110.7495123091412220.625243845429389
150.2877050197896960.5754100395793920.712294980210304
160.3467360427034640.6934720854069290.653263957296536
170.270953208171010.541906416342020.72904679182899
180.2061739825559630.4123479651119260.793826017444037
190.1511275945752100.3022551891504210.84887240542479
200.1111744523983030.2223489047966070.888825547601697
210.1205110460243510.2410220920487020.87948895397565
220.0866829725952140.1733659451904280.913317027404786
230.07218587956100020.1443717591220000.927814120439
240.05661156560293180.1132231312058640.943388434397068
250.09224208311513720.1844841662302740.907757916884863
260.07901472124474040.1580294424894810.92098527875526
270.06084052451975840.1216810490395170.939159475480242
280.0701610262516310.1403220525032620.929838973748369
290.05304310826281180.1060862165256240.946956891737188
300.05667703408679320.1133540681735860.943322965913207
310.04823508415471620.09647016830943250.951764915845284
320.03543390889850670.07086781779701350.964566091101493
330.03836160782563090.07672321565126170.961638392174369
340.02799494126410240.05598988252820480.972005058735898
350.01918433142708020.03836866285416030.98081566857292
360.01515721319552140.03031442639104280.984842786804479
370.01391719025082640.02783438050165280.986082809749174
380.02267547150108250.04535094300216510.977324528498917
390.0182697023964860.0365394047929720.981730297603514
400.02495050614538370.04990101229076750.975049493854616
410.01763490380506220.03526980761012440.982365096194938
420.01434287491638640.02868574983277290.985657125083613
430.009890614703985320.01978122940797060.990109385296015
440.007506627625004990.015013255250010.992493372374995
450.005032721343297130.01006544268659430.994967278656703
460.003314256603173170.006628513206346330.996685743396827
470.2800933986491870.5601867972983730.719906601350813
480.2731143279125380.5462286558250760.726885672087462
490.3190137432875470.6380274865750950.680986256712453
500.2948679267112490.5897358534224980.705132073288751
510.2797539253152520.5595078506305040.720246074684748
520.2507411730732870.5014823461465730.749258826926713
530.2445736892965390.4891473785930790.75542631070346
540.2240776697030870.4481553394061750.775922330296913
550.3431982775513880.6863965551027760.656801722448612
560.4162537384841220.8325074769682430.583746261515878
570.3741676608648890.7483353217297780.625832339135111
580.3363265065809660.6726530131619320.663673493419034
590.3474139741496470.6948279482992930.652586025850353
600.5290185109727930.9419629780544150.470981489027207
610.5222154716123160.9555690567753680.477784528387684
620.4844773902128550.968954780425710.515522609787145
630.6272234913279320.7455530173441370.372776508672069
640.6706990946556750.6586018106886510.329300905344325
650.7498086714041050.500382657191790.250191328595895
660.7192854454245930.5614291091508130.280714554575407
670.7118840754235490.5762318491529010.288115924576451
680.685822660170540.628354679658920.31417733982946
690.6726053475628280.6547893048743440.327394652437172
700.6524468057048550.695106388590290.347553194295145
710.6928008456121820.6143983087756360.307199154387818
720.6894795210648060.6210409578703880.310520478935194
730.7155179030802080.5689641938395830.284482096919792
740.7108912070354440.5782175859291110.289108792964556
750.7121237382969760.5757525234060490.287876261703024
760.6711192680698920.6577614638602160.328880731930108
770.629380140314760.741239719370480.37061985968524
780.5864628351939430.8270743296121150.413537164806057
790.5404124611090370.9191750777819260.459587538890963
800.4936090071913210.9872180143826430.506390992808679
810.4496230485460830.8992460970921660.550376951453917
820.4967508773990500.9935017547981010.503249122600950
830.4998819603016220.9997639206032440.500118039698378
840.4540130427517270.9080260855034540.545986957248273
850.4588314245952880.9176628491905770.541168575404712
860.420489465580420.840978931160840.57951053441958
870.3751060163836930.7502120327673870.624893983616307
880.3398153125833160.6796306251666320.660184687416684
890.3176052707956980.6352105415913950.682394729204302
900.3013755320358610.6027510640717230.698624467964139
910.2621909766408370.5243819532816730.737809023359163
920.2319253353302220.4638506706604440.768074664669778
930.2101346374983600.4202692749967210.78986536250164
940.1786994602479860.3573989204959710.821300539752014
950.1549622153582590.3099244307165170.845037784641741
960.1749491305767660.3498982611535320.825050869423234
970.1458794528367300.2917589056734600.85412054716327
980.1217701553167520.2435403106335030.878229844683248
990.1029148116914590.2058296233829190.89708518830854
1000.0856182087595450.171236417519090.914381791240455
1010.07399696232666010.1479939246533200.92600303767334
1020.06538748444208250.1307749688841650.934612515557917
1030.07841620675914670.1568324135182930.921583793240853
1040.07113559373137350.1422711874627470.928864406268627
1050.06726664722457920.1345332944491580.93273335277542
1060.05620749499186570.1124149899837310.943792505008134
1070.053005539601220.106011079202440.94699446039878
1080.04076427271907690.08152854543815390.959235727280923
1090.03237008668199350.06474017336398690.967629913318007
1100.02636927882873410.05273855765746810.973630721171266
1110.02307680766882200.04615361533764410.976923192331178
1120.03001073630819310.06002147261638620.969989263691807
1130.03253551425369720.06507102850739440.967464485746303
1140.03443319004066530.06886638008133060.965566809959335
1150.02614568331400870.05229136662801730.97385431668599
1160.01930724050010160.03861448100020330.980692759499898
1170.04544272844261750.09088545688523510.954557271557382
1180.03451391066090130.06902782132180260.965486089339099
1190.04176553691712980.08353107383425970.95823446308287
1200.03170783463096320.06341566926192630.968292165369037
1210.02538826236955840.05077652473911680.974611737630442
1220.01815724129294280.03631448258588560.981842758707057
1230.06884807184556440.1376961436911290.931151928154436
1240.0581036167069060.1162072334138120.941896383293094
1250.0481013313938130.0962026627876260.951898668606187
1260.04331846242380620.08663692484761240.956681537576194
1270.03142506096846910.06285012193693820.96857493903153
1280.08711177335255930.1742235467051190.91288822664744
1290.0717388387861840.1434776775723680.928261161213816
1300.1007572771216480.2015145542432950.899242722878352
1310.2206580469815730.4413160939631460.779341953018427
1320.1760065527454570.3520131054909130.823993447254543
1330.1444330567446240.2888661134892470.855566943255377
1340.6481281393481920.7037437213036160.351871860651808
1350.5784497983437330.8431004033125330.421550201656267
1360.5043237131309480.9913525737381040.495676286869052
1370.4239221804177310.8478443608354620.576077819582269
1380.4546731543625460.9093463087250930.545326845637454
1390.3774776686169220.7549553372338440.622522331383078
1400.4385417860888080.8770835721776160.561458213911192
1410.5824362387783610.8351275224432780.417563761221639
1420.5220754263106230.9558491473787540.477924573689377
1430.6052576125515430.7894847748969150.394742387448458
1440.5046891827434590.9906216345130820.495310817256541
1450.3789415102940710.7578830205881420.621058489705929
1460.432917191836450.86583438367290.56708280816355
1470.3397342618224370.6794685236448740.660265738177563


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00719424460431655OK
5% type I error level150.107913669064748NOK
10% type I error level340.244604316546763NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/10in6a1291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/10in6a1291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/1um9z1291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/1um9z1291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/2um9z1291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/2um9z1291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/3me921291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/3me921291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/4me921291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/4me921291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/5me921291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/5me921291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/6xn841291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/6xn841291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/7qe781291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/7qe781291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/8qe781291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/8qe781291224693.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/9in6a1291224693.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291224596nni4yngi7iif5la/9in6a1291224693.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