[R] Simple mean trajectory (ordinal variable)

David Winsemius dwinsemius at comcast.net
Sat Jun 30 05:46:42 CEST 2012


On Jun 29, 2012, at 8:48 PM, torvon wrote:

> I'm sorry, but I wasn't aware that I should attach data (and can't,  
> because I
> must not disclose them).

No one said you needed to offer confidential data, only that you  
needed to submit a test data.frame that had the same basic structure.  
You can sibsitute factors that are just letters and numbers that are  
generaterd with rnorm().
>
> Thanks for helping me get rid of the individual points, I'm now  
> trying to
> get standard errors and - more importantly - parallel lines for  
> different
> values of a variable, e.g. history of depression YES=line1 , NO=line2.
>
> Adding group=variable, in the xyplot argument doesn't have any effect.

There are two ways to do grouping: with the group= argument and with  
the bar "|" formula mechanism   .... but again, the expectation is  
that you will provide a sensible test dataset.
>
> Sorry, I really did read through the xyplot document and the help, and
> googled this problem, but found no solution.

The help page for xyplot is long and detailed. Sometimes is is better  
to start with

?Lattice

And don't forget:

?panel.xyplot

-- 
David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list