Displaying 20 results from an estimated 2000 matches similar to: "How to create list of objects?"
2006 Jun 23
1
How to use mle or similar with integrate?
Hi
I have the following formula (I hope it is clear - if no, I can try to
do better the next time)
h(x, a, b) =
integral(0 to pi/2)
(
(
integral(D/sin(alpha) to Inf)
(
(
f(x, a, b)
)
dx
)
dalpha
)
and I want to do an mle with it.
I know how to use mle() and I also know about integrate(). My problem is
to give the parameter values a and b to the
2006 Jun 02
2
Problem with mle
R 2.3.0
Linux, SuSE 10.0
Hi
I have two problems with mle - probably I am using it the wrong way so
please let me know.
I want to fit different distributions to an observed count of seeds and
in the next step use AIC or BIC to identify the best distribution.
But when I run the script below (which is part of my original script), I
get one error message for the first call of mle:
Error in
2005 Jan 10
1
mle() and with()
I'm trying to figure out the best way of fitting the same negative
log-likelihood function to more than one set of data, using mle() from the
stats4 package.
Here's what I would have thought would work:
--------------
library(stats4)
## simulate values
r = rnorm(1000,mean=2)
## very basic neg. log likelihood function
mll <- function(mu,logsigma) {
2008 Jul 26
4
parametric bootstrap
Hi
I am trying to find a parametric bootstrap confidence interval and when I used the boot function I get zero bias and zero st.error? What could be my mistake?
Thank you and take care.
Laila
[[alternative HTML version deleted]]
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi,
There is something I don't get with object of class "mle" returned by a
function I wrote. More precisely it's about the behaviour of method
"confint" and "profile" applied to these object.
I've written a short function (see below) whose arguments are:
1) A univariate sample (arising from a gamma, log-normal or whatever).
2) A character string
2009 Jan 18
1
about power.law.fit
Dear all,
I'm using igraph for some analysis about the network I have. I have a
question about the function "power.law.fit".
I wonder if there is any test for checking whether the "power.law.fit" is
good for the input, i.e., under which situation, could we use this function
to get a reliable result. I'm afraid even I input a random graph without any
property of
2008 Sep 04
1
pass data to log-likelihood function
Hi there,
When I do bootstrap on a maximum likelihood estimation, I try the
following code, however, I get error:
Error in minuslogl(alpha = 0, beta = 0) : object "x" not found
It seems that mle() only get data from workspace, other than the
boot.fun().
My question is how to pass the data to mle() in my case.
I really appreciated to any suggestions.
Best wishes,
Jinsong
2018 May 28
2
to R Core T: mle function in 32bits not respecting the constrain
I have an issue using mle in versions of 32 bits.
I am writing a package which I want to submit to the CRAN.
When doing the check, there is an example that has an error running in the
32 bits version.
The problem comes from the mle function, using it with a lower constrain.
In 64 bits version it works fine but when I put it in the R 32 bits it
fails. (same numbers, all equal!)
The call is:
2004 Jul 14
1
Running the optimization on the subset of parameters
Dear all,
I'd like to find a minimum of (-loglik) function which is a function of k parameters. I'd like to run the minimization algorithm for the different subsets of the parameters and assign the fixed values to the complementary subset. How should I define my (-loglik) function such that it can be passed to the optim or other optimization function?
Much thanks for any suggestions.
2012 Jul 05
3
Maximum Likelihood Estimation Poisson distribution mle {stats4}
Hi everyone!
I am using the mle {stats4} to estimate the parameters of distributions by
MLE method. I have a problem with the examples they provided with the
mle{stats4} html files. Please check the example and my question below!
*Here is the mle html help file *
http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
2004 Jun 10
1
overhaul of mle
So, I've embarked on my threatened modifications to the mle subset
of the stats4 package. Most of what I've done so far has *not* been
adding the slick formula interface, but rather making it work properly
and reasonably robustly with real mle problems -- especially ones
involving reasonably complex fixed and default parameter sets.
Some of what I've done breaks backward
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion:
resubmitting it as a bug, just so it gets
logged appropriately]
Sorry to report further difficulties with
nls and profiling and constraints ... the problem
this time (which I didn't check for in my last
round of testing) is that the nls profiler doesn't
seem to respect constraints that have been
set when using the port algorithm.
See test code
2005 Sep 06
2
(no subject)
my problem actually arised with fitting the data to the weibulldistribution,
where it is hard to see, if the proposed parameterestimates make sense.
data1:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491;
?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334
how am I supposed to know what starting values i have to take?
i get different
2007 Apr 09
1
R:Maximum likelihood estimation using BHHH and BFGS
Dear R users,
I am new to R. I would like to find *maximum likelihood estimators for psi
and alpha* based on the following *log likelihood function*, c is
consumption data comprising 148 entries:
fn<-function(c,psi,alpha)
{
s1<-sum(for(i in 1:n){(c[i]-(psi^(-1/alpha)*(lag(c[i],-1))))^2*
(lag(c[i],-1)^((-2)*(alpha+1))
)});
s2<- sum(for(m in 1:n){log(lag(c[m],-1)^(((2)*alpha)+2))});
2007 Oct 24
1
vectorized mle / optim
Hi the list,
I would need some advice on something that looks like a FAQ: the
possibility of providing vectors to optim() function.
Here is a stupid and short example summarizing the problem:
-------------------------------- example 1 ------------ 8<
----------------------
library(stats4)
data <- rnorm(100,0,1)
lik1 <- function(m, v, data) {
N <- length(data)
lik.mean <-
2008 Jun 27
3
For loop
Hi,
Could you please let me know to use a list in a for loop here geneset is a
loop.I am trying to match the names of the list with 1st row of the output.
result<- list()
for(i in 1:length(output)
{
result[[i]] <- geneset(which(geneset %n% output[,1]))
}
Kindly help me out
--
View this message in context: http://www.nabble.com/For-loop-tp18163665p18163665.html
Sent from the R
2011 May 23
6
Reading Data from mle into excel?
Hi there,
I ran the following code:
vols=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Swaption
vols.csv"
, header=TRUE, sep=",")
X<-ts(vols[,2])
#X
dcOU<-function(x,t,x0,theta,log=FALSE){
Ex<-theta[1]/theta[2]+(x0-theta[1]/theta[2])*exp(-theta[2]*t)
Vx<-theta[3]^2*(1-exp(-2*theta[2]*t))/(2*theta[2])
dnorm(x,mean=Ex,sd=sqrt(Vx),log=log)
}
2018 May 28
0
to R Core T: mle function in 32bits not respecting the constrain
> On May 27, 2018, at 10:31 PM, francesc badia roca <fbr600 at gmail.com> wrote:
>
> I have an issue using mle in versions of 32 bits.
>
> I am writing a package which I want to submit to the CRAN.
> When doing the check, there is an example that has an error running in the
> 32 bits version.
>
> The problem comes from the mle function, using it with a lower
2005 Sep 12
1
fit data with gammadistribution
hello
my data is
data2:2743 4678 21427 6194 10286 1505 12811 2161 6853 2625 14542 694
11491 14924 28640 17097 2136 5308 3477 91301 11488 3860 64114 14334
by calculating
shape<-(mean(data2))^2/var(data2)
scale<-var(data2)/mean(data2)
i get the idea what the parameters of the gammadistribution would be.
but if i try using the method mle() i get stock and i don't know, how to
2008 Mar 11
1
messages from mle function
Dears useRs,
I am using the mle function but this gives me the follow erros that I
don't understand. Perhaps there is someone that can help me.
thank you for you atention.
Bernardo.
> erizo <- read.csv("Datos_Stokes_1.csv", header = TRUE)
> head(erizo)
EDAD TALLA
1 0 7.7
2 1 14.5
3 1 16.9
4 1 13.2
5 1 24.4
6 1 22.5
> TAN <-