This might not be the correct forum for this question for there might be some flaws in my logic so the R function I'm looking for might not be the correct, but I know there’s a lot of smart people in this forum so please correct me if I'm wrong. I have been googling and searching in this forum for something useful but so far I'm out of luck.
This is the background to my problem. I have a set of samples that I know are either from a normal distribution or a bivariate normal distribution and my goal is to find the combination of samples that would give the best fit of a bivariate distribution. I'm currently using maximum likelihood estimation to fit the bivariate normal model but this is where my problems start. How do I find in an efficient way the best combination, is there a function would do the trick for me? One solution is to run an exhaustive search, but this would take a while since the possible combinations is huge. So hopefully this is my last option. My other problem is what test should I use to rank the models, WALD, F-test or likelihood ratio-test (LR-test)? My colleague thought that the LR-test would be the best to use, but he was not sure. And in that case which function is best to use. I have found some LR tests but they use fits from glm models etc. Here is an example of my problem. library(mixtools) x.1<-rmvnorm(40, c(0, 0)) x.2<-rmvnorm(60, c(3, 4)) x.3<-rmvnorm(100, c(0, 0)) X.1<-cbind(rbind(x.1, x.2),x.3) colnames(X.1) =LETTERS[1:4] sample A and B is bivariate and C and D is not, so theoretically the best combination would be to use A and B in the model since they change at the same time, but other combinations with a bivariate and non bivariate combinations would also work but should give a worse fit than A and B. And the worst case would be to fit a bivariate distribution to C and D. So this is the case... Regards Tom -- View this message in context: http://www.nabble.com/Help-finding-the-proper-function-tp20121371p20121371.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.