[R] adding the second regressor

Tarkan Cavusoglu tarkan.cavusoglu at gmail.com
Tue Apr 23 20:29:07 CEST 2013

Hi...Can anyone help me for adding the second regressor to the FMOLS
regresion. I am using the codes below. I could not succeed to write
the correct sentence in place of the question marks. Do I need to make any
changes in the source file also? I attached the original files published by
Bruce Hansen.
Thank you very much in advance for your precious help.
Best Regards,

source ("c:/fm.R")

hansen_tdum <- as.matrix(read.table("c:/hansen_tdum.dat"))
DB1 <- as.matrix(hansen_tdum[,1])
RV1 <- as.matrix(hansen_tdum[,10])
EX1 <- as.matrix(hansen_tdum[,19])

y <- EX1
x <- ???????????????
for (fmp in 1:1){
cat ("Tax and Spend, Linear ","\n")
cat ("\n")
whiten <- 1
kernel <- 3
band <- 4
out <- fm(y,x,1,1)
cat ("\n")
cat ("\n")
if (fplot == 1){
mtit <- "Ependiture, 1986:2011"
xtit <- "Figure 1"
ytit <- "F stat"
t <- nrow(y)
firstob <- 1986 + round(.15*t)/4
inc <- .25
rf <- nrow(out$f)
crit <- matrix(1,rf,1)%*%cbind(15.2,6.22,7.815)
ytics <- range(cbind(out$f,crit))
xx <- as.matrix(seq(firstob,firstob+(rf-1)*inc,inc))
legend("topright",c("F Statistic Sequence","5% Critical, SupF",
"5% Critical, MeanF","5% Critical, Known

More information about the R-help mailing list