BookmarkSubscribeRSS Feed
doudou66
Calcite | Level 5

Hello, all

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)
189M
165F
178M
168F

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)?

14 REPLIES 14
manojinpec
Obsidian | Level 7

I guess beta would be how the y is related to x with error e.

doudou66
Calcite | Level 5

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.

Rick_SAS
SAS Super FREQ

The SAS/STAT documentation has a section on fixed and random effect models:

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intromod_a00...

You can do an internet search of "mixed versus random effects" to find many Web pages and course notes on this topic.

doudou66
Calcite | Level 5

Thanks.

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?

PGStats
Opal | Level 21

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.

PG

PG
doudou66
Calcite | Level 5

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:

Height (Y)
Gender(Z)
172M
168M
165M
171M
175M

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.

PGStats
Opal | Level 21

Hi,

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! Smiley Happy 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.

PG

PG
Ksharp
Super User

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').

Now

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.

Ksharp

SteveDenham
Jade | Level 19

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.

Steve Denham

doudou66
Calcite | Level 5

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?

PGStats
Opal | Level 21

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.

PG

PG
SteveDenham
Jade | Level 19

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.

Steve Denham

PGStats
Opal | Level 21

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! Smiley Wink

PG

PG
doudou66
Calcite | Level 5

Thank you all very much. I really appreciate your help.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 14 replies
  • 2204 views
  • 0 likes
  • 6 in conversation