Displaying 20 results from an estimated 2917 matches for "likelihood".
2011 Apr 20
1
What to do with positive likelihoods
Hi all,
I'll preface this with saying I've gone through the archives, and am still in need of some help.
I've been using this likelihood model with mean = 0 and s.d. = sqrt( (c + ( 1 / N1 ) + ( 1 / N2 ) ) * x * ( 1 - x )), where c is a genetic drift parameter (usually very small, like between .005 - .001), N1 and N2 are my population sizes (~200), and x is a value between 0 and 1. The values I'm testing are usually between -.25...
2005 Apr 17
3
generalized linear mixed models - how to compare?
Dear all,
I want to evaluate several generalized linear mixed models, including the null
model, and select the best approximating one. I have tried glmmPQL (MASS
library) and GLMM (lme4) to fit the models. Both result in similar parameter
estimates but fairly different likelihood estimates.
My questions:
1- Is it correct to calculate AIC for comparing my models, given that they use
quasi-likelihood estimates? If not, how can I compare them?
2- Why the large differences in likelihood estimates between the two procedures?
Thanks,
Nestor
2004 Jan 16
2
individual likelihoods
Dear all,
is there a way to extract individual likelihoods from a glm/lrm object?
By individual likelihoods, I mean the likelihoods whose product give the
overall likelihood of the model.
I guess the code in the base package, used to compute the Akaike Information
Criterion may help me.
However, I couldn't figure it out, probably because I'm rathe...
2012 Apr 30
2
The constant part of the log-likelihood in StructTS
Dear all,
I'd like to discuss about a possible bug in function StructTS of stats
package. It seems that the function returns wrong value of the
log-likelihood, as the added constant to the relevant part of the
log-likelihood is misspecified. Here is an simple example:
> data(Nile)
> fit <- StructTS(Nile, type = "level")
> fit$loglik
[1] -367.5194
When computing the log-likelihood with other packages such as KFAS and FKF,
the logli...
2004 Feb 22
6
help for MLE
Dear Sir/Madam,
I am using R version 1.8.1. I am doing following tast:
First generate 100 Gaussion(3,1) numbers, then write the likelihood function
to estimate the parameters of Gaussian distribution by direct maximizing the
likelihood function.
My likelihood function is:
>fn<-function(x)
>(-50*log((sd(x))^2))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mean(x))^2))
After I input above function, the '' >...
2011 Dec 17
2
Problem with reproducing log likelihood estimated with ghyp package
I was playing around with the ghyp package and simulated series of
t-distributed variables when suddenly i was not able to reproduce the log
likelihood values reported by the package. When trying to reproduce the
likelihood values, I summed the log(dt(x,v)) values and it worked with some
simulated series but not all.
Is there any obvious flaws with this script?
library("ghyp")
series_1=rt(10000,4)
#simulating 10000 relation of stude...
2000 Jul 28
3
log likelihood and deviance
I'm fitting glm models and the summary gives the deviance of the model .
I would like to obtain the log likelihood
How can I do ?
Thanks
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:...
2005 Dec 22
2
Testing a linear hypothesis after maximum likelihood
I'd like to be able to test linear hypotheses after setting up and running a
model using optim or perhaps nlm. One hypothesis I need to test are that
the average of several coefficients is less than zero, so I don't believe I
can use the likelihood ratio test.
I can't seem to find a provision anywhere for testing linear combinations of
coefficients after max. likelihood.
Cheers & happy holidays,
Peter
2006 Jan 23
1
weighted likelihood for lme
Dear R users,
I'm trying to fit a simple random intercept model with a fixed intercept.
Suppose I want to assign a weight w_i to the i-th contribute to the log-likelihood, i.e.
w_i * logLik_i
where logLik_i is the log-likelihood for the i-th subject.
I want to maximize the likelihood for N subjects
Sum_i {w_i * logLik_i}
Here is a simple example to reproduce
# require(nlme)
> foo <- Orthodont
> lme(distance ~ 1, random =...
2004 Feb 18
3
Generalized Estimating Equations and log-likelihood calculation
Hi there,
I'm working with clustered data sets and trying to calculate log-likelihood
(and/or AIC, AICc) for my models. In using the gee and geese packages one
gets Wald test output; but apparently there is no no applicable method
for "logLik" (log-likelihood)calculation.
Is anyone aware of a way to calculate log-likelihood for GEE models?
Thanks for the help,
Bruce
2007 May 02
1
Log-likelihood function
I've computed a loglinear model on a categorical dataset. I would like to
test whether an interaction can be dropped by comparing the log-likelihoods
from two models(the model with the interaction vs. the model without).
Since R does not immediately print the log-likelihood when I use the "glm"
function, I used SAS initially. After searching for an extracting function,
I found one in R. But, the log-likelihood given by SAS is diffe...
2010 Jan 06
1
positive log likelihood and BIC values from mCLUST analysis
My question is with respect to mCLUST and the values of BIC and log
likelihood. The relevant part of my R script is:
######################### BEGIN MDS ANALYSIS #########################
#load data
data <- read.table("Ecoli33_Barry.dis", header = TRUE, row.names = 1)
#perform MDS Scaling
mds <- metaMDS(data, k = Dimensions, trymax = 20, autotransform =T...
2009 Aug 01
4
Likelihood Function for Multinomial Logistic Regression and its partial derivatives
Hi,
I would like to apply the L-BFGS optimization algorithm to compute the MLE
of a multilevel multinomial Logistic Regression.
The likelihood formula for this model has as one of the summands the formula
for computing the likelihood of an ordinary (single-level) multinomial logit
regression. So I would basically need the R implementation for this formula.
The L-BFGS algorithm also requires computing the partial derivatives of that
formul...
2010 Dec 09
1
survival: ridge log-likelihood workaround
Dear all,
I need to calculate likelihood ratio test for ridge regression. In February I have reported a bug where coxph returns unpenalized log-likelihood for final beta estimates for ridge coxph regression. In high-dimensional settings ridge regression models usually fail for lower values of lambda. As the result of it, in such settings...
2010 Oct 02
1
[Fwd: RE: maximum likelihood problem]
I forgot to add that I first gave a starting value for K.
Nonlinear least squares won't work because my errors are not normally
distributed.
Any advide on my maximum likelihood function would be greatly appreciated.
---------------------------- Original Message ----------------------------
Subject: RE: [R] maximum likelihood problem
From: "Ravi Varadhan" <rvaradhan at jhmi.edu>
Date: Fri, October 1, 2010 5:10 pm
To: mlarkin at rsmas.miami.edu...
2011 Mar 08
0
nlme: Computing REML likelihood value from ML likelihood value
Dear All,
I have a question concerning the computation of the value of the Restricted Maximum Likelihood (REML) function evaluated at a given set of parameter estimates from the Maximum likelihood (ML) value. Following the book of Fitzmaurice, Laird and Ware (2004) "Applied Longitudinal Analysis" pp101, the REML likelihood can be computed by multiplying the ML likleihood by the square root o...
2006 May 07
1
model selection, stepAIC(), and coxph() (fwd)
Hello,
My question concerns model selection, stepAIC(), add1(), and coxph().
In Venables and Ripley (3rd Ed) pp389-390 there is an example of using
stepAIC() for the automated selection of a coxph model for VA lung cancer
data.
A statistics question: Can partial likelihoods be interpreted in the same
manner as likelihoods with respect to information based criterion and
likelihood ratio tests? It seems that they should be treated as
quasilikelihoods which would make stepAIC() invalid and would require the
use of add1() with a F-test for the reduction in deviance.
An...
2012 May 31
1
Higher log-likelihood in null vs. fitted model
Two related questions.
First, I am fitting a model with a single predictor, and then a null model
with only the intercept. In theory, the fitted model should have a higher
log-likelihood than the null model, but that does not happen. See the
output below. My first question is, how can this happen?
> m
Call: glm(formula = school ~ sv_conform, family = binomial, data = dat,
weights = weight)
Coefficients:
(Intercept) sv_conform
-2.5430 0.2122
Degrees of Free...
2005 May 13
1
multinom(): likelihood of model?
Hi all,
I'm working on a multinomial (or "polytomous") logistic regression
using R and have made great progress using multinom() from the nnet
library. My response variable has three categories, and there are two
different possible predictors. I'd like to use the likelihoods of
certain models (ie, saturated, fitteds, and null) to calculate
Nagelkerke R-squared values for various fitted models.
My question today is simple: once I have fitted a model using
multinom(), how do I find the likelihood (or log likelihood) of my
fitted model? I understand that this value...
2011 Nov 16
2
Error in random walk Metroplis-hasting
Hi R community,
I have some data set and construct the likelihood as follows
likelihood <- function(alpha,beta){
lh<-1
d<-0
p<-0
k<-NULL
data<-read.table("epidemic.txt",header = TRUE)
attach(data, warn.conflicts = F)
k <-which(inftime==1)
d <- (sqrt((x-x[k])^2+(y-y[k])^2))^(-beta)
p<-1 - exp...