Hi,

I don't know where else to seek help, if not applicable, I would be grateful if you could direct me to a relevant reference.

I tried running (this code was gotten from TAMU.edu) but I kept getting this error "Error in eval(expr, envir, enclos) : object 'package' not found". I looked into fArma, but to no avail. What should I do? What is object 'package'?:
#Examples 
#Fit GE data using AR(1),AR(6), MA(2), ARMA(2,1), ARIMA(2,1,0) Models
# Yt = a * Y(t-1) + et

Price<-scan("C:\\R\\IXIC.txt")
N<-length(Price)  
Return<-Price[2:N]/Price[1:(N-1)]-1
LogReturn<-log(1+Return)
LogPrice<-log(Price)

library("fSeries")

#Fit GE Daily log return
fit_ar<-armaFit(formula = LogReturn ~ arima(1,0,0))     #AR (1)
fit_ar6<-armaFit(formula = LogReturn ~ arima(6,0,0))     #AR (6)
fit_ma<-armaFit(formula = LogReturn ~ arima(0,0,2))     #ma (2)
fit_arma<-armaFit(formula = LogReturn ~ arima(2,0,1))   #arma (2,1)    

#arima model fit GE daily log prices
fit_arima<-armaFit(formula = LogPrice ~ arima(2,1,0))  #arima (2,1,0)           
       

sink("C:\\R\\ar.txt")
pdf("C:\\R\\ar.pdf")
summary(fit_ar)
dev.off()
sink()

sink("C:\\R\\ar6.txt")
pdf("C:\\R\\ar6.pdf")
summary(fit_ar6)
dev.off()
sink()

sink("C:\\R\\ma.txt")
pdf("C:\\R\\ma.pdf")
summary(fit_ma)
dev.off()
sink()

sink("C:\\R\\arma.txt")
pdf("C:\\R\\arma.pdf")
summary(fit_arma)
dev.off()
sink()

sink("C:\\R\\arima.txt")
pdf("C:\\R\\arima.pdf")
summary(fit_arima)
dev.off()
sink()



      
	[[alternative HTML version deleted]]

