Displaying 20 results from an estimated 300 matches similar to: "Maximum likelihood estimation of ARMA(1,1)-GARCH(1,1)"
2007 Jul 21
1
Gamma MLE
Hello,
I was asked to try the following code on R,
gamma.mles
function (xx,shape0,rate0)
{
n<- length(xx)
xbar<- mean(xx)
logxbar<- mean(log(xx))
theta<-c(shape0,rate0)
repeat {
theta0<- theta
shape<- theta0[1]
rate<- theta0[2]
S<- n*matrix(c(log(rate)-digamma(shape)+logxbar,shape/rate-xbar),ncol=1)
I<- n*matrix(c(trigamma(shape),-1/rate,-1/rate,shape/rate^2),ncol=2)
2011 Feb 21
0
Function within functions and MLE
Hi,
I am trying to determine the MLE of the following function:
http://r.789695.n4.nabble.com/file/n3317341/untitled.bmp
I have defined both parts of the equation as separate functions and looped
over the t and G values to get summations of each part.
The lamda function has 3 unknowns which I am trying to determine using MLE
bub tin order to try and get the overall function working these
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
libswfdec/jpeg/jpeg.c | 3 +++
libswfdec/swfdec_bits.c | 18 ++++++++++++++++--
libswfdec/swfdec_edittext.c | 3 ++-
libswfdec/swfdec_font.c | 30 ++++++++++++++++++++++++------
libswfdec/swfdec_image.c | 30 ++++++++++++++----------------
libswfdec/swfdec_root_sprite.c | 2 +-
libswfdec/swfdec_script.c | 19 +++++++++----------
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
libswfdec/jpeg/jpeg.c | 3 +++
libswfdec/swfdec_bits.c | 18 ++++++++++++++++--
libswfdec/swfdec_font.c | 30 ++++++++++++++++++++++++------
libswfdec/swfdec_image.c | 30 ++++++++++++++----------------
libswfdec/swfdec_root_sprite.c | 2 +-
libswfdec/swfdec_script.c | 18 +++++++++---------
libswfdec/swfdec_shape.c | 11 ++++++-----
2007 Mar 21
0
5 commits - README libswfdec/jpeg libswfdec/swfdec_image.c
README | 2 +-
libswfdec/jpeg/jpeg.c | 13 +++++++++++++
libswfdec/swfdec_image.c | 30 ++++++++++++++++++++++++++++--
3 files changed, 42 insertions(+), 3 deletions(-)
New commits:
diff-tree bbf53a5c2060eadff2632674d2550a09719f41e1 (from parents)
Merge: 0f3d2abf794d0f1f69a38c4532c4e273054f4696 b12efb820117b62a7150d13359499678e7dcf31d
Author: Debian User
2012 May 21
3
Replace a variable by its value
I have a dataset called "raw-data" . I am trying to use the following code -
col_name<-names(raw_data)
for (i in 1:(length(names(raw_data))-2))
{
tbl=table(raw_data$Pay.Late.Dummy, raw_data$col_name[i])
chisqtest<-chisq.test(tbl)
}
Say the 1st column of my raw_data is Column1. The idea is when i=1 then
raw_data$col_name[i] will automatically become raw_data$Column1 ,
2011 Jun 18
2
different results from nls in 2.10.1 and 2.11.1
Hi,
I've noticed I get different results fitting a function to some data on
my laptop to when I do it on my computer at work.
Here's a code snippet of what I do:
##------------------------------------------------------------------
require(circular) ## for Bessel function I.0
## Data:
dd <- c(0.9975948929787, 0.9093316197395, 0.7838819026947,
0.9096108675003, 0.8901804089546,
2010 Jul 02
0
Powercom driver patch
Hello everybody!
I'm trying to use nut-2.4.1 with brand new UPS Powercom Imperial
IMD-825AP USB. I've faced a problem that the driver powercom despite
specifying type=IMP automatically re-detects the UPS as "KIN" and then
interprets raw data incorrectly. The same problem was reported by
other Powercom users on the official support forum (
http://forum.pcm.ru ).
I suppose the
2006 Nov 11
2
Bayesian question (problem using adapt)
In the following code I have created the posterior density for a Bayesian
survival model with four parameters. However, when I try to use the adapt
function to perform integration in four dimensions (on my old version of R
I get an error message saying that I have applied a non-function, although
the function does work when I type kernel2(param0, theta0), or on the
newer version of R the computer
2010 Apr 08
1
a small question about R with Winbugs
I try to do a test for dirichlet process for Multivariate normal, but Winbugs
always says "expected multivariate node", does that mean I miss something at
initialization? I will really appreciate the help to solve this problem
Here is the R code, and Winbugs code.
model
{
for(i in 1:N){
y[i,1:2] ~ dmnorm(mu[i,],tau[i,,])
S[i] ~ dcat(pi[])
mu[i,1:2] <- mu.star[S[i],]
2009 Nov 30
1
RSQLite does not read very large values correctly
Hello,
I am trying to import data from an SQLite database to R.
Unfortunately, I seem to get wrong data when I try to import very large
numbers.
For example:
I look at the database via SQLiteStudio(v.1.1.3) and I see the following
values:
OrderID Day TimeToclose
1 2009-11-25 29467907000
2 2009-11-25 29467907000
3 2009-11-25 29467907000
Now I run this R Code:
>
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
libswfdec/swfdec_image.c | 204 ++++++++++++++++++++++++++---------------------
libswfdec/swfdec_image.h | 11 +-
2 files changed, 123 insertions(+), 92 deletions(-)
New commits:
commit 54d034a21fa13a6afb4ad788a82b240002def2cf
Author: Benjamin Otte <otte at gnome.org>
Date: Sun Nov 11 00:21:54 2007 +0100
implement reading from PNG files
diff --git a/libswfdec/swfdec_image.c
2011 Aug 13
3
optimization problems
Dear R users
I am trying to use OPTIMX(OPTIM) for nonlinear optimization.
There is no error in my code but the results are so weird (see below).
When I ran via OPTIM, the results are that
Initial values are that theta0 = 0.6 1.6 0.6 1.6 0.7. (In fact true vales
are 0.5,1.0,0.8,1.2, 0.6.)
--------------------------------------------------------------------------------------------
>
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
libswfdec/js/jsinterp.h | 1
libswfdec/swfdec_bits.c | 28 +++
libswfdec/swfdec_bits.h | 9 -
libswfdec/swfdec_codec_screen.c | 2
libswfdec/swfdec_image.c | 98 ++++--------
libswfdec/swfdec_script.c | 315 ++++++++++++++++++++++++++++++++++++++--
libswfdec/swfdec_swf_decoder.c | 2
libswfdec/swfdec_tag.c | 23 --
8 files
2004 Feb 16
0
error in nls, step factor reduced below minFactor
Hello,
I am trying to estimate 4 parameters of a non-linear
model using nls.
My model function is a Fourier integral and is very
expensive to
calculate. I get the following error:
> theta0 <- c(0.045, 1.02*10^(-4), 0.00169,
5.67*10^(-4))
> res <- nls(log(y) ~ log(model(theta,r,t)),
data=dataModel,
+ start=list(theta=theta0), trace=TRUE,
+ control=nls.control(tol=1e-2))
2011 Aug 29
0
Error: Gradient function might be wrong ----- in OPTIMX
Dear R users
When I use OPTIMX with BFGS, I've got the following error message.
-----------------------------------------------------------------
> optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS")
Error: Gradient function might be wrong - check it!
-----------------------------------------------------------------
So, I checked and checked my gradient function line by
2008 Mar 19
1
problem with optim and integrate
Dear all,
I want to min "integrate( (p1*dnorm+p2*dnorm+p3*dnorm)^(1.3))" for p, mu,
and sigma.
So, I have to estimate 8 parameters(p3=1-p1-p2).
I got this warning-"Error in integrate(numint, lower = -Inf, upper = Inf) :
non-finite function value."
My questions are
How could I fix it? I tried to divide into several intervals and sum up, but
I got same message.
My code is
2011 Feb 22
2
mle
Hi,
I am looking for some help regarding the use of the mle function.
I am trying to get mle for 3 parameters (theta0, theta1 and theta2) that
have been defined in the the log-likelihood equation as theta0=theta[1],
theta1=theta[2] and theta2=theta[3].
My R code for mle is:
mle(Poisson.lik, start=list(theta=c(20,1,1), method="Nelder-Mead",
fixed=list(w=w, t1=t1, t2=t2))
But I keep
2010 Jul 20
0
Maximum likelihood estimation in R
Dear R-helper,
I am trying to do maximum likelihood estimation in R. I use the "optim" function. Since I have no prior information on the true values of the parameters, I just randomly select different sets of starting values to feed into the program. Each time, I get the following error message: Error in optim(theta0, lf, method = "BFGS", hessian = T, Y = Y, X = X, :
2011 Aug 01
2
Errors, driving me nuts
Greetings all,
I am getting this error that is driving me nuts... (not a long trip, haha)
I have a set of files and in these files I want to calculate ttests on
rows 'compareA' and 'compareB' (these will change over time there I
want a variable here). Also these files are in many different
directories so I want a way filter out the junk... Anyway I don't
believe that this is