[R] Analysing ordinal/nominal data

Piotr Majdak piotr at majdak.com
Fri Jun 17 11:41:51 CEST 2005


Prof Brian Ripley wrote:

> On Thu, 16 Jun 2005, Piotr Majdak wrote:
> 
>> I'm looking for a solution to analyse data, which consists of
>> dichotomous  responses (yes/no) for 2 multinomial ordinal variables.
> 
> 
> Please explain how you get a binary response for a `multinomial ordinal 
> variables'?  If you intend these variables to be explanatory variables, 
> in what sense are they `multinomial'?

My data are results from a pychoacoustical experiment:
- Response: 2 levels, frequencies for "yes"/"no"
- PR: factor, independent variable, 4 levels, ordinal
- ENV: factor, independent variable, 3 levels, ordinal

The hypothesis is that:
- PR is independent of ENV, given Response
- Response and ENV are conditionally dependent, given PR
- Response and PR are conditionally dependent, given ENV

The model:

fit=glm(count ~ PR+ENV+Response + PR:Response + ENV:Response, 
data=table, family=poisson)

fits with p=0.04 only. My explanations are:
- I have a three-way interaction
- I must consider the ordinal information of PR and ENV

> One normally fits a logistic 
> regression to a binary response.
> Probably no `trick' is required, but we need to start from a complete 
> and accurate description of the model you want to fit.

I don't know how to include the interaction to the logit model.
I think the log-linear row effects model for the 3-dim. nominal-ordinal 
table (Agresti 1984, p.89) would be the right one, but please correct me 
if I'm on a wrong way:

log mijk = intercept + lambda^X_i + lambda^Y_j + lambda^Z_k +
            tau^XY_i*(v_j-v') + tau^XZ_i*(w_k-w') +
	   beta^YZ*(v_j-v')*(w_k-w')

mijk: expected frequencies for cell with indicies i,j,k
v_j: scores of Y with {v_1 < v_2 < .. < v_j}
w_k: scores of Z with {w_1 < w_2 < .. < w_k}
lambda^X_i, lambda^Y_j, lambda^Z_k: estimated parameters for X, Y and Z
tau^XY_i, tau^XZ_j: association parameters for XY and XZ
beta^YZ: association parameter for ordinal factors Y and Z

In my case, X==Response, Y==PR and Z==ENV. I presume no interaction 
between Y and Z and would like to test beta. My idea is: if beta is 
significant, this model won't hold, the saturated model fits only and I 
must calculate odds ratios and beta's from partial tables. But: how can 
I tell glm() to use something like beta*PR*ENVm in the formula? And, am 
I on the right way?

Thanks a lot for your response.

Piotr Majdak


Agresti 1984: "Analysis of ordinal categorical data". John Wiley & Sons Inc.


-- 

Piotr Majdak
Acoustics Research Institute
Austrian Academy of Sciences
Reichsratsstr. 17
A-1010 Vienna
AUSTRIA
phone: +43-1-4277-29511
fax: +43-1-4277-9296
email: piotr at majdak.com
WWW: http://www.kfs.oeaw.ac.at




More information about the R-help mailing list