Hello,
I have two questions about, standard error :
1. I tried to compute them manually and i don't get the same result as SAS
2. I don't know how the standard error is calculated (and why it's positive) for a single frequency modality.
Here's a data set :
Data TABLE;
Input Model $12. TI_NUM 4.2;
(Sorry, Input line is wrong, i don't know what's the right format to put...)
Datalines;
SAXO 86.04
MEGANE II 38.53
MODUS 43.33
307 43.36
C4 II 43.7
QASHQAI 45.64
C4 47.08
C4 50.34
C4 PICASSO 55.9
MASTER 34.56
YARIS III 35.22
206 36.59
AURIS 39.35
ELANTRA 40.54
208 40.85
307 41.64
206 41.86
207 42
TINO 43.07
CLIO IV 44.4
206 48.96
CLASSE B 53.31
208 53.32
A3 SPORTBACK 53.91
DS4 55.2
MINI 59.9
GOLF III 27.38
CLIO 31
206 32.87
208 35.59
;
run;
So you have on the left the model of car and on the right the price of a car insurance.
I ran a :
proc glm data=Table;
class MODEL ;
model TI_NUM = MODEL / solution;
quit;
run;
For instance, if we look at the Model "206", there are four observations, for which we observe the following prices : 36,59 ; 41,86 ; 48,96 ; 32,87.
The Standard error should be :
Standard.Deviation(36,59 ; 41,86 ; 48,96 ; 32,87)/SQRT(4) = 3.49 , no ?
I'm sure I'm wrong, but i would be very greatful to you if you could shed some light on this 🙂
Besides, I don't get how there can be a standard error or 9.54 for the 1 frequency level of the variable model; and why they all have the same Standard Error (which is 9.54).
I thank you very much for your help. This forum is of great healp to me.
In your earlier thread, @Rick_SAS linked to the formula. It is essentially calculated as a function of the sum of squares for error divided by the degrees of freedom for error, and not the variance or standard deviation of the values in just that level of variable MODEL.
Standard errors have to be either zero or positive, they cannot be negative.
Thank you PaigeMiller for your answer.
In this case, how can I get all the informations about variance and mean for each level of a categorical variable, as it is represented on this plot (which is an output of prc glm); but under the form of a general table, for every variable of my model ?
Thank you.
or
I point out that these do not produce the "standard error of a coefficient" which comes from a statistical model, as your title requests. These produce a descriptive statistics and the standard error of those descriptive statistics, and these are different than the results from a statistical model fit to the same data.
So I guess the real question is: what specifically do you want to compute? It's not clear from the words you have written, which are somewhat contradictory.
One key to notice is that the standard error from PROC GLM is not the standard error of your full sample. The PROC GLM standard error of <model> can be obtained by adding in a LSMEANS statement
MEANS model/stderr;
SteveDenham
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.