Login  Register

Re: proportions: (a,b,c)/3 vs d?

Posted by Ryan on Nov 11, 2014; 2:58pm
URL: http://spssx-discussion.165.s1.nabble.com/proportions-a-b-c-3-vs-d-tp5727795p5727858.html

Steve,

Whether or not such a test is meaningful has been rightfully called into question. Having said that, it is certainly possible to test that very hypothesis. Assuming you didn't have such sparse data (making it reasonable to employ maximum likelihood estimation of parameters), I would recommend you fit a multinomial logistic regression model without any predictors, and perform the contrast by estimating the SE via the delta method  via the NLMIXED procedure in SAS. Here is the untested code:

proc nlmixed data = multinomial_response;
  parms beta1_0 0 beta2_0 0 beta3_0 0;
  eta1 = beta1_0;
  eta2 = beta2_0;
  eta3 = beta3_0;
  prob1 = exp(eta1) / (1 + exp(eta1) + exp(eta2) + exp(eta3));
  prob2 = exp(eta2) / (1 + exp(eta1) + exp(eta2) + exp(eta3));
  prob3 = exp(eta3) / (1 + exp(eta1) + exp(eta2) + exp(eta3));
  prob4 = 1 / (1 + exp(eta1) + exp(eta2) + exp(eta3));
  if y = 1 then loglike = log(prob1); else
  if y = 2 then loglike = log(prob2); else
  if y = 3 then loglike = log(prob3); else
                loglike = log(prob4);
  model y ~ general(loglike);
  estimate 'contrast' (prob1 + prob2 + prob3)/3 - prob4;
run;


The dataset should be constructed as follows:

ID  y
1   1
2   1
3   2
4   1
5   3
6   2
7   4
8   4
9   3
.
.
.


Ryan

On Wed, Nov 5, 2014 at 6:35 PM, Salbod, Mr. Stephen <[hidden email]> wrote:
Bruce, thank you for the code. It getting me to see where my problem is. The expected values are a problem because I've no idea what to expect. If everything worked perfectly, d would have n = 111: that is why I went with a focused contrast (df=1). I think it is boiling down to how to calculate the associated SE.

--Steve

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Wednesday, November 05, 2014 4:40 PM
To: [hidden email]
Subject: Re: proportions: (a,b,c)/3 vs d?

It sounds to me like you want a chi-square goodness of fit (GOF) test.  But I cannot yet work out what your expected frequencies are under the null hypothesis.  IF the null stated equal proportions in the 4 categories, it would be something like this, I think, with the second test using NewCat being the one that contrasts 1-3 vs 4.

DATA LIST LIST /Category Kount(2F5.0) .
BEGIN DATA.
1 13
2  2
3 11
4 85
END DATA.

WEIGHT by Kount.
FREQUENCIES Category.

* Chi-square GOF test with all 4 categories,
* and a null hypothesis stating that 25% of
* the observations fall in each category.
NPAR TESTS
  /CHISQUARE=Category
  /EXPECTED= .25 .25 .25 .25
  /STATISTICS  DESCRIPTIVES
  /MISSING ANALYSIS.

RECODE Category (1 2 3 = 1)(4=2) INTO NewCat.
FORMATS NewCat(F1).
FREQUENCIES NewCat.

* Chi-square GOF test with catgegories 1-3
* combined vs category 4, and a null hypothesis
* stating that 75% of the cases fall in categories
* 1-3 and 25% fall in category 4.
NPAR TESTS
  /CHISQUARE=NewCat
  /EXPECTED= .75 .25
  /STATISTICS  DESCRIPTIVES
  /MISSING ANALYSIS.

But as I said, I'm not at all sure that /your/ null specifies equal proportions in the 4 categories.

HTH.



Salbod wrote
> Hi Art, 2/111 = .018.
>
> I might not be asking the right question. One hundred and eleven
> students heard an actor give a video message and selected the
> emotional tone of the message.  The message was a single sentence. The
> actor had been given the intent message. I want to test whether the IV
> was working. I thought a contrast within each message should do the
> trick? Is there another way to skin the cat?
>
> --Steve
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:

> SPSSX-L@.UGA

> ] On Behalf Of Art Kendall
> Sent: Wednesday, November 05, 2014 11:59 AM
> To:

> SPSSX-L@.UGA

> Subject: Re: proportions: (a,b,c)/3 vs d?
>
> How did you get a proortion of .018 with an n of 2?
> 0/2 =0, 1/2=.5 2/2=1.0
>
>
>
> -----
> Art Kendall
> Social Research Consultants
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/proportions-a-b-c-3-vs-d
> -tp5727795p5727797.html Sent from the SPSSX Discussion mailing list
> archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the command. To leave the
> list, send the command SIGNOFF SPSSX-L For a list of commands to
> manage subscriptions, send the command INFO REFCARD
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the command. To leave the
> list, send the command SIGNOFF SPSSX-L For a list of commands to
> manage subscriptions, send the command INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/proportions-a-b-c-3-vs-d-tp5727795p5727810.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD