Displaying 20 results from an estimated 2917 matches for "likelihoods".
Did you mean:
likelihood
2011 Apr 20
1
What to do with positive likelihoods
...g up the values I was going to test and their variances, and just running the likelihood on these summed values once (getting one final likelihood in return). I've recently switched this over to running the likelihood on each data point and its associated variance one at a time, and summing the likelihoods afterwards. However, upon doing this, I'm now getting positive likelihoods since the individual variances are so small (.01 to .09, for instance). I'm not sure what to do, because I think these small variances are messing up the behavior of my final data -- the patterns I'm getting are...
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
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 rather...
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
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
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")
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
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
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
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 differ...
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 =TRUE,
noshare = 0.1,
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
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 the ridge regressions have higher values of lambda (e.g.
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
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
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
...e: 786.1
Residual Deviance: 786.1 AIC: 761.9
> logLik(m); logLik(null)
'log Lik.' -380.1908 (df=2)
'log Lik.' -379.9327 (df=1)
>
My second question grows out of the first. I ran the same two model on the
same data in Stata and got identical coefficients. However, the
log-likelihoods were different than the one's I got in R, and followed my
expectations - that is, the null model has a lower log-likelihood than the
fitted model. See the Stata model comparison below. So my question is,
why do identical models fit in R and Stata have different log-likelihoods?
--------------...
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(-alpha*d)
for(i in 1:100){