04-06-2012 12:36 AM
I am sorry to ask a question that is not directly related to SAS; but I really have a hard time to understand fixed/random effect...
I was told that gender should be considered fixed. Suppose I have data such as:
|Height (Y)||Gender (X)|
And I was told that the fixed model is:
Y = X*Beta + e
My question is: What does this model mean? what is beta (is beta just like a coefficient in a liner regression)?
04-06-2012 10:38 AM
Thank you for replying.
In the text book, beta is said to be the "fixed effect"; however, I can hardly understand what "fixed" means.
Can someone educate me using a real example with numbers to explain what "fixed" means? thank you very much.
04-06-2012 10:52 AM
The SAS/STAT documentation has a section on fixed and random effect models:
You can do an internet search of "mixed versus random effects" to find many Web pages and course notes on this topic.
04-06-2012 02:13 PM
I actually googled a lot ; however all I found is mathematical expression from which I couldn't get an intuitive idea about "fixed effect".
If using my example provided in the original post, I get:
Height = Gender *5 +e
Is this "5" fixed effect? How to interpret it?
04-07-2012 12:06 AM
Conceptually, beta represents two values, one for Gender=male and one for Gender=female, Beta*X means "a different value of beta, depending on the value of X (Gender)". The e term represents the unexplained variability in Height. The fact that it does not depend on X means that the random variation is similar for males and females.
The effect is called fixed to distinguish it from random effects. Fixed effects are the type of effects that correspond to everybody's intuition.
Hope this helps a bit.
04-08-2012 12:20 PM
Thank you very much for help. So "fixed" means: the beta is a fixed number, right?
Now suppose the example given in the original post changes to:
Because only male is selected for variable Gender, according to the text book , Gender is now a random effect,; and the model becomes:
Y = Z * Gamma + e
In which Z ~ N (0, R2)
My question is:
1. how come Z is not a fixed number, but a random number? What is the rationale behind these?
2. why the expected mean of Z is 0?
Thank you very much in advance for your patience and time.
04-08-2012 03:42 PM
Is your textbook about statistics, or phylosophy? There is no information about the effect of gender in that dataset. All it tells you, given our knowledge of the existence of another gender, is that the data is only about males. Maybe it is only about Italian adult males with blue eyes! Those are properties of our sample and must be taken into consideration when using our model. But models are about explaining variation; parameters that do not vary in our data are useless to that end.
I didn't want to get into the explanation of random effects because 1) I am not a teacher and 2) it is unnessary confusing information for a beginner. A bit like trying to learn about mechanics and quantum mechanics at the same time. But since you insist, I hope the following can be useful.
Random effects are factors that are suspected of causing variation but for which we do not have access to the whole set. Take for instance the clinic in which a treatment is tested. We think the efficacy of the treatment might vary from one clinic to the next and we would like to quantify that effect. On the other hand, we don’t care much about the difference between any two particular clinics involved in our study; we just hope that they were typical clinics. So, all we intend to do with a random effect like the clinic in our example is estimate the variance that it adds to our measurements.
04-09-2012 02:45 AM
If your equation could be :
Y = (X+e)*Beta + e
then it is a mixed effect. which means X is unstable(has a random item 'e').
Y = Alpha + X*Beta + e
is also fixed effect.
Y = (Alpha+e) + X*Beta + e
is mixed effect. which is usually used when X is conform Possion Distribution(which describe the
distribution of number of a even which has a low probability), Why ? because the data is very sparse .
Just like the probability of winning lottery.
So we usually assume MEAN value is unreliable which has a varying effect which is random effect.
Maybe Steve can give you a more detail explanation.
04-10-2012 10:48 AM
I kind of liked PGStat's description, and Ksharp's notation. Here's my take: A fixed effect model treats the independent variable as non-random. It is measured without error, or, if a classification variable, has all known levels. A random effect treats the independent variable as a sample from some distribution.
04-10-2012 12:09 PM
Sorry for the late response and thank you all for reply.
One thing confuses me is that:
1.some factors can be considered either fixed or random. For example, in a multi-center trial, the selected centers can be treated random (because they only represents part of the whole population of centers); but they can also be treated fixed (if investigators only interest in effects for those selected centers).
2. Based on 1, it seems I can also treat gender either fixed or random. A simple example: if a study only involve male, I can say gender is fixed if I am only interested in effects on male patients; I can also say gender is random because male only represents half of the population (Female, Male). What mistake did I make here?
04-10-2012 12:34 PM
Your questions show that you understand the concept. Yes, a factor can be considered fixed by some and random by others. It is a question of context and purpose. However, there is nothing much you can do in terms of model building with a single level of a factor. Using a single level is a known trick to reduce variability. Such as when experiments as done on clones, the objective is to eliminate any genetic variation.
04-10-2012 02:59 PM
Point 2 is not quite right. Even if a study involved males and females, you would assume gender is a fixed effect, except under some very unusual conditions. That is because the gender is measured without error (and that is where the unusual works in) and you have all levels of interest included.
04-10-2012 03:17 PM
But the point made by doudou66 is logical: if you only measure males then you could declare the gender factor random, because you do not have all levels of interest. It's logical but it doesn't lead to a good practical understanding of random effects. Some textbooks are just like that!