s-news
[Top] [All Lists]

panel function mathdensity: How to get the parameters into that??

To: s-news@lists.biostat.wustl.edu
Subject: panel function mathdensity: How to get the parameters into that??
From: Karin <twentestat@yahoo.com>
Date: Mon, 4 May 2009 02:01:19 -0700 (PDT)
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1241427680; bh=1nMS+B0OYDJZUjENUxwIb6d1r36JospHSr4r5CsRxjU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SqSkdkhDvE75h2Qm+G2ArXAZ/Eem5nl20zcnxc706KDXx+QzFD0ZLvOTTjyW1AALSxgY2MIIea/mMiklxdFR17qNI61CdFOzLTt2yDoSgXYEmvCfqvgg2zBv/I8nw6fsqxAiT3m1PAC0X+8eBj9eCSqg+0UioiFG+/9WoSaUoF4=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=iJ/Uezsd2BwP4O8dnHYYsVhjMrOBbflU8hMyktAHtVnPayoEWBlvp+zmE8p+3BaQewIRdz/5S47t+O/+zojH88nTlD77BnlVFyZsDE8mvxQNYnGfhaW1Xh6cq6c7jGwfxl6cLV7LmvMKueGafsTMrLp91vajRmJ7hyO5Vmm4prk=;
Hello,

I am looking for a hint in the following:

I have observations on 'ydata' (relative duration) for several muscles (MUSCLE) 
and during several activities (ACT_2). Now I want to plot histograms of 
ydata with a panel function for each muscle and activity. Next to the histogram 
I want to plot the estimated beta distribution for that panel with 
panel.mathdensity. But how can I get the parameters for the beta distribution 
per panel into the panelfunction (shape1 and shape2)
?

histogram( ~ ydata | MUSCLE*ACT_2,data=temp2,xlab="Relative duration", type = 
"density",
          panel = function(x, ...) {
              panel.histogram(x, ...)
              panel.mathdensity(dmath = dbeta, col = "black",
                                args = list(shape1=??,shape2=???? )))
          } )

Thanks in advance,

Karin Groothuis


  


<Prev in Thread] Current Thread [Next in Thread>