similar to: Using nlminb for maximum likelihood estimation

Displaying 20 results from an estimated 1000 matches similar to: "Using nlminb for maximum likelihood estimation"

2011 Jan 21
3
nlminb doesn't converge and produce a warning
Hi Everybody, My problem is that nlminb doesn't converge, in minimising a logLikelihood function, with 31*6 parameters(2 weibull parameters+29 regressors repeated 6 times). I use nlminb like this : res1<-nlminb(vect, V, lower=c(rep(0.01, 12), rep(0.01, 3), rep(-Inf, n-15)), upper=c(rep(Inf, 12), rep(0.99, 3), rep(Inf, n-15)), control = list(maxit=1000) ) and that's the result :
2010 Dec 08
1
Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds
I have a for-loop in my code that calls another .R file: source("estimation.R") This file runs through without any problems, so the program completes the loop one time. However, when the loop starts a second time and it comes time to call the file "estimation.R" again, program stops and prints the following error message: "Error in eval.with.vis(expr, envir, enclos) :
2006 Jul 06
1
Problem with garchFit function in fSeries
I used garchFit function to fit 1600 observations of EURO/USD 2-day returns in GARCH(1,1) model. As part of the summary I got warning message: NaNs produced in: sqrt(diag(fit$cvar)) And didn't get any estimates for 3 params' std.error, t value or probability: Error Analysis: Estimate Std. Error t value Pr(>|t|) mu -0.004827 0.020141 -0.240 0.811 ar1 0.010311
2008 Mar 19
1
betabinomial model
Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if i fix it to the anova type estimate obtained from icc( in package aod) then it says system is exactly singular. And when i try to fit my loglikelihood by
2006 Nov 22
2
problems with garchFit
Hi all, I post it on both r-help and r-finance since I don't know where is most appropriate for this topic. Sorry if it bothers you. I did garch fitting on S&P500 monthly returns with garchFit from fSeries. I got same coefficients from all cond.dist except normal. I thought that is probabaly usual for the data. But when I play with it, I got another question. I plot skew normal with
2011 May 04
1
fGarch
Hi, I am attempting to fit a ARMA/GARCH regression model without success. ### ARIMA-GARCH model with regressor ### ### Time series data: A multivariate data set. cov.ts.dq = cov.ts[1:4,"dq1"][!is.na(cov.ts[,"dq1"])] cov.ts.day = ts.intersect(dq = diff(q.ts), day = lag(q.ts, -1)) ### The following R scripts work: (summary(no.day.fitr <- garchFit(dq ~ arma(0,3) +
2007 Dec 12
1
APARCH
Hi, Could somebody say if it is possible to compute APARCH-models with garchFit commands. I have earlier used aaa (garchOxFit) and now I try to use bbb (look below) aaa <- garchOxFit(formula.mean=~arma(1,0),formula.var=~aparch(1,1),series=nyk,cond.dist=c('gaussian')) bbb <- garchFit(formula=~arma(1,0)+aparch(1,1),data=nyk) aaa works well, but I need other characteristics of
2007 Jan 06
1
garchFit in R
Dear all, I have problem here : I'm using garchFit from fSeries package, here is part of the script : > data <- read.table("d:/data.txt") > a <- garchFit(~garch(1,1),ts(data)) I also attached the file here. In my experience, I got my R not responding. I also tried with > a <- garchFit(~garch(1,1),ts(data*10)) and it's worked. I
2009 Apr 29
1
arma model with garch errors
Dear R experts, I am trying to estimate an ARMA 2,2 model with garch errors. I used the following code on R 2.9. #library library(fGarch) #data data1<-ts(read.table("C:/Users/falcon/Desktop/Time Series/exports/goods1.csv"), start=c(1992,1), frequency=12) head(data1) #garch garchFit(formula.mean= ~arma(2,2),formula.var=~garch(1,1), data=data1) but get this error: >
2010 Mar 17
1
Reg GARCH+ARIMA
Hi, Although my doubt is pretty,as i m not from stats background i am not sure how to proceed on this. Currently i am doing a forecasting.I used ARIMA to forecast and time series was volatile i used garchFit for residuals. How to use the output of Garch to correct the forecasted values from ARIMA. Here is my code: ###delta is the data fit<-arima(delta,order=c(2,,0,1)) fit.res <-
2008 Apr 01
1
garch prediction
Hello I want to predict the future values of time series with Garch When I specified my model like this: library(fGarch) ret <- diff(log(x))*100 fit = garchFit(~arma(1,0,0)+garch(1, 1), data =ret) predict(fit, n.ahead = 10) meanForecast meanError standardDeviation 1 0.01371299 0.03086350 0.03305819 2 0.01211893 0.03094519 0.03350248
2005 Dec 13
1
fSeries
I'm trying to use garchFit from fSeries, with Student or Skewed Student conditionnal distribution. Let's say that eps (vector) is my series of daily log-returns: data(EuStockMarkets) eps = diff(log(EuStockMarkets[,"CAC"])) library(fSeries) g = garchFit(series = eps, formula.var = ~garch(2,2), cond.dist = "dstd") s = g at fit$series All the coefficients are ok
2004 Nov 10
2
fSeries
Good morning everyone, I use for the first time the package fSeries and i try to run the example given by Diethelm Würtz. But when i run its example which is the following # # Example: # Model a GARCH time series process # # Description: # PART I: Estimate GARCH models of the following type ARCH(2) # and GARCH(1,1) with normal conditional distribution functions. # PART II: Simulate
2006 Sep 02
1
nonlinear least squares fitting Trust-Region"
Dear Mr Graves, Thank you very much for your response. Nobody else from this mailing list ventured to reply to me for the two weeks since I posted my question. "nlminb" and "optim" are just optimization procedures. What I need is not just optimization, but a nonlinear CURVE FITTING procedure. If there is some way to perform nonlinear curve fitting with the
2008 Aug 18
1
another GARCH problem
Hallo, i want to fit a GARCH model with a extern regressor (without arma components), so i found the following function in package fGarch. I tryed out a lot of things but usually I get this Error. > garchFit(formula=y~x, formula.var=~garch(1,1),data=w) Error in .garchFit(formula.mean, formula.var, series = x, init.rec, delta, : Algorithm only supported for mci Recursion I think i use the
2009 Nov 06
1
GARCH Models in R
Dear all, I'm using garchFit from fSeries package and I am not getting the desired results (error message : could not find function "garchFit" ). Would you please advise as to how I can build an ARIMA(p, d, q) - GARCH(p,q) model using R see the attached data and R-output. Thanking you in advance Kind regards Mangalani Peter Makananisa Statistical Analyst South
2008 Jun 16
1
Error in maximum likelihood estimation.
Dear UseRs, I wrote the following function to use MLE. --------------------------------------------- mlog <- function(theta, nx = 1, nz = 1, dt){ beta <- matrix(theta[1:(nx+1)], ncol = 1) delta <- matrix(theta[(nx+2):(nx+nz+1)], ncol = 1) sigma2 <- theta[nx+nz+2] gamma <- theta[nx+nz+3] y <- as.matrix(dt[, 1], ncol = 1) x <- as.matrix(data.frame(1,
2008 Aug 18
1
ARMA(0,2) & GARCH(1,1) - code & hessian
Hello R-list-members, I'm trying to model ARMA(0,2) & GARCH(1,1) process using the code below, but according to my textbook, the estimated parameters are wrong. The MA-parameters should be negative. (I've got the same problem using garchFit()). Can anyone tell me what I'm doing wrong? And how can I calculate the hessian matrix? Many thanks, Desislava Kavrakova Code:
2006 Apr 26
1
garchFit from fSeries
Dear R People: I'm trying to use the garchFit function from the library(fSeries) However, R freezes every time that I use it. Is anyone else having this problem, please? Thanks in advance! R Version 2.2.1 Windows. Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodgess at gator.uhd.edu
2010 Aug 15
2
fGarch: how to use garchFit() in loop?
Dear expeRts, How can I specify the order p,q of a GARCH(p,q) model within a loop? Here's a minimal example showing that an "Formula and data units do not match"-error appears: library(fGarch) spec <- garchSpec(model = list(alpha = 0.1, beta = c(0.4, 0.4))) data <- garchSim(spec, n = 100) x <- list() for(q in 1:3){ print(q) x[q] <-