[From nobody Thu Oct 23 22:40:12 2008
Received: from mail138.messagelabs.com (216.82.249.35) by
	155M-CAHT.goldbox.com (192.168.89.65) with Microsoft SMTP Server id
	8.1.291.1; Thu, 23 Oct 2008 15:17:18 -0400
X-VirusChecked: Checked
X-Env-Sender: r-help-bounces@r-project.org
X-Msg-Ref: server-10.tower-138.messagelabs.com!1224789434!70703372!1
X-StarScan-Version: 5.5.12.14.2; banners=-,-,-
X-Originating-IP: [129.132.145.15]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
Received: (qmail 29310 invoked from network); 23 Oct 2008 19:17:15 -0000
Received: from hypatia.math.ethz.ch (HELO hypatia.math.ethz.ch)
	(129.132.145.15) by server-10.tower-138.messagelabs.com with AES256-SHA
	encrypted SMTP; 23 Oct 2008 19:17:15 -0000
Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by
	hypatia.math.ethz.ch (8.14.1/8.14.1) with ESMTP id m9NJGMWM006374;
	Thu, 23 Oct 2008 21:16:39 +0200
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hypatia.math.ethz.ch
X-Spam-Level: 
X-Spam-Status: No, score=-5.3 required=5.0 tests=AWL, BAYES_00,
	RCVD_IN_DNSWL_MED autolearn=unavailable version=3.2.5
Received: from phil2.ethz.ch (phil2.ethz.ch [129.132.202.240])	by
	hypatia.math.ethz.ch (8.14.1/8.14.1) with ESMTP id m9NJG5PM005908	for
	&lt;r-help@r-project.org&gt;; Thu, 23 Oct 2008 21:16:05 +0200
Received: from moe.its.auckland.ac.nz ([130.216.12.35]
	helo=mailhost.auckland.ac.nz) by phil2.ethz.ch with esmtp (Exim 4.66)
	(envelope-from &lt;r.turner@auckland.ac.nz&gt;) id 1Kt5f5-0002cN-9F	for
	r-help@r-project.org; Thu, 23 Oct 2008 21:16:06 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])	by
	mailhost.auckland.ac.nz (Postfix) with ESMTP id C0561481EDB;
	Fri, 24 Oct 2008 08:15:50 +1300 (NZDT)
X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch
Received: from mailhost.auckland.ac.nz ([127.0.0.1])	by localhost
	(moe.its.auckland.ac.nz [127.0.0.1]) (amavisd-new,
	port 10024)	with ESMTP id
	EFaMJwbfQYtK; Fri, 24 Oct 2008 08:15:50 +1300 (NZDT)
Received: from acemm03n.foed.auckland.ac.nz (ace-104-31.auckland.ac.nz
	[130.216.104.31])	by mailhost.auckland.ac.nz (Postfix) with ESMTP id
	F0EBB481D6F;	Fri, 24 Oct 2008 08:15:49 +1300 (NZDT)
Received: from foedmail02n.foed.auckland.ac.nz (Not Verified[130.216.104.109])
	by acemm03n.foed.auckland.ac.nz with MailMarshal (v6, 1, 8, 2172)	id
	&lt;B4900cd650000&gt;; Fri, 24 Oct 2008 08:15:49 +1300
Received: from [130.216.107.232] (130.216.107.232) by
	foedmail02n.foed.auckland.ac.nz (130.216.104.109) with Microsoft
	SMTP	Server id 8.1.291.1; Fri, 24 Oct 2008 08:15:49 +1300
In-Reply-To: &lt;20130023.post@talk.nabble.com&gt;
References: &lt;20121371.post@talk.nabble.com&gt;
	&lt;86CECCCE-91C2-4273-94FE-AE5F7868DE09@auckland.ac.nz&gt;
	&lt;20130023.post@talk.nabble.com&gt;
MIME-Version: 1.0 (Apple Message framework v752.3)
Message-ID: &lt;2F1B1AE6-68C2-4DDC-B13E-875597979CFB@auckland.ac.nz&gt;
From: Rolf Turner &lt;r.turner@auckland.ac.nz&gt;
Date: Fri, 24 Oct 2008 08:15:48 +1300
To: Tom.O &lt;tom.olsson@dnbnor.com&gt;
X-Mailer: Apple Mail (2.752.3)
X-PMWin-Version: 3.0.1.0, Antivirus-Engine: 2.79.0, Antivirus-Data: 4.34E
X-USF-Tag-Only: YES
X-USF-Filter-Node: phil2.ethz.ch
X-USF-Spam-Level: --
X-USF-Spam-Status: hits=-2.6 tests=BAYES_00
X-USF-Spam-Flag: NO
X-USF: 
CC: &quot;r-help@r-project.org&quot; &lt;r-help@r-project.org&gt;
Subject: Re: [R] Help finding the proper function
X-BeenThere: r-help@r-project.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: &quot;Main R Mailing List: Primary help&quot; &lt;r-help.r-project.org&gt;
List-Unsubscribe: &lt;https://stat.ethz.ch/mailman/options/r-help&gt;,
	&lt;mailto:r-help-request@r-project.org?subject=unsubscribe&gt;
List-Archive: &lt;https://stat.ethz.ch/pipermail/r-help&gt;
List-Post: &lt;mailto:r-help@r-project.org&gt;
List-Help: &lt;mailto:r-help-request@r-project.org?subject=help&gt;
List-Subscribe: &lt;https://stat.ethz.ch/mailman/listinfo/r-help&gt;,
	&lt;mailto:r-help-request@r-project.org?subject=subscribe&gt;
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=&quot;windows-1252&quot;; format=flowed; delsp=yes
Sender: &lt;r-help-bounces@r-project.org&gt;
Errors-To: r-help-bounces@r-project.org
Return-Path: r-help-bounces@r-project.org
X-MS-Exchange-Organization-OriginalArrivalTime: 23 Oct 2008 19:17:18.2876 (UTC)
X-MS-Exchange-Organization-AuthSource: 155M-CAHT.goldbox.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-OriginalSize: 7290
X-MS-Exchange-Organization-Recipient-Limit-Verified: True


On 24/10/2008, at 1:37 AM, Tom.O wrote:

&gt;
&gt; Ok, I'll try to be clearer.  I'll start from the beginning. I have  =

&gt; a set of
&gt; samples that I'm going to use to model a proxy for a common  =

&gt; property. This
&gt; property is that the samples are either in a &quot;quiet&quot; or &quot;chaotic&quot;  =

&gt; state.
&gt; Both the quiet and chaotic state is modelled to be normal  =

&gt; distributed. So
&gt; these samples are believed to be from a mixture of univariate normal
&gt; distributions. But some samples do not have this property and are  =

&gt; believed
&gt; only to come from a &quot;quiet&quot; state and is believed to be from a  =

&gt; univariate
&gt; normal distribution.
&gt;
&gt;
&gt; What I also know or assume to know is that when the samples that  =

&gt; are drawn
&gt; from a mixture distribution change between distributions they do that
&gt; simultaneously or near simultaneously. So each sample have a  =

&gt; probability &quot;p&quot;
&gt; of being in either state. But since some samples are from a univariate
&gt; distribution and some of the samples that are from a mixture  =

&gt; distribution
&gt; don=92t show a clear change they are no good at estimating the overall
&gt; probability of being in the &quot;quiet&quot; or &quot;chaotic&quot; state.
&gt;
&gt; What I'm looking for is the combination of samples that would give  =

&gt; med the
&gt; best proxy to model the overall state, some sort of optimizer.
&gt;
&gt;
&gt; So hopefully this clarifies my problem.

Yes it does.  Bivariate has nothing to do with your problem.  Mixtures
has everything to do with it.

Essentially your problem is testing k=3D2 versus k=3D1 where k is the number
of components in the model.  I believe there is a substantial literature
about this; you could start with G. J. McLachlan and K. E. Basford  =

``Mixture
Models:  Inference and Applications to Clustering'', Dekker, New  =

York, 1988.

I believe that the story is roughly that the test you want can be  =

carried
out via a likelihood ratio test, but that the null distribution of  =

the test
statistic is problematic.  It is ***not*** asymptotically chi-squared.
As far as I know the actual null distribution is impossible to determine
analytically, hence one is left with a single option:  Bootstrapping.

The mixtools package on CRAN may provide the facilities you need;  =

there are
other packages on CRAN which relate to mixtures.  In particular look at
Peter MacDonald's mixdist package.  I would conjecture (I haven't  =

looked)
that the latter package would provide useful pointers to the literature,
including Peter's own substantial contributions.

HTH

	cheers,

		Rolf Turner
######################################################################
Attention: =

This e-mail message is privileged and confidential. If you are not the =

intended recipient please delete the message and notify the sender. =

Any views or opinions presented are solely those of the author.

This e-mail has been scanned and cleared by MailMarshal =

www.marshalsoftware.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.
]