Home » date » 2010 » Nov » 20 »

*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: Sat, 20 Nov 2010 13:09:49 +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/20/t1290258639rvxia5u73iteyd8.htm/, Retrieved Sat, 20 Nov 2010 14:10:50 +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/20/t1290258639rvxia5u73iteyd8.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 «
38 23 10 11 35 37 12 36 15 10 11 35 37 12 23 25 10 11 35 37 12 30 18 10 11 35 37 12 26 21 10 11 35 37 12 26 19 10 11 35 37 12 30 15 13 12 38 34 12 27 22 10 11 35 37 12 34 19 10 11 35 37 14 28 20 13 9 34 32 12 36 26 10 11 35 37 12 42 26 10 11 35 37 12 31 21 10 11 35 37 14 26 19 10 11 35 37 12 16 19 13 12 38 34 12 23 19 10 11 35 37 14 45 28 10 11 35 37 12 30 27 10 11 35 37 15 45 18 10 11 35 37 12 30 19 10 11 35 37 15 24 24 10 11 35 37 12 29 21 13 12 38 34 12 30 22 13 9 34 32 12 31 25 10 11 35 37 14 34 15 10 11 35 37 14 41 34 10 11 35 37 12 37 23 10 11 35 37 12 33 19 10 11 35 37 12 48 15 10 11 35 37 14 44 15 10 11 35 37 15 29 17 10 11 35 37 14 44 30 13 9 34 32 12 43 28 10 11 35 37 14 31 23 10 11 35 37 14 28 23 10 11 35 37 12 26 21 10 11 35 37 14 30 18 10 11 35 37 12 27 19 15 11 33 36 12 34 24 10 11 35 37 12 47 15 10 11 35 37 12 37 24 13 16 34 36 12 27 20 10 11 35 37 12 30 20 10 11 35 37 12 36 44 10 11 35 37 14 39 20 10 11 35 37 12 32 20 10 11 35 37 12 25 20 10 11 35 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
happiness[t] = + 32.7257088461299 -0.00116875052912139`CM+D`[t] -0.000623856008098606`PE+PC`[t] + 0.257591438280578depression[t] + 0.0551379081268023connected[t] -0.729313863506522separated[t] -0.0312671114293483populariteit[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.72570884612991.93469316.915200
`CM+D`-0.001168750529121390.00651-0.17950.8578350.428917
`PE+PC`-0.0006238560080986060.008262-0.07550.9399390.46997
depression0.2575914382805780.0344347.480700
connected0.05513790812680230.0471941.16830.2450130.122507
separated-0.7293138635065220.028519-25.57300
populariteit-0.03126711142934830.041816-0.74770.45610.22805


Multiple Linear Regression - Regression Statistics
Multiple R0.9302787057485
R-squared0.865418470369105
Adjusted R-squared0.85863284702637
F-TEST (value)127.537062795529
F-TEST (DF numerator)6
F-TEST (DF denominator)119
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.491563435503502
Sum Squared Residuals28.7545187237566


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.0704619564674-0.0704619564673938
21010.0777903055909-0.0777903055909233
31010.0867455023885-0.086745502388514
41010.0829312407414-0.0829312407413582
51010.0857346748335-0.0857346748335431
61010.0869823868497-0.0869823868497424
71312.69574956194620.304250438053798
81010.0839420682963-0.0839420682963243
91010.0150981597581-0.0150981597580739
101313.1602695626281-0.160269562628054
111010.0709278895018-0.0709278895018374
121010.0639153863271-0.0639153863271092
131010.0173566993292-0.0173566993292408
141010.0869823868497-0.0869823868497414
151312.70961664532150.290383354678493
161010.0279544155784-0.027954415578409
171010.0591614227235-0.0591614227235479
18109.983515202380420.0164847976195778
191010.0653999828045-0.0653999828045337
20109.988506050445210.011493949554789
211010.0862006078675-0.0862006078674913
221312.69317517642670.306824823573268
231313.1566843495536-0.156684349553614
241010.0148612752968-0.0148612752968464
251010.0175935837905-0.0175935837904685
261010.0600932887914-0.0600932887914417
271010.0716307069970-0.0716307069970119
281010.0788011331459-0.0788011331458917
291010.0012310763828-0.00123107638276915
30109.97463896706990.0253610329300939
311010.0221896244199-0.022189624419878
321313.1353309940811-0.135330994081126
33109.99896470092310.00103529907690594
341010.0161089873130-0.0161089873130436
351010.0821494617591-0.0821494617591044
361010.0232004519748-0.0232004519748476
371010.0829312407414-0.0829312407413545
381510.70485168357354.29514831642646
391010.0745131025763-0.0745131025762774
401010.0649340497706-0.064934049770587
411312.03313999777150.966860002228478
421010.0851897803125-0.0851897803125216
431010.0816835287252-0.0816835287251572
44109.997164258497370.00283574150263418
451010.0711647739631-0.071164773963065
461010.0793460276669-0.0793460276669146
471010.0875272813708-0.0875272813707642
481010.1001544886184-0.100154488618380
491010.0822284232462-0.0822284232461802
501313.1619832076782-0.161983207678198
511312.69208538738470.307914612615313
521010.0798909221879-0.0798909221879374
53109.988585011932290.0114149880677129
541010.0717886299712-0.0717886299711634
551010.0833971737753-0.0833971737753014
561010.0935289569905-0.0935289569905232
571010.0811386342041-0.0811386342041346
581010.0127606586998-0.0127606586998311
591010.0865164538158-0.0865164538157945
601010.0686693499307-0.0686693499306705
611010.0752159200715-0.075215920071452
621010.0781772771378-0.0781772771377933
631010.0858136363206-0.08581363632062
641010.0763057091135-0.0763057091134973
651010.0817624902122-0.0817624902122332
661010.0092544071125-0.00925440711246686
671010.0090964841383-0.00909648413831532
68109.995518553619940.00448144638006073
691312.69122464691540.30877535308464
701312.68881602025850.31118397974145
711010.0149402367839-0.0149402367839222
721312.69395695540900.306043044591017
731312.69567060045910.304329399540874
741010.0637574633530-0.0637574633529576
751010.0062140885590-0.00621408855904971
761010.1029579227106-0.102957922710569
771313.1651814492058-0.165181449205767
781313.1549707045035-0.154970704503469
791010.0833971737753-0.0833971737753014
80109.998182921940840.00181707805915638
811010.0599432017058-0.0599432017057981
821010.0614199622947-0.0614199622947148
831113.1380364364821-2.13803643648213
84109.981256662809250.0187433371907447
851010.0772375751814-0.0772375751813913
861010.0103441961545-0.0103441961545127
87109.979858863707420.0201411362925855
881010.0847238472786-0.0847238472785746
891010.0763057091135-0.0763057091134973
901313.1580110230569-0.158011023056887
91109.99902480520730.000975194792696533
921010.0071459546269-0.00714595462694355
931010.0111971007353-0.0111971007353305
941010.0998386426701-0.0998386426700767
951313.1606565341749-0.160656534174925
961010.0871403098239-0.0871403098238931
971010.0686693499307-0.0686693499306705
981313.1617541591055-0.161754159105478
991010.0756107275068-0.075610727506831
1001010.0881511373789-0.0881511373788627
1011010.0090175226512-0.00901752265123949
1021010.0323214076351-0.0323214076350992
1031010.0742840540036-0.074284054003558
1041010.0148612752968-0.0148612752968464
1051010.0936079184776-0.0936079184775984
1061010.0186044113454-0.018604411345438
1071313.1583979946038-0.158397994603758
1081313.1386871585828-0.138687158582846
109109.993725947082720.00627405291728074
1101313.1651024877187-0.165102487718691
1111213.1894170945533-1.18941709455326
112109.986634482420910.0133655175790848
1131312.04903657214530.950963427854726
1141514.90249688280710.097503117192856
115109.963559646009780.0364403539902252
1161010.0796618736152-0.079661873615218
1171312.68296443172440.317035568275565
1181312.02815698559520.97184301440476
1191010.0215657684118-0.0215657684117795
1201010.0869034253627-0.0869034253626654
1211010.0791881046928-0.0791881046927629
122109.960121334595130.0398786654048715
1231010.0002913744264-0.000291374426367053
1241010.0724046500908-0.0724046500907541
1251010.0727204960391-0.0727204960390575
1261010.0524569296086-0.0524569296086148


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
108.83013093180728e-431.76602618636146e-421
111.08465622154546e-582.16931244309092e-581
121.09659168800411e-692.19318337600821e-691
132.98455877552724e-795.96911755105449e-791
145.10804753786775e-951.02160950757355e-941
155.99434363674468e-1101.19886872734894e-1091
165.66025037969224e-1321.13205007593845e-1311
172.01321513114805e-1484.0264302622961e-1481
181.54733406108098e-1483.09466812216196e-1481
191.03139027202500e-1572.06278054405000e-1571
203.88378685574442e-1797.76757371148885e-1791
212.79428443935583e-1835.58856887871167e-1831
221.16892314522556e-1962.33784629045111e-1961
231.81249244387596e-2113.62498488775193e-2111
242.69161520820935e-2305.3832304164187e-2301
255.91256365877058e-2501.18251273175412e-2491
261.87431952670911e-2503.74863905341822e-2501
272.8844229536109e-2585.7688459072218e-2581
289.10235168140344e-2761.82047033628069e-2751
291.09847985134083e-2902.19695970268167e-2901
303.55917581701102e-3027.11835163402204e-3021
312.28196275643009e-3054.56392551286019e-3051
329.82839848615533e-3191.96567969723107e-3181
33001
34001
35001
36001
37001
38001
39001
40001
410.9999999245073011.50985397448662e-077.5492698724331e-08
420.999999857506472.84987058412926e-071.42493529206463e-07
430.99999972357135.52857401190861e-072.76428700595431e-07
440.9999995664325928.67134815165369e-074.33567407582685e-07
450.9999991434738121.71305237614954e-068.56526188074769e-07
460.9999983732374833.25352503334584e-061.62676251667292e-06
470.9999971178495375.76430092619818e-062.88215046309909e-06
480.9999956030418198.79391636256788e-064.39695818128394e-06
490.9999919875940951.60248118104190e-058.01240590520948e-06
500.9999891783186492.16433627028353e-051.08216813514177e-05
510.9999860057718792.79884562428831e-051.39942281214415e-05
520.9999751276100844.97447798321957e-052.48723899160979e-05
530.9999560519899488.7896020104203e-054.39480100521015e-05
540.9999243439305880.0001513121388229327.56560694114658e-05
550.9998730981935640.0002538036128718950.000126901806435947
560.9997983187923440.0004033624153115430.000201681207655772
570.9996702534600220.0006594930799560610.000329746539978030
580.9994641766997840.001071646600432540.000535823300216271
590.9991621041490330.001675791701933310.000837895850966655
600.9986875813946030.002624837210793450.00131241860539672
610.9979770856086480.004045828782703190.00202291439135159
620.9969372436361440.006125512727711620.00306275636385581
630.9954727076087160.009054584782569030.00452729239128451
640.9933378113065460.01332437738690740.00666218869345368
650.9904137451162940.01917250976741170.00958625488370583
660.986365016382950.02726996723409940.0136349836170497
670.9808677460183810.03826450796323720.0191322539816186
680.9736986441785890.05260271164282260.0263013558214113
690.9693731987659570.06125360246808690.0306268012340434
700.9622232586993570.07555348260128650.0377767413006432
710.9494132223647530.1011735552704940.050586777635247
720.941134475546960.1177310489060790.0588655244530397
730.9414922340138140.1170155319723730.0585077659861863
740.9240479845225710.1519040309548570.0759520154774286
750.9024514956169860.1950970087660290.0975485043830144
760.8797900611260950.2404198777478090.120209938873905
770.8586654739749130.2826690520501750.141334526025087
780.8293806121395580.3412387757208830.170619387860442
790.7914981755083630.4170036489832740.208501824491637
800.749999149635790.5000017007284190.250000850364210
810.7068728915278780.5862542169442430.293127108472122
820.6590743786124280.6818512427751440.340925621387572
830.9999973753048455.24939030904417e-062.62469515452208e-06
840.9999943965027261.12069945487489e-055.60349727437443e-06
850.9999883002587482.33994825040600e-051.16997412520300e-05
860.9999761597100044.76805799912004e-052.38402899956002e-05
870.9999525472026279.4905594745477e-054.74527973727385e-05
880.9999072521574870.0001854956850264129.2747842513206e-05
890.9998224296860860.0003551406278269880.000177570313913494
900.9996831279116350.0006337441767300430.000316872088365022
910.9994204478929730.001159104214053750.000579552107026875
920.99895073132430.002098537351400140.00104926867570007
930.9981339744173080.003732051165383730.00186602558269186
940.996844618381840.006310763236320360.00315538161816018
950.9950417580508630.00991648389827490.00495824194913745
960.9917561874962360.01648762500752790.00824381250376395
970.986823575362970.02635284927405800.0131764246370290
980.9799265819896470.04014683602070570.0200734180103529
990.9699974793492750.06000504130145050.0300025206507252
1000.9543545479140650.09129090417187010.0456454520859351
1010.9325156233045310.1349687533909380.0674843766954688
1020.9026742183274540.1946515633450910.0973257816725456
1030.8676342521407910.2647314957184180.132365747859209
1040.8178116016599460.3643767966801080.182188398340054
1050.7568049094870020.4863901810259970.243195090512998
1060.6842070708417130.6315858583165750.315792929158287
1070.6220935471657820.7558129056684360.377906452834218
1080.532957161468890.934085677062220.46704283853111
1090.4403382974221170.8806765948442340.559661702577883
1100.4388125683357970.8776251366715930.561187431664203
11113.72951415095656e-1091.86475707547828e-109
11214.03736646539224e-1042.01868323269612e-104
11312.09856276210415e-901.04928138105207e-90
11416.31932594813159e-723.15966297406580e-72
11512.32062277524296e-561.16031138762148e-56
11617.37155670038881e-463.68577835019441e-46


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level730.682242990654206NOK
5% type I error level800.747663551401869NOK
10% type I error level850.794392523364486NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/10vnj31290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/10vnj31290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/1o43q1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/1o43q1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/2o43q1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/2o43q1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/3hv3b1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/3hv3b1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/4hv3b1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/4hv3b1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/5hv3b1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/5hv3b1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/6s42e1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/6s42e1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/72e1h1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/72e1h1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/82e1h1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/82e1h1290258579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/92e1h1290258579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290258639rvxia5u73iteyd8/92e1h1290258579.ps (open in new window)


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