Home » date » 2010 » Dec » 05 »

Paper: Multiple Linear Regression + happiness

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 05 Dec 2010 13:52:33 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut.htm/, Retrieved Sun, 05 Dec 2010 14:51:33 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut.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 13 0 12 8 13 5 18 0 15 12 16 6 13 12 12 7 12 6 17 10 10 10 11 5 13 12 12 7 12 3 17 0 9 11 11 4 13 12 12 14 14 4 13 0 11 6 9 4 18 0 11 16 14 6 13 0 11 11 12 6 13 15 15 16 11 5 13 7 7 12 12 4 13 11 11 7 13 6 14 0 11 13 11 4 13 10 10 11 12 6 17 0 14 15 16 6 14 10 10 7 9 4 12 6 6 9 11 4 13 11 11 7 13 2 17 15 15 14 15 7 13 14 14 15 13 6 13 0 9 15 15 7 13 13 13 14 14 5 14 16 16 8 14 4 13 13 13 8 8 4 12 0 12 14 13 7 16 0 14 14 15 7 14 11 11 8 13 4 17 9 9 11 11 4 13 16 16 16 15 6 14 12 12 10 15 6 16 0 10 8 9 5 14 13 13 14 13 6 13 16 16 16 16 7 11 14 14 13 13 6 12 0 5 8 12 3 13 8 8 10 12 4 15 11 11 8 12 6 13 16 16 13 14 7 13 17 17 15 14 5 13 9 9 6 8 4 14 9 9 12 13 5 11 13 13 16 16 6 14 0 6 15 11 6 14 12 12 12 14 5 13 8 8 8 13 4 13 0 14 13 13 5 13 12 12 14 13 5 13 11 11 12 12 4 13 16 16 16 16 6 13 8 8 10 15 2 13 15 15 15 15 8 14 7 7 8 12 3 13 0 16 16 14 6 10 14 14 19 12 6 15 9 9 6 12 5 13 14 14 13 13 5 13 11 11 15 12 6 16 0 15 13 13 6 13 15 15 14 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 1.14960641266419 + 0.145704706690706`Pop*geslacht`[t] + 0.192348397617101KnowingPeople[t] + 0.307797941811503Liked[t] + 0.626424739881038Celebrity[t] -0.0149836217025702Happiness[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.149606412664192.0104450.57180.5685070.284253
`Pop*geslacht`0.1457047066907060.033544.34422.9e-051.5e-05
KnowingPeople0.1923483976171010.068182.82120.0055940.002797
Liked0.3077979418115030.1019323.01960.0030880.001544
Celebrity0.6264247398810380.156743.99660.0001115.5e-05
Happiness-0.01498362170257020.114996-0.13030.8965480.448274


Multiple Linear Regression - Regression Statistics
Multiple R0.745527854553803
R-squared0.555811781915597
Adjusted R-squared0.537456896870787
F-TEST (value)30.2814090395383
F-TEST (DF numerator)5
F-TEST (DF denominator)121
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.91674864098073
Sum Squared Residuals444.54496767688


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.42250554734201.57749445265797
2129.552185345909462.44781465409054
31511.94631561020633.05368438979374
41211.44190384835290.558096151647064
51010.8532514329406-0.85325143294057
6129.562629628709822.43737037129018
798.962128023769570.0378719762304292
81212.2110235223439-0.211023522343855
9117.309872043548213.69012795645179
101112.1001133170517-1.10011331705166
111110.52277544534310.477224554656852
121512.73586535209672.26413464790329
13710.4822073100331-3.48220731003312
141111.6489479485814-0.648947948581443
15119.346824819003771.65317518099623
161011.9198880254399-1.91988802543993
171412.5083771813551.49162281864501
18109.04916923828780.950830761712207
1969.4516594686796-3.45165946867961
20119.098298123949581.90170187605042
211514.83520980387060.164790196129411
221413.63983287129290.360167128707059
23912.8419876011271-3.8419876011271
241312.96816934721300.0318306527869711
251611.63975196340414.36024803659593
26139.370833814165513.62916618583449
271211.98909245477930.0109075452207191
281412.63465558180741.36534441819257
291110.54349600132880.456503998671241
30910.2734703839859-1.27347038398593
311614.72420294421191.27579705578811
321212.9573264883413-0.957326488341318
33108.380928065473731.61907193452627
341313.3017797669851-0.301779766985134
351615.70337649101210.296623508987860
361413.27011969776130.72988030223869
3758.06645603284873-3.06645603284873
38810.2132479780845-2.21324797808448
391111.5484820260896-0.548482026089612
401614.48076817113271.51923182886731
411713.75832019329553.24167980670447
4298.373350948763340.626649051236658
43911.7378066485122-2.73780664851221
441314.5948867659513-1.59488676595127
45610.9693874722975-4.96938747229748
461212.4527514669907-0.452751466990691
47810.1663163680669-2.16631636806692
481410.58884544250783.41115455749218
491212.5296503204134-0.52965032041339
501111.0650261367959-0.0650261367959418
511615.04698450772600.953015492274038
5289.91375956716205-1.91375956716205
531515.6389993196662-0.638999319666158
5479.08638897968368-2.08638897968368
551612.14506418215943.85493581784063
561414.0714612765447-0.0714612765447031
57910.2459510775930-1.24595107759296
581412.62871133617771.3712886638223
591112.8499699443016-1.84996994430161
601511.21527018238893.78472981761115
611512.96676444048552.03323555951449
621312.4830066294870.516993370513005
631112.1146983626829-1.11469836268288
641112.6388103472520-1.63881034725196
651212.7713782650602-0.771378265060225
661213.3484234579115-1.34842345791153
671212.2218523786019-0.221852378601888
681212.3373019227963-0.337301922796289
691411.34834255002272.65165744997734
7067.62176479606623-1.62176479606623
7179.52046532194761-2.52046532194761
721414.1785299014932-0.178529901493247
731011.3533977723692-1.35339777236917
74137.459443596592295.54055640340771
751212.4635803232487-0.463580323248723
7699.32869276251284-0.328692762512839
771210.77479366578891.22520633421109
781615.59235562873980.407644371260238
791010.3422762372539-0.342276237253932
801613.34213394055572.6578660594443
811513.97788597560071.02211402439925
82108.385082830918271.61491716908173
8388.37919854002656-0.379198540026565
841112.9995414973457-1.99954149734569
851312.72473457413380.275265425866169
861615.83579040181900.164209598181039
871415.5335521321795-1.53355213217952
88910.2626415277279-1.26264152772789
89810.1574682567187-2.15746825671874
90811.0042278927122-3.00422789271217
911112.2321286517871-1.23212865178713
921213.9748481977926-1.97484819779257
931413.84076471627660.159235283723396
941514.75831095044790.241689049552111
951614.04669182886881.95330817113125
961614.04669182886881.95330817113125
971112.7347229282279-1.73472292822791
981413.94763081310440.0523691868955562
991411.50214025686812.49785974313194
1001211.51852878529810.48147121470185
1011313.7719588630086-0.771958863008597
102129.550204600999612.44979539900039
1031615.91513719225380.0848628077461647
1041213.3484234579115-1.34842345791153
1051111.8923827216606-0.892382721660642
10646.42861926976637-2.42861926976637
1071615.91513719225380.0848628077461647
1081011.3361687417751-1.33616874177513
1091313.3403304577568-0.340330457756836
1101413.94763081310440.0523691868955562
111710.0031801026615-3.00318010266147
1121212.8374482622249-0.837448262224893
1131210.53946589547811.46053410452192
1141313.6095777087966-0.609577708796637
1151513.21878266093131.78121733906873
1161211.13383199006390.866168009936052
1171010.941181670742-0.941181670742004
118811.1005390497595-3.10053904975946
1191013.6726099281531-3.67260992815312
1201514.24073305230450.75926694769546
1211615.22264245520810.77735754479187
1221313.5435077116320-0.54350771163197
1231615.48106084998990.518939150010101
124910.1516206654555-1.15162066545551
1251413.67838356206460.321616437935357
1261413.13968653186430.860313468135663
1271210.38112884973051.61887115026952


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.3712108454378710.7424216908757420.628789154562129
100.238091779461750.47618355892350.76190822053825
110.1377101564865700.2754203129731400.86228984351343
120.4514119212985730.9028238425971470.548588078701426
130.758969020591160.4820619588176790.241030979408840
140.6700341256830650.659931748633870.329965874316935
150.6109902188494330.7780195623011340.389009781150567
160.7314551010397020.5370897979205960.268544898960298
170.6620095962091720.6759808075816560.337990403790828
180.6132988423954070.7734023152091870.386701157604593
190.7983277159305520.4033445681388970.201672284069448
200.7525313777064260.4949372445871480.247468622293574
210.6990864754122430.6018270491755130.300913524587757
220.6365186340101630.7269627319796740.363481365989837
230.7946904028270030.4106191943459940.205309597172997
240.7403593876082040.5192812247835930.259640612391797
250.8663353771046980.2673292457906030.133664622895302
260.9259122044067510.1481755911864970.0740877955932486
270.9016825895483160.1966348209033690.0983174104516844
280.8930841144615840.2138317710768310.106915885538416
290.875208664581390.2495826708372210.124791335418610
300.8672044450208640.2655911099582710.132795554979136
310.8454284948273830.3091430103452330.154571505172617
320.8307107386697010.3385785226605970.169289261330299
330.8125470072427650.374905985514470.187452992757235
340.7691574734115440.4616850531769110.230842526588456
350.7278086579673520.5443826840652970.272191342032648
360.682261489033260.6354770219334810.317738510966740
370.7935293168226430.4129413663547130.206470683177357
380.8241023734165320.3517952531669360.175897626583468
390.7904125446844590.4191749106310820.209587455315541
400.768958171786430.462083656427140.23104182821357
410.8189923880786250.362015223842750.181007611921375
420.788636138320770.4227277233584610.211363861679230
430.8260882963000980.3478234073998050.173911703699902
440.8240330043541490.3519339912917030.175966995645851
450.955303379560340.08939324087932110.0446966204396606
460.9425580983773410.1148838032453180.0574419016226591
470.9481986159157760.1036027681684490.0518013840842243
480.9728253693295580.0543492613408830.0271746306704415
490.9643114401449640.0713771197100730.0356885598550365
500.952599289624390.09480142075121930.0474007103756096
510.9406553156949830.1186893686100350.0593446843050174
520.941866462563090.1162670748738180.0581335374369091
530.9277501813580130.1444996372839730.0722498186419865
540.930127065370.1397458692600010.0698729346300005
550.9688499296353070.06230014072938550.0311500703646928
560.9587168166166150.08256636676677070.0412831833833854
570.9507546590711770.09849068185764550.0492453409288228
580.9435608940267630.1128782119464750.0564391059732374
590.9426590856543530.1146818286912950.0573409143456475
600.9729839513173170.0540320973653670.0270160486826835
610.9741081602919890.05178367941602190.0258918397080110
620.96599031215870.06801937568259820.0340096878412991
630.9588106925373980.08237861492520430.0411893074626021
640.9590178302987320.08196433940253570.0409821697012678
650.9480356624111590.1039286751776820.051964337588841
660.9404024254476510.1191951491046970.0595975745523486
670.9231669652283490.1536660695433020.076833034771651
680.902610601172030.1947787976559400.0973893988279698
690.9284631819612210.1430736360775580.0715368180387788
700.9202929193820430.1594141612359140.079707080617957
710.9325596484890050.134880703021990.067440351510995
720.913261515219530.1734769695609400.0867384847804701
730.9014748343951820.1970503312096360.098525165604818
740.9924300007898580.01513999842028310.00756999921014154
750.9891470702436470.02170585951270590.0108529297563529
760.9856140100929170.02877197981416660.0143859899070833
770.9840094552853030.03198108942939470.0159905447146974
780.9779662141274570.04406757174508560.0220337858725428
790.9695784082033670.06084318359326530.0304215917966327
800.9820636579417820.03587268411643630.0179363420582182
810.9766161347721230.0467677304557540.023383865227877
820.9852822232245460.02943555355090790.0147177767754539
830.9800529388413170.03989412231736610.0199470611586830
840.981412273057120.037175453885760.01858772694288
850.9740229546676820.05195409066463580.0259770453323179
860.9637801059515820.0724397880968350.0362198940484175
870.9612835550421160.07743288991576780.0387164449578839
880.9542177513828250.09156449723434930.0457822486171746
890.9480048240348390.1039903519303230.0519951759651614
900.9819754457449540.03604910851009260.0180245542550463
910.9754480746312780.04910385073744370.0245519253687218
920.9739736915741830.05205261685163470.0260263084258173
930.9638243918454020.07235121630919520.0361756081545976
940.9486979751037110.1026040497925770.0513020248962887
950.945434153436570.1091316931268600.0545658465634298
960.9438924884764070.1122150230471850.0561075115235925
970.928069914902760.143860170194480.07193008509724
980.9010546984794180.1978906030411630.0989453015205817
990.9237222179791770.1525555640416470.0762777820208234
1000.8965195924523320.2069608150953360.103480407547668
1010.8609028091613140.2781943816773710.139097190838686
1020.9644610460886960.07107790782260810.0355389539113041
1030.946331780102950.1073364397940990.0536682198970494
1040.9362557988685420.1274884022629150.0637442011314577
1050.9072449397576460.1855101204847080.0927550602423538
1060.8779678461111070.2440643077777860.122032153888893
1070.8296831415374330.3406337169251350.170316858462567
1080.7716522024426910.4566955951146180.228347797557309
1090.6981497930193420.6037004139613170.301850206980659
1100.6163504441835990.7672991116328010.383649555816401
1110.7325157507176560.5349684985646870.267484249282344
1120.6880870311024240.6238259377951520.311912968897576
11311.75138639950101e-1248.75693199750507e-125
11411.72852499221003e-1078.64262496105017e-108
11512.70034242475026e-931.35017121237513e-93
11612.29470327577666e-811.14735163788833e-81
11717.15218084853774e-643.57609042426887e-64
11813.30868351578948e-491.65434175789474e-49


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level60.0545454545454545NOK
5% type I error level180.163636363636364NOK
10% type I error level380.345454545454545NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/10pbal1291557143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/10pbal1291557143.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/4gm2j1291557143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/4gm2j1291557143.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/54sug1291557143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/54sug1291557143.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/64sug1291557143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/64sug1291557143.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/7fkt11291557143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291557092egywkg02ait4cut/7fkt11291557143.ps (open in new window)


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


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


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by