Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Random permutation test for rank-dependence
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: Random permutation test for rank-dependence
Date
Tue, 29 Jan 2013 15:54:46 +0100
That is incorrect, it very much depends on the exact model and how you
use -predict-. The options available to you are typically documented
in -help <progname>_postestimation-, where <progname> is the name of
the program you used to estimate your model. So in your case it would
be -help xtprobit_postestimation-.
Your first step would be the specify why coefficients would be
different across persons: is it because of interaction effects or
because they are random? In both cases -predict- can give you what you
ask for. For the former I would (temporarily) change and further
controll variables to 0 and use predict with the -xb- option. For the
latter, you could use -xtmelogit- instead and afterwards use the
-reffects- option for -predict-.
-- Maarten
On Tue, Jan 29, 2013 at 3:05 PM, Tobias Morville
<[email protected]> wrote:
> Hi Maarten. Yes i did.
>
> If i understand it correctly, -predict- gives me the predicted values
> (and se.) for the entire model, and not the parameter values of the
> regressors.
>
> 2013/1/29 Maarten Buis <[email protected]>:
>> Did you take a look at -predict-?
>>
>> On Tue, Jan 29, 2013 at 9:36 AM, Tobias Morville wrote:
>>> Hi Nick. Thanks for pointing out the -permute- command, don't know how
>>> i've missed it.
>>>
>>> Im still on bare ground with regard to Q1. If anyone has any input,
>>> ill appriciate it.
>>>
>>> best,
>>> Tobias
>>>
>>> 2013/1/28 Nick Cox <[email protected]>:
>>>> I haven't tried to understand all this, but your opening to Q2 is
>>>> incomplete. Stata has a -permute- command that transcends the specific
>>>> oldstyle testing commands you mention.
>>>>
>>>> I won't be able to add more, but if you overlooked that, you probably
>>>> overlooked other things too.
>>>>
>>>> Nick
>>>>
>>>> On Mon, Jan 28, 2013 at 5:23 PM, Tobias Morville
>>>> <[email protected]> wrote:
>>>>
>>>>> i have a question regarding random permutation testing in stata.
>>>>>
>>>>> I need to test for rank-dependence and sign-dependence, over several
>>>>> variables within each subject, and across subjects. Doing that i have
>>>>> two basic questions. But first, this is the (simplified) model I'm
>>>>> estimating:
>>>>>
>>>>> Model: -xtprobit dummy var1 var2 var3 var1*var2 var1*var3, re-
>>>>>
>>>>> And I'm doing this for 18 different subjects, that each have ~250
>>>>> observations. They are all stacked onto each other, in one dataset.
>>>>>
>>>>> Q1: How [...] do i add parameter coefficients as new
>>>>> variables? I've googled this, and stumbled upon -estimates- module and
>>>>> -statsby-. But none of them really satisfy my needs.
>>>>>
>>>>> What i really want, is a new variable (in a column) where parameter
>>>>> estimates are continuously reported to. Lets say subject_1 has 250
>>>>> trials, then I want 250 values of b1 - which i assume is the parameter
>>>>> coefficient of var1 - to be my new variable. And so forth with all the
>>>>> other subjects, resulting in my new b1-parameter-value-variable having
>>>>> 18*~250 observations.
>>>>>
>>>>> I've done, -Estimates store- just produces b1 b2 b3 b4 b5, a "group
>>>>> level" coefficient for each of the variables (and interaction terms),
>>>>> which is not really satisfying for my need when wanting to do a random
>>>>> permutation test.
>>>>>
>>>>> Q2: For the random permutation test, stata has two non-parametric
>>>>> choices. -Ranksum- and -Median-, where the first only allows testing
>>>>> between two groups and the latter is an equility-of-median test, which
>>>>> is not really useful for me.
>>>>>
>>>>> Basically i would like to do a -ranksum- test, but between all 18
>>>>> subjects, which ranksum does not allow. Is there any alternative way
>>>>> of doing this?
>>>>>
>>>>> Background:
>>>>>
>>>>> I have a variable that is randomly distributed (it's a die) and i want
>>>>> to see if the number of eyes on that die affects how people gamble.
>>>>> When i include it as a simple regressor, it shows up significant. But
>>>>> not knowing if that (not logical - a rational agent should know its
>>>>> random) weigh on the die, is the same across subjects, and within each
>>>>> subject. Basically, i want to be able to say something about "how
>>>>> much" the die weights for different subjects, but because its
>>>>> non-linear, i can't compare a coefficient value of 2 to 4, and say its
>>>>> the double effect. Neither can i say that subject 1's coefficient of
>>>>> 5, is a lower effect of subject 2's coefficient of 7. And i need to
>>>>> find out, if i can at least, say something about the rank of the
>>>>> coefficient estimates.
>>>>>
>>>>> Hope you can help me out as I'm rather lost!
>>>> *
>>>> * For searches and help try:
>>>> * http://www.stata.com/help.cgi?search
>>>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>>>> * http://www.ats.ucla.edu/stat/stata/
>>> *
>>> * For searches and help try:
>>> * http://www.stata.com/help.cgi?search
>>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>>> * http://www.ats.ucla.edu/stat/stata/
>>
>>
>>
>> --
>> ---------------------------------
>> Maarten L. Buis
>> WZB
>> Reichpietschufer 50
>> 10785 Berlin
>> Germany
>>
>> http://www.maartenbuis.nl
>> ---------------------------------
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
--
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/