Displaying 20 results from an estimated 500 matches similar to: "Bayesian functions for mle2 object"
2010 Nov 18
1
Logistic regression with factorial effect
Hello,
I?d like to evaluate the temporal effect on the relationship between a
continuous variable (e.g. size) and the probability of mate success.
Initially I was trying to do a logistic regression model incorporating the
temporal effect, but I don?t know if that is the best option. I simulated
some data and that?s the problem:
2010 Mar 24
0
optimize a joint lieklihood with mle2
Hi
I'm trying to maximize a joint likelihood of 2 likelihoods (Likelihood 1 and
Likelihood 2) in mle2, where the parameters I estimate in Likelihood 2 go
into the likelihood 1. In Likelihood 1 I estimate the vector logN with
length 37, and for the Likelihood 2 I measure a vector s of length 8.
The values of s in Lieklihood 2 are used in the Likelihood 1.
I have 2 questions:
##1
I manage
2009 Feb 01
2
Extracting Coefficients and Such from mle2 Output
The mle2 function (bbmle library) gives an example something like the
following in its help page. How do I access the coefficients, standard
errors, etc in the summary of "a"?
> x <- 0:10
> y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
> LL <- function(ymax=15, xhalf=6)
+ -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
> a <- mle2(LL,
2008 Sep 19
0
panel data analysis possible with mle2 (bbmle)?
Dear R community,
I want to estimate coefficients in a (non-linear) system of equations using
'mle2' from the "bbmle" package. Right now the whole data is read in as just
one long time series, when it's actually 9 cross sections with 30 observations
each. I would like to be able to test and correct for autocorrelation but
haven't found a way to do this in this package.
2012 Sep 27
0
problems with mle2 convergence and with writing gradient function
Dear R help,
I am trying solve an MLE convergence problem: I would like to estimate
four parameters, p1, p2, mu1, mu2, which relate to the probabilities,
P1, P2, P3, of a multinomial (trinomial) distribution. I am using the
mle2() function and feeding it a time series dataset composed of four
columns: time point, number of successes in category 1, number of
successes in category 2, and
2008 Nov 19
1
mle2 simple question - sigma?
I'm trying to get started with maximum likelihood estimation with a
simple regression equivalent out of Bolker (Ecological Models and Data
in R, p302).
With this code:
#Basic example regression
library(bbmle)
RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5))
names(RegData)<-c("x", "y")
linregfun = function(a,b,sigma) {
Y.pred = a+b*x
2010 Feb 01
1
Help with multiple poisson regression with MLE2
Hi, I'm trying to make multiple poisson regressions with the MLE2 command.
I have used the following expression, but I receive an error message:
poisfit <- mle2(y ~ dpois(exp(b0 + b1*x1 + b2*x2)), start=list(b0=1, b1=1,
b2=1), data=data1)
Error in optim(par = c(1, 1, 1), fn = function (p) :
non-finite initial value 'vmmin'
I have changed initial values using coefficient values
2012 Apr 18
1
error estimating parameters with mle2
Hi all,
When I try to estimate the functional response of the Rogers type I
equation (for the mle2 you need the package bbmle):
> RogersIbinom <- function(N0,attackR2_B,u_B) {attackR2_B+u_B*N0}
> RogersI_B <-
mle2(FR~dbinom(size=N0,prob=RogersIbinom(N0,attackR2_B,u_B)/N0),start=list(attackR2_B=4.5,u_B=0.16),method="Nelder-Mead",data=data5)
I get following error message
2011 Oct 17
1
simultaneously maximizing two independent log likelihood functions using mle2
Hello,
I have a log likelihood function that I was able to optimize using
mle2. I have two years of the data used to fit the function and I would
like to fit both years simultaneously to test if the model parameter
estimates differ between years, using likelihood ratio tests and AIC.
Can anyone give advice on how to do this?
My likelihood functions are long so I'll use the tadpole
2012 Apr 19
1
non-numeric argument in mle2
Hi all,
I have some problems with the mle2 function
> RogersIIbinom <- function(N0,attackR3_B,Th3_B)
{N0-lambertW(attackR3_B*Th3_B*N0*exp(-attackR3_B*(24-Th3_B*N0)))/(attackR3_B*Th3_B)}
> RogersII_B <-
mle2(FR~dbinom(size=N0,prob=RogersIIbinom(N0,attackR3_B,Th3_B)/N0),start=list(attackR3_B=1.5,Th3_B=0.04),method="Nelder-Mead",data=dat)
Error in dbinom(x, size, prob, log)
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam,
I'm having trouble de-bugging the following - which works perfectly
well with optim or optimx - but not with mle2.
I'd be really grateful if someone could show me what is wrong. Many
thanks in advance. JSC:
gompertz<- function (x,t=data)
{
a3<-x[1]
b3<-x[2]
shift<-data[1]
h.t<-a3*exp(b3*(t-shift))
2010 Feb 12
1
using mle2 for multinomial model optimization
Hi there
I'm trying to find the mle fo a multinomial model ->*L(N,h,S?x)*. There
is only *N* I want to estimate, which is used in the number of successes
for the last cell probability. These successes are given by:
p^(N-x1-x2-...xi)
All the other parameters (i.e. h and S) I know from somewhere else.
Here is what I've tried to do so far for a imaginary data set:
2008 Jul 23
1
mle2(): logarithm of negative pdfs
Hi,
In order to use the mle2-function, one has to define the likelihood function
itself. As we know, the likelihood function is a sum of the logarithm of
probability density functions (pdf). I have implemented myself the pdfs
that I am using. My problem is, that the pdfs values are negative and I
cann't take the logarithm of them in the log-likelihood function.
So how can one take the
2012 Oct 05
2
problem with convergence in mle2/optim function
Hello R Help,
I am trying solve an MLE convergence problem: I would like to estimate
four parameters, p1, p2, mu1, mu2, which relate to the probabilities,
P1, P2, P3, of a multinomial (trinomial) distribution. I am using the
mle2() function and feeding it a time series dataset composed of four
columns: time point, number of successes in category 1, number of
successes in category 2, and
2015 May 18
1
Minimum files for building an embedded Opus library
Dear sirs,
I'm trying to build an Opus library for an embedded application to run on a
Microchip PIC32MX processor and I get a lot of errors in compilation time.
My question is, what should be the minimum files and options needed to have
such building, having in mind that only the very basic functionality in
fixed point arithmetic is needed?
Looking forward to your answer.
Kind
2012 Jul 11
0
declaring negative log likelihood of a distribution
Hi everyone!
I already posted
http://r.789695.n4.nabble.com/Declaring-a-density-function-with-for-loop-td4635699.html
a question on finding density values of a new Binomial like distribution
which has the following pmf:
http://r.789695.n4.nabble.com/file/n4636134/kb.png
Thank fully
http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=124474
Berend Hasselman and
2008 Sep 10
1
using function instead of formula in plm
Hi all,
I am trying to use plm to estimate coefficients in a model consisting of a system of equations. So far I used mle2 from the package "bbmle", but now I need to test for autocorrelation and mle2 does not provide for the necessary tests. mle2 needs a function as input that might as well consist of many different equations. plm however requires an object of class formula that needs
2012 Jul 30
1
confusion over S3/S4 importing
Can anyone help me figure out the right way to import a method that is
defined as S3 in one package and S4 in another?
Specifically:
profile() is defined as an S3 method in the stats package:
function (fitted, ...)
UseMethod("profile")
<bytecode: 0xa4cd6e8>
<environment: namespace:stats>
In stats4 it is defined as an S4 method:
stats4:::profile
standardGeneric for
2008 Jul 21
1
Control parameter of the optim( ): parscale
Hi everybody,
I am using the L-BFGS-B method of the mle2() function to estimate the values
of 6 parameters. mle2 uses the methods implemented in optim. As I got it
from the descriptions available online, one can use the parscale
parameter to tell R somehow what the values of the estimated parameters
should be . . .
Could somebody please help me understand what one has to do actually with
the
2012 Feb 13
2
Dynamically extending the group membership of a custom system user
Hello,
I need to expand the membership of a custom system user depending on the
availability of some group on the target system i.e.
user {
"logger":
name => "logger",
ensure => "present",
groups => ["adm", "wheel", "this _group_ if it exists"],
shell => "/bin/bash";
}
The