[rkward-devel] New plugin and functions

I. Soumpasis nono.231 at gmail.com
Thu Apr 19 18:53:43 UTC 2007


2007/4/19, Thomas Friedrichsmeier <thomas.friedrichsmeier at ruhr-uni-bochum.de
>:

>
> > Here are my thoughts. (Limited responsibility, because there is some
> time
> > passed since I wrote it nd I do not remember all the things I thought
> then
> > plus I do not have an SPSS right now).
> > 1. A small problem we have to see. If we use more than two variables the
> > format of the result changes. As I remember of the SPSS crosstabulation
> > they have one dependent and many independent variables. In this way we
> > could crosstabulate the dependent with each independent and then put
> them
> > in a table. Do you find this a sound solution?
>
> I don't think table() has the notion of dependent and independent
> variables at
> all. It simply generates all combinations of levels, and then counts, how
> often those occur. xtabs() can do the same, or alternatively sum up the
> values in an additional field (which will typically already contain
> counts).
> Is that what you had in mind?


The problem is not exactly the output format, but the results. Sorry, but
the data I have can not be dismissed for now. I 'll try to give an example.
If we use table for three variables which have 3 values we will get as
results:

For variable3 value1
the table of variable 1 variable2

For variable3 value2
the table of variable 1 variable2

For variable3 value3
the table of variable 1 variable2

Using ftable we get more fancy results

Variable 1 Variable 2 Varable3 Value1 Value2 Value3
Value1      Value1
                Value2
                Value3
Value2     Value1
                Value2
                Value3
Value3      Value1
                Value2
                Value3

This is better, but can not be plotted. Both have problems using many
variables.

I think the output format is something to worry about last. rk.print() will
> already handle 3+ dimensional tables, and in light of the next issues, we
> may
> have to break up the table for 3 or more dimensions, anyway. I'd say, for
> now, let's think about what would be nice, without worrying too much about
> the details.
>
> > 2. SPSS also does one barplot for every crosstabulation. With the above
> > solution is easiest to be done for ever pair dependent-independent we
> have.
> > The only minus is that we have to stop offering preview,
> something  logical
> > because here we have an analysis, not a plotting plugin.
>
> We could still offer a preview for the first table (ok, now I am slightly
> worried about how to code this, but it should be doable).
>
> > 3. Same with chisquare test.
>
> Yes, this would need to be calculated for each 2 dimensional slice,
> separately.
>
> The way I thought to implement all three parts (using "dependent" and
"independent" variables) is something like this pseudocode:
for (i=0; i<length(independents), ++i){
table (dependent, independents[i])
barplot (table (dependent, independent[i]))
chisq.test (dependent, independent[i])
}

I do not know how doable is this. I also do not know if we can and how to
count the number of the "independent" variables. How do you see this idea?

(To explain the way I use "depenedent" and "independent", I mean as
independent a variable that explains the dependent. Eg. I would like to see
if how often going to the gym has a relationship and in what extend with
heart attacks. In this way heart attacks are "dependent" of "independent"
variable "how often going to he gym".)

Regards,
Ilias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070419/6c14ce75/attachment.html>


More information about the Rkward-devel mailing list