similar to: Poisson Lognormal

Displaying 20 results from an estimated 9000 matches similar to: "Poisson Lognormal"

2013 Oct 11
3
Gaussian Quadrature for arbitrary PDF
Hi all, We know that Hermite polynomial is for Gaussian, Laguerre polynomial for Exponential distribution, Legendre polynomial for uniform distribution, Jacobi polynomial for Beta distribution. Does anyone know which kind of polynomial deals with the log-normal, Student抯 t, Inverse gamma and Fisher抯 F distribution? Thank you in advance! David [[alternative HTML version deleted]]
2004 Mar 02
2
Problem with Integrate
The background: I'm trying to fit a Poisson-lognormal distrbutuion to some data. This is a way of modelling species abundances: N ~ Pois(lam) log(lam) ~ N(mu, sigma2) The number of individuals are Poisson distributed with an abundance drawn from a log-normal distrbution. To fit this to data, I need to integrate out lam. In principle, I can do it this way: PLN1 <- function(lam, Count,
2010 Apr 14
2
Gaussian Quadrature Numerical Integration In R
Hi All, I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral. Is there a way to do it in R? Is there a function already implemented which uses such weighting function. I have been searching in the statmode package and I found the function "gauss.quad(100, kind="hermite")" which uses
2009 May 08
1
ADAPTIVE QUADRATURE WEIGHTS AND NODES
Can anyone help me on how to get the nodes and weights of the adaptive quadrature using R. Best wishes Boikanyo. ----- The University of Glasgow, charity number SC004401
2006 Apr 28
1
gauss.quad.prob
I've written a series of functions that evaluates an integral from -inf to a or b to +inf using equally spaced quadrature points along a normal distribution from -10 to +10 moving in increments of .01. These functions are working and give very good approximations, but I think they are computationally wasteful as I am evaluating the function at *many* points. Instead, I would prefer to use
2007 Mar 21
2
Gaussian Adaptive Quadrature
Hi all, Does anybody know any function that performs gaussian adapative quadrature integration of univariate functions? Thanks in advance, Regards, Caio __________________________________________________ [[alternative HTML version deleted]]
2005 Dec 15
1
generalized linear mixed model by ML
Dear All, I wonder if there is a way to fit a generalized linear mixed models (for repeated binomial data) via a direct Maximum Likelihood Approach. The "glmm" in the "repeated" package (Lindsey), the "glmmPQL" in the "MASS" package (Ripley) and "glmmGIBBS" (Myle and Calyton) are not using the full maximum likelihood as I understand. The
2009 May 29
1
Mean of lognormal in base-2
Hi, Does anyone know what the mean value of a lognormal distribution in base-2 is? I am simulating stochastic population growth and if I were working in base-e, I would do:lambda <- 1.1 #multiplicative growth rates <- 0.6 #stochasticity (std. dev)lognormal <- rlnorm(100000, log(lambda) - (s^2)/2, s)## or lognormal <- exp( rnorm( 100000, log(lambda) - (s^2)/2,
2005 Aug 17
1
two-level poisson, again
Hi, I compare results of a simple two-level poisson estimated using lmer and those estimated using MLwiN and Stata (v.9). In R, I trype: ------------------------------------------------------------------------------------------- m2 <- lmer(.D ~ offset(log(.Y)) + (1|pcid2) + educy + agri, male, poisson) -------------------------------------------------------------------------------------------
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer Thanks for your thoughts on this. I did a bit of work and did end up with a method (more a trick), but it did work. I am certain there are better ways to do this, but here is how I resolved the issue. The integral I need to evaluate is \begin{equation} \frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta} {\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta} \end{equation} Where
2010 Nov 14
1
Integrate to 1? (gauss.quad)
Does anyone see why my code does not integrate to 1? library(statmod) mu <- 0 s <- 1 Q <- 5 qq <- gauss.quad(Q, kind='hermite') sum((1/(s*sqrt(2*pi))) * exp(-((qq$nodes-mu)^2/(2*s^2))) * qq$weights) ### This does what's it is supposed to myNorm <- function(theta) (1/(s*sqrt(2*pi))) * exp(-((theta-mu)^2/(2*s^2))) integrate(myNorm, -Inf, Inf)
2018 Jan 18
0
MCMC Estimation for Four Parametric Logistic (4PL) Item Response Model
I know of no existing functions for estimating the parameters of this model using MCMC or MML. Many years ago, I wrote code to estimate this model using marginal maximum likelihood. I wrote this based on the using nlminb and gauss-hermite quadrature points from statmod. I could not find that code to share with you, but I do have code for estimating the 3PL in this way and you could modify the
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2008 Feb 18
0
Solved (??) Behaviour of integrate (was 'Poisson-lognormal probab ility calculations')
Hi Again, I think I've solved my problem, but please tell me if you think I'm wrong, or you can see a better way! A plot of the integrand showed a very sharp peak, so I was running into the integrand "feature" mentioned in the note. I resolved it by limiting the range of integration as shown here: -------------------------------------------------- function (x, meanlog = 0,
2011 Apr 16
1
spatstat regression troubles
Hi Everyone, I am trying to figure out the spatstat package for the first time and am having some trouble. Unfortunately, I can't post my data set but I'll hopefully post enough details for some help. I want to model the intensity of a spatial point process using 2 covariates from my data. After reading through the documentation, I have successfully created 2 "ppp" objects. The
2008 Feb 15
0
Behaviour of integrate (was 'Poisson-lognormal probability calcul ations')
Hi again, Adding further information to my own query, this function gets to the core of the problem, which I think lies in the behaviour of 'integrate'. ------------------------------------- function (x, meanlog = 0, sdlog = 1, ...) { require(stats) integrand <- function(t, x, meanlog, sdlog) dpois(x,t)*dlnorm(t, meanlog, sdlog) mapply(function(x, meanlog, sdlog, ...) #
2008 Feb 15
0
Poisson-lognormal probability calculations
Hi, just for the record, although I don't think it's relevant (!) ------------------------------------- > sessionInfo() R version 2.6.0 (2007-10-03) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats4 splines
2004 May 28
3
gauss.hermite?
The search at www.r-project.org mentioned a function "gauss.hermite{rmutil}". However, 'install.packages("rmutil")' produced, 'No package "rmutil" on CRAN.' How can I find the current status of "gauss.hermite" and "rmutil"? Thanks, Spencer Graves
2006 Aug 05
1
AIC for lognormal model
Dear all, I want to compare some different models for a dataset by QQ plots and AIC. I get the following AICs: - linear model: 19759.66 - GAMLSS model: 18702.7 - linear model with lognormal response: -7862.182 The QQ plots show that the lognormal model fits better than the linear model, but still much worse than the GAMLSS. So, in my opinion, the AIC of the lognormal model should be between the
2007 Mar 23
1
generating lognormal variables with given correlation
Dear R users I use simulated data to evaluate a model by sampling the parameters in my model from lognormal distributions. I would like these (lognormal distributed) parameters to be correlated, that is, I would like to have pairwise samples of 2 parameters with a given correlation coefficient. I have seen that a covariance matrix can be fixed when generating random variables from a