search for: llh

Displaying 14 results from an estimated 14 matches for "llh".

Did you mean: lld
2008 Sep 12
1
Error in solve.default(Hessian) : system is computationally singular
...esislava Kavrakova Code: garchfitS<-function(x){ x<<-ts(x) r<<-0.05/365 n<<-length(x) Mean = mean(x); Var = var(x); S = 1e-6 param = c(alpha0 = Var, alpha = 0.1, beta = 0.8) lowerB = c(alpha0 = S^2, alpha = S, beta = S) upperB = c(alpha0 = 100*Var, alpha = 1-S, beta = 1-S) llh<-function(p){ alpha0<-p[1] alpha<-p[2] beta<-p[3] hh<-Var for (i in 2:n){ hh[i]<-alpha0+alpha*(x[i-1]-r+0.5*hh[i-1])^2+beta*hh[i-1] } hh<-ts(hh) h<-sqrt(abs(hh)) z<-(x-r+0.5*hh)/h -(-(sum(0.5*(log(hh[2:n])+(z[2:n])^2)))) } fit<-nlminb(param, llh, lower=lowerB, upper=u...
2011 Sep 02
5
Hessian Matrix Issue
...else((d-1)>= 0, (d-1), 0.0000001)) aa<-numeric(length(max(y))) a<-numeric(length(y)) for (i in 1:n) { for (j in 1:y[i]){ aa[j]<-ifelse(((j-1)*(d-1))/mu >0,log(1+((j-1)*(d-1))/mu),0) #aa[j]<-log(1+((j-1)*(d-1))/mu) #print(aa[j]) } a[i]<-sum(aa) #print(a[i]) } a arg3<-sum(a) llh<-arg1+arg2+arg3 if(! is.finite(llh)) llh<-1e+20 -llh } ac<-optim(NegBin,par=c(xbar,dbar),method="L-BFGS-B",hessian=TRUE,lower= c(0,1) ) ac print(ac$hessian) muhat<-ac$par[1] dhat<-ac$par[2] zhat<- 1+(log(dhat)/(1-dhat)) infor<-solve(ac$hessian) var.dhat<-infor[2,2]...
2011 Feb 26
0
A problem about realized garch model
...{ logh[i] = omega+bet*logh[(i-1)]+gam*logx[(i-1)] logx[i] = xi+phi*logh[i]+tau1*z[i]+tau2*(z[i]^2-1)+u[i] r[i] = sqrt(exp(logh[i]))*z[i] } gdata = rbind(r,exp(logx)) ans = gdata[,-(1:(n.warm+1))] ans } =========================== This is my estimation code: ============================ LLH<-function(data,theta) { r = data[1,] x = data[2,] n = dim(data)[2] logx = log(x) logh = rep(0,n) u = rep(0,n) garchDist = function(r, hh) { dnorm(x = r/hh)/hh } measureDist = function(u,sigma){dnorm(x = u/sigma)/sigma} omega = theta[1] bet = theta[2] gam = theta[3] xi =...
2008 Aug 18
1
ARMA(0,2) & GARCH(1,1) - code & hessian
...(x) Mean = mean(x); Var = var(x); S = 1e-6 param = c(a = Mean, b1 = S, b2 = S, alpha0 = 0.1*Var,alpha = 0.1, beta = 0.8) lowerB = c(a = -10*abs(Mean), b1 = S-1, b2 = S-1, alpha0 = S^2, alpha = S, beta = S) upperB = c(a = 10*abs(Mean), b1 = 1-S, b2 = 1-S, alpha0 = 100*Var, alpha = 1-S, beta = 1-S) llh<-function(p){ a<-p[1] b1<-p[2] b2<-p[3] alpha0<-p[4] alpha<-p[5] beta<-p[6] res<-array(length(x)) hh<-array(length(x)) res[1]<-x[1]-a res[2]<-x[2]-a-b1*res[1] for (i in 3:n){ res[i]<-x[i]-a-b1*res[i-1]-b2*res[i-2] } res<-ts(res) hh[1]<-alpha0 for (i in 2:n...
2008 Mar 24
0
ARCH(1,0) with t-residuals
...ormula mean: ~ arma(0, 0) GARCH model: garch Formula var: ~ garch(0, 1) ARMA Order: 0 0 Max ARMA Order: 0 GARCH Order: 0 1 Max GARCH Order: 1 Maximum Order: 1 h.start: 2 llh.start: 1 Length of Series: 1859 Recursion Init: mci Series Scale: 0.01030084 Error in .garchInitParameters(formula.mean = formula.mean, formula.var = formula.var, : object "alpha" not found If I use GARCH(0,1) model I get the foll...
2008 Oct 14
0
nlm return wrong function value - garch fitting
I am using nlm to maximize a likelihood function. When I call the likelihood function (garchLLH) via nlm however, nlm returns the wrong value of the function. When I test the likelihood function manually I get the correct answer. I'm probably doing something really stupid, maybe someone can point it out for me. ###############this is the function i am trying to minimize ###########...
2008 Dec 30
1
A mistake in garchFit()? {fGarch}
Hello, I was using garchFit {fGarch} to fit some GARCH processes. I noticed that the result contains "Log Likelihood" value (right above "Description"), but when I use .. at fit$llh to retrieve Log Likelihood value, the sign switched. I am confused about which value I should choose to report... Any help here? Thanks a lot! Ted -- View this message in context: http://www.nabble.com/A-mistake-in-garchFit%28%29----%7BfGarch%7D-tp21222283p21222283.html Sent from the R help mail...
2010 Jan 07
1
Return values in fExtremes package
Hi, I was usuing the fExtemes package, and wanted to obtain some of the values returned from the function gumbelFit(). For example, in the following code, I would like to access 'mu' and 'beta' from the object 'para'. How should I go about doing this? Is there any generic method to access the object? ----------------------------------- >library("fExtremes")
2010 Feb 12
0
[LLVMdev] Portable I/O
Thanks everyone, a set of wrapper routines it will be then. Dustin, are the routines you wrote open source or do you know if there is already a project that provides such a portable interface to libc for LLVM? If not, I'll write my own routines, but if there is a way to adopt a common standard or avoid reinventing the wheel I'm all for it. Mike
2010 Feb 12
2
[LLVMdev] Portable I/O
On 02/12/2010 09:51 AM, Chris Lattner wrote: > I think that the point is that you can define your own standard runtime interfaces: > > void *myopen(const char*path) { > return fopen(path, ...); > } Maybe my experience hand-coding LLVM will actually be of some help. What I did for this case is what I think Chris is suggesting--I have a .c file with functions that return
2010 Jan 08
4
[LLVMdev] Inlining
...e linkonce fastcc i32 @foo(i32 %arg) alwaysinline { %result = mul i32 %arg, 7 ret i32 %result } define i32 @main(i32 %argc, i8 **%argv) { %retVal = call fastcc i32 @foo(i32 6) alwaysinline ret i32 %retVal } --- and bumped up the optimization level to O3: rm -f nil c_defs c_defs.llh *.bc *.s *.o testInline # *.ll gemini:~/Projects/Nil/nil(0)$ make testInline.s testInline llvm-as testInline.ll llc -O3 -f testInline.bc cc testInline.s -o testInline rm testInline.bc gemini:~/Projects/Nil/nil(0)$ which generates --- .file "testInline.bc" .section .gnu.linkonce...
2013 Apr 24
0
[LLVMdev] Questions about attaching DWARF source code debugging information to generated LLVM-IR.
...ARD CLOS/BUILTIN CLOS/CHANGE CLOS/STDMETHOD CLOS/GENERIC CLOS/FIXUP :FRONT CLOS/CONDITIONS CLOS/PRINT CLOS/STREAMS LSP/PPRINT :CLOS ) BRIDGE-COMMON-LISP (copyright Christian E. Schafmeister 2013) - 1.0 CORE>>> (defun gdb () (break "break")) ; --> #<INTERPRETED :name GDB :llh #<LAMBDA-LIST-HANDLER :ClassifiedSymbols Cons_O::nil :comment ""> :environment #[VALUE-ENVIRONMENT :id 27874 ----NO METADATA---- ] :declares Cons_O::nil :docstring """" :code ((BLOCK GDB ( BREAK "break" ) ) ) > CORE>>> (l...
2001 Mar 08
4
Half-Life sound problem
Hi, finally got HL to run at 1024 in opengl. But there are some things which i'm not happy about: 1) Sound lags about 1 sec after the game, EAX doesn't work. 2) Some fonts don't get found (which messes up the scoreboard). I'm running Mandrake7.2 with kernel 2.4.2 and XFree 4.0.1 and nvidia's 0.9.6 drivers. Some things i've found out so far: Using the nvidia agp driver
2013 Apr 24
2
[LLVMdev] Questions about attaching DWARF source code debugging information to generated LLVM-IR.
I upgraded my versions of llvm, clang and compiler-rt to the top-of-tree versions from last night (r180162, April 24). I recompiled debug versions of llvm, clang and my code. I then regenerated my test case and the results were the same - I can list lines of dwarf1.lsp in lldb but I can't set break-points or do anything else (what else should I be able to do?). The updated file that