Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationThu, 24 Nov 2011 10:25:02 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Nov/24/t1322148309cyiv4dv7dt6qd8d.htm/, Retrieved Fri, 29 Mar 2024 05:58:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=146967, Retrieved Fri, 29 Mar 2024 05:58:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact70
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Competence to learn] [2010-11-17 07:43:53] [b98453cac15ba1066b407e146608df68]
-    D    [Multiple Regression] [] [2011-11-24 15:25:02] [abd09a04ddc145afbf81a913bd861ab8] [Current]
Feedback Forum

Post a new message
Dataseries X:
888	63031	51	256	68	0	13	5	20	20	10345	3010	10823	13	13
546	66751	25	160	17	0	26	7	28	21	17607	4344	44480	27	24
186	7176	17	70	1	0	0	0	0	0	1423	603	1929	0	0
1405	78306	66	360	114	0	37	12	40	28	20050	6792	30032	37	37
2047	137944	85	721	95	0	47	15	60	59	21212	7843	27669	39	38
3626	261308	130	938	148	1	80	16	60	58	93979	13738	114967	99	96
845	69266	36	287	56	0	21	12	44	36	15524	4120	29951	21	21
663	83529	33	154	28	0	36	15	60	58	16182	4174	38824	33	33
1181	73226	33	311	63	0	35	15	60	29	19238	6202	26517	36	35
1836	178519	65	617	96	1	40	13	52	48	28909	8535	63570	44	40
855	66476	35	262	74	1	35	6	24	24	22357	5818	27131	33	33
1245	98606	46	385	65	0	46	16	64	44	25560	9834	41061	47	47
993	50001	69	369	40	0	20	7	26	16	9954	4145	18810	19	19
1685	91093	61	558	173	4	24	12	48	46	18490	4719	27582	41	40
742	73884	25	220	28	3	19	9	36	35	17777	3981	37026	22	22
868	72961	41	315	55	3	15	10	40	35	25268	3264	24252	17	17
949	69388	34	229	58	0	48	16	64	63	37525	11276	32579	46	46
332	15629	21	88	25	4	0	5	20	15	6023	1	0	0	0
1602	71693	54	494	103	0	38	20	79	62	25042	9480	29666	31	31
525	19920	17	155	29	0	12	7	16	12	35713	1953	7533	20	20
629	39403	38	234	31	0	10	13	52	33	7039	1801	11892	10	10
1279	99933	51	361	43	0	51	13	52	44	40841	7352	51557	55	55
767	56088	28	280	74	0	4	11	44	29	9214	761	5737	6	6
1156	62006	32	331	99	1	24	9	29	26	17446	1147	11203	17	17
1120	81665	51	378	25	1	39	10	40	31	10295	3536	28714	33	33
622	65223	12	227	69	0	19	7	28	22	13206	3146	24268	33	33
1203	88794	98	396	62	0	23	13	49	46	26093	6764	30749	32	32
745	90642	53	179	25	0	39	15	60	39	20744	7038	46643	37	36
1535	203699	61	509	38	0	37	13	52	45	68013	8298	64530	44	39
1234	99340	25	504	57	0	20	7	28	23	12840	5718	35346	22	22
757	56695	28	225	52	0	20	14	56	41	12672	2493	5766	15	15
1087	108143	23	366	91	2	41	11	35	32	10872	4226	29217	18	18
1105	58313	60	341	48	4	26	3	12	12	21325	3553	15912	25	24
592	29101	40	171	52	0	0	8	32	18	24542	58	3728	7	7
1305	113060	29	437	35	1	31	12	48	41	16401	4425	37494	35	34
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
706	65773	34	313	31	0	8	12	48	32	12821	3705	13214	14	7
1188	67047	34	366	107	3	35	8	31	24	14662	4968	19576	31	31
1111	41953	22	232	242	4	3	20	64	54	22190	2320	13632	9	9
1094	109835	35	389	41	0	47	18	72	71	37929	9820	67378	59	52
1087	86584	35	349	57	1	42	9	36	32	18009	3606	29387	62	60
748	59588	26	316	32	0	11	14	56	53	11076	3987	15936	12	11
404	40064	12	140	17	2	10	7	28	24	24981	2138	18156	23	20
1076	70227	45	419	36	1	26	13	52	35	30691	2299	23750	31	31
673	60437	29	226	29	1	27	11	44	42	29164	3308	15559	57	56
517	47000	36	161	22	2	0	11	44	33	13985	4721	21713	23	23
354	40295	13	103	21	1	15	14	55	30	7588	1369	12023	14	14
1011	103397	54	356	41	0	32	9	36	36	20023	4118	23588	31	30
891	78982	40	293	64	1	13	12	48	48	25524	5396	28661	17	17
1067	60206	28	414	71	0	24	11	44	31	14717	3704	16874	24	24
518	39887	21	156	28	0	10	17	66	34	6832	1801	11804	11	11
697	49791	36	189	36	0	14	10	40	30	9624	3814	12949	16	16
1095	129283	44	442	45	0	24	11	44	43	24300	5010	38340	32	30
928	104816	44	321	22	0	29	12	48	41	21790	5369	36573	36	35
1008	101395	33	367	27	1	40	17	68	66	16493	3952	40068	37	37
951	72824	30	309	38	3	22	6	24	20	9269	3264	25561	25	25
779	76018	27	235	26	0	27	8	32	23	20105	4177	31287	30	30
439	33891	12	137	41	0	8	12	44	30	11216	2352	8383	10	9
580	63694	39	198	21	0	27	13	52	49	15569	5624	29178	16	16
614	28266	24	220	28	4	0	14	56	37	21799	176	1237	3	3
500	35093	22	149	36	0	0	17	68	61	3772	2356	10241	0	0
824	35252	35	306	58	0	17	8	32	25	6057	1700	8219	17	19
541	36977	20	178	65	4	7	9	34	28	20828	1262	9348	9	9
475	42406	18	145	29	3	18	9	36	25	9976	2766	25242	22	18
434	56353	13	144	21	0	7	9	34	29	14055	2536	24267	5	5
818	58817	23	270	19	0	24	15	56	53	17455	4931	25902	23	22
1173	76053	43	301	55	4	18	16	64	55	39553	9606	51849	16	16
1720	70872	49	501	119	2	39	13	52	33	14818	4097	29065	53	53
549	42372	20	153	34	0	17	12	48	37	17065	4537	22417	23	23
157	19144	12	40	25	0	0	10	40	27	1536	516	1714	0	0
1594	114177	73	500	113	2	39	9	36	26	11938	2643	29085	51	50
622	53544	26	199	46	0	20	3	10	2	24589	1277	22118	25	25
656	51379	33	242	28	1	29	12	48	46	21332	3230	14803	51	48
920	40756	39	265	63	0	27	8	25	15	13229	3356	13243	46	46
847	46956	22	298	52	0	23	17	68	63	11331	2204	13985	16	16
497	17799	20	141	35	1	0	9	36	28	853	342	657	0	0
864	71154	30	234	32	0	31	8	32	24	19821	6783	26171	25	25
994	58305	38	336	45	0	19	9	36	31	34666	4213	34867	34	33
443	27454	16	124	42	0	12	12	43	25	15051	2822	12297	14	14
615	34323	34	241	28	0	23	5	17	7	27969	5199	17487	32	30
525	44761	33	127	32	0	33	14	52	35	17897	4780	13461	24	23
899	113862	27	327	32	0	21	14	56	42	6031	2341	15192	16	16
556	35027	16	175	27	0	17	10	40	10	7153	1825	16584	19	19
896	62396	22	331	69	0	27	12	48	33	13365	4653	22892	27	27
515	29613	25	176	30	0	14	10	40	28	11197	1524	7081	24	24
894	65559	28	281	48	0	12	12	48	25	25291	2685	21623	12	12
1336	112138	112	292	57	0	21	17	68	62	28994	9230	41992	43	43
505	27883	29	137	36	0	14	11	44	29	10461	2490	11301	13	13
472	40181	25	155	20	2	14	10	40	30	16415	4718	15230	19	19
639	53398	22	194	54	0	22	11	40	36	8495	2937	14667	24	24
795	56435	23	300	26	0	25	7	28	17	18318	3599	23795	27	27
1244	77283	46	370	58	1	36	10	40	34	25143	4487	28055	26	26
559	71738	30	187	35	0	10	11	44	37	20471	2149	29162	14	14
584	48503	31	212	28	0	16	5	20	20	14561	1921	14962	26	26
440	25214	23	185	8	0	12	6	22	7	16902	2896	8749	15	15
1319	119424	65	449	96	0	20	14	56	46	12994	5815	37310	30	29
765	79201	27	234	50	0	38	13	52	43	29697	4679	31551	33	33
222	19349	11	67	15	0	13	1	2	0	3895	786	9604	14	14
965	78760	54	316	65	0	12	13	52	45	9807	4006	13937	11	11
821	54133	35	336	33	0	11	9	30	26	10711	2686	16850	12	11
317	21623	16	116	7	0	8	1	3	1	2325	593	3439	8	8
425	25497	11	141	17	0	22	6	20	16	19000	2454	16638	22	22
711	69535	38	236	55	0	14	12	48	29	22418	4061	12847	12	11
364	30709	22	98	32	1	7	9	32	21	7872	2856	13462	6	6
427	37043	23	97	22	0	14	9	36	19	5650	1678	8086	10	10
463	24716	13	152	41	0	2	12	45	10	3979	460	2255	1	0
545	54865	16	132	50	0	35	10	40	39	14956	5054	25918	31	30
369	27246	19	97	7	0	5	2	8	7	3738	999	3255	5	5
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
596	38814	13	165	26	0	34	8	32	11	10586	3685	16138	35	34
479	27646	32	153	22	0	12	7	28	28	18122	503	5941	15	15
713	65373	18	226	26	0	34	11	44	27	17899	3595	27123	36	34
639	43021	34	182	37	0	30	14	56	46	10913	3367	19148	27	28
477	43116	40	172	29	0	21	4	13	9	18060	1330	15214	36	36
38	3058	4	1	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
593	96347	25	196	42	0	28	13	52	49	15452	6878	34998	29	29
691	48626	31	263	51	0	16	17	51	27	33996	3080	18998	19	19
1056	73073	50	304	77	1	12	13	52	31	8877	1349	10651	16	15
495	45266	22	183	32	0	14	12	48	46	18708	3339	13465	15	15
778	43410	19	292	63	0	7	1	3	3	2781	4	13	1	1
875	83842	34	257	50	1	41	12	48	41	20854	3446	32505	36	36
490	39296	21	141	18	0	21	6	24	15	8179	1467	15769	22	22
713	38490	25	192	37	0	28	11	37	21	7139	255	5936	16	16
485	39841	19	129	23	3	1	8	32	23	13798	424	4174	1	1
285	19764	12	75	19	1	10	2	8	4	5619	2374	9876	10	10
934	59975	20	301	39	2	31	12	44	41	13050	3519	17678	31	31
554	64589	16	204	38	0	7	12	48	46	11297	2650	14633	22	22
753	63339	14	257	55	0	26	14	56	54	16170	2757	13380	22	21
256	11796	9	79	22	0	1	2	8	1	0	0	0	0	0
80	7627	8	25	7	0	0	0	0	0	0	0	0	0	0
618	68998	30	217	21	0	12	9	25	21	20539	459	5652	10	10
41	6836	3	11	5	0	0	1	4	0	0	0	0	0	0
520	33365	16	217	21	0	17	3	12	3	10056	549	3636	9	9
42	5118	3	6	1	0	5	0	0	0	0	0	0	0	0
347	20898	13	115	22	1	4	2	6	3	2418	206	1695	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
441	42690	18	167	31	0	6	12	48	44	11806	2885	8778	7	7
281	14507	11	75	25	0	0	14	52	19	15924	1034	4148	2	2
81	7131	4	27	0	1	0	0	0	0	0	0	0	0	0
61	4194	11	14	4	0	0	0	0	0	0	0	0	0	0
314	21416	10	96	20	1	15	4	12	12	7084	2558	10404	16	16
327	30591	13	95	29	0	0	7	28	24	14831	5086	20794	25	25
554	42419	10	228	33	0	12	10	40	26	6585	1392	11200	6	6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net
R Engine error message
Error in dimnames(data) <- dimnames : 
  length of 'dimnames' [1] not equal to array extent
Calls: array
Execution halted

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
R Engine error message & 
Error in dimnames(data) <- dimnames : 
  length of 'dimnames' [1] not equal to array extent
Calls: array
Execution halted
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=146967&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[ROW][C]R Engine error message[/C][C]
Error in dimnames(data) <- dimnames : 
  length of 'dimnames' [1] not equal to array extent
Calls: array
Execution halted
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=146967&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=146967&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net
R Engine error message
Error in dimnames(data) <- dimnames : 
  length of 'dimnames' [1] not equal to array extent
Calls: array
Execution halted



Parameters (Session):
par1 = 3 ; 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('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
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
Forecast', 1, TRUE)
a<-table.element(a, 'Residuals
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')
}