Charles,
I am not sure the answer to me question, given a dataset, how can one compare 
the fit of a model of the fits the data to a mixture of two normal 
distributions to the fit of a model that uses a single normal distribution, can 
be based on the glm model you suggest. 


I have used normalmixEM to fit the data to a mixture of two normal curves. The 
model estimates four (perhaps five) parameters: mu1, sd^2 1, mu2, sd^2, (and 
perhaps lambda, the mixing proportion. The mixing proportion may not need to be 
estimated, it may be determined once once specifies mu1, sd^2 1, mu2, and 
sd^2.) Your model fits the data to a model that contains only the mean, and 
estimates 2 parameters mu0 and sd0^2.  I am not sure that your model and mine 
can be considered to be nested. If I am correct I can't compare the log 
likelihood values from the two models. I  may be wrong. If I am, I should be 
able to perform a log likelihood test with 2 (or 3, I am not sure which) DFs. 
Are you suggesting the models are nested? If so, should I use 3 or 2 DFs?


May thanks,
John





John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and Geriatric 
Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing) 

>>> "Charles C. Berry" <ccbe...@ucsd.edu> 09/22/15 6:23 PM >>>
On Tue, 22 Sep 2015, John Sorkin wrote:

>
> In any event, I still don't know how to fit a single normal distribution 
> and get a measure of fit e.g. log likelihood.
>

Gotta love R:

> y <- rnorm(10)
> logLik(glm(y~1))
'log Lik.' -17.36071 (df=2)

HTH,

Chuck





Confidentiality Statement:
This email message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized use, disclosure or distribution is prohibited. If you are not 
the intended recipient, please contact the sender by reply email and destroy 
all copies of the original message. 
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to