[R] Lmer plot help
Michael Friendly
friendly at yorku.ca
Sun Sep 4 21:08:25 CEST 2011
On 9/3/2011 7:52 PM, drewmac wrote:
> Hello all
>
> I'm running the lme4 package on my binomial data, and I'm happy with the
> model and the resultant plot. However, I'd like to plot my table data, which
> has: two IVs, and one DV. You can see an example below, where 'attractive'
> = question (IV), male = condition(IV/predictor) and no/yes = answer (dv).
> I'm using the table to investigate what questions act differently to the
> others, so I can better fit my model. Going through tables of numbers
> doesn't seem the most efficient way of instantly seeing what questions work
> differently, and I'd like to plot that.
Modulo the lme4 reference, for which you provide no data, details, code
or context, you will probably find some suitable visualization methods
in the vcd package, with a tutorial vignette and some extensions in the
vcdExtra package.
These include mosaic plots, fourfold plots, and a variety of specialized
plots within the strucplot framework, which have close
relations to models for n-way frequency tables.
>
> Here is my code:
>
> table(finaldata$Voice, finaldata$supportive, finaldata$question)
> #generates my table#
>
>
From your description above and the output below, it is not clear
whether you just want to view the associations within this table
or to compare the associations across the elided levels of
finaldata$question. Maybe somethings like [untested]
mytab <- table(finaldata$Voice, finaldata$supportive, finaldata$question)
mosaic(Voice, supportive, data=mytab)
mosaic(supportive ~ Voice|question, data=mytab)
would get you started.
Also, you have 4 levels for finaldata$Voice, which seem to imply
that these might be a 2x2 combination of Voice.gender and Voice.type
or something like that.
>
>
> , , = attractive
>
>
> no yes
> male1 28 35
> male2 20 22
> female1 21 21
> female2 30 19
>
> Any help most appreciated.
>
> Drew
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Lmer-plot-help-tp3788613p3788613.html
> Sent from the R help mailing list archive at Nabble.com.
>
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street Web: http://www.datavis.ca
Toronto, ONT M3J 1P3 CANADA
More information about the R-help
mailing list