[R] log likelihood and optimize

2014-09-04 Thread tonia marks
Hello I want to estimate the covariance matrix of the likelihood f(x1,x2,x3)=f(x2|x1)f(x3|x2)f(x1), where f(x2|x1) follows a Binomial distribution with parameters (2, 0.2), f(x3|x2) follows a Binomial distribution with parameters (2, 0.8) and f(x1) follows a Binomial distribution with

[R] log likelihood and deviance

2010-06-06 Thread Yunteng Lao
Hi Prof Brain Ripley, If we know the residual of the model, how could we calculate the Log likelihood? Thanks for your help, Yunteng Lao [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] log likelihood and deviance

2010-06-06 Thread Arnaud Le Rouzic
Hi, If we know the residual of the model, how could we calculate the Log likelihood? It depends on the model (lm? glm? nls?). Why not using directly the logLik function? x - rnorm(100, 10) y - rnorm(100, 10) model1 - lm(y ~ x) logLik(model1) model2 - glm(y ~ x, family=gaussian) logLik(model2)

Re: [R] log likelihood

2008-11-23 Thread Ben Bolker
Joseph Magagnoli jcm331 at gmail.com writes: I ran a Weibull model, and I am wondering if there is any way to extract the log likelihood. I tried loglik(model) but it does not seem to work any help would be greatly appreciated joe You have to tell us what you mean by ran a Weibull

[R] log likelihood

2008-11-21 Thread Joseph Magagnoli
Hi all, I ran a Weibull model, and I am wondering if there is any way to extract the log likelihood. I tried loglik(model) but it does not seem to work any help would be greatly appreciated joe [[alternative HTML version deleted]] __

[R] log likelihood

2008-11-21 Thread Joseph Magagnoli
Hi all, I ran a Weibull model, and I am wondering if there is any way to extract the log likelihood. I tried loglik(model) but it does not seem to work any help would be greatly appreciated joe [[alternative HTML version deleted]] __

[R] Log likelihood of Gamma distributions

2008-05-20 Thread Edward Wijaya
Dear all, How can I compute the log likelihood of a gamma distributions of a vector. I tried the following. But it doesn't seem to work: samples-c(6.1, 2.2, 14.9, 9.9, 24.6, 13.2) llgm - dgamma(samples, scale=1, shape=2, log = TRUE) It gives [1] -4.291711 -1.411543 -12.198639 -7.607465

Re: [R] Log likelihood of Gamma distributions

2008-05-20 Thread Xiaohui Chen
The scale of log-likelihood depends on the number of your data samples, you should sum over the log-densities from individual points: sum(llgm) Xiaohui Edward Wijaya 写道: Dear all, How can I compute the log likelihood of a gamma distributions of a vector. I tried the following. But it

Re: [R] Log likelihood of Gamma distributions

2008-05-20 Thread Edward Wijaya
Dear Xiaohui, Thanks. The scale of log-likelihood depends on the number of your data samples Can you explain what do you mean by this? For example if I have 10 data points. Should I use scale=10 ? And how about shape parameters. What's the rule to choose its value? Hope to hear from you

Re: [R] Log likelihood of Gamma distributions

2008-05-20 Thread Xiaohui Chen
By the scale of log-likelihood, I did not mean the scale parameter of the gamma density... Generally, as you get more and more data, the log-likelihood will get more and more negative. Hence, what I mean by scale is how negative of the values of loglik. So the 10 values returned from your dgamma

[R] Log likelihood estimation using bivariate archimedean copula

2008-05-09 Thread kakul modani
Hi all, I am trying to build a copula model using the Gumbel Copula and I have two marginal distributions.I know the marginal parameters by using the fitdistr() and optim().The problem is I dont know my copula parameter. I am getting a bit confused of how shall I go about it.I read the previous

[R] log-likelihood/MISE from spline

2008-03-19 Thread Tarek Salman Khan
Hi R users!!! I am looking for a very short command to get the log-likelihood (penalized log-likelihood)/MISE while using the B-spline (bs()), smooth.spline(), or cubic spline. Is it possible to get that result from the existing commands? And can give some instruction to compute it either. Tarek