cancel
Showing results for 
Search instead for 
Did you mean: 

GLM

FREDY_07
Fluorite | Level 6

Re: GLM

I have got the model but it produces very impossible results. R Square equals to 1. and F equals to infinitiveSmiley Sad(

 

Ksharp
Super User

Re: GLM

Message contains a hyperlink

Here is an example .

http://blogs.sas.com/content/iml/2016/03/02/dummy-variables-sasiml.html

 

Especial this part:

Y = Cholesterol;                 /* response variable */
Intercept = j(nrow(Y), 1, 1);
X1 = designf( Sex );
X2 = designf( BP_Status );
X = Intercept || X1 || X2;      /* design matrix with EFFECT parameterization */
 
/* Matrix formulation of one-way ANOVA (cell means model): Y = X*beta + epsilon
   See https://en.wikipedia.org/wiki/Design_matrix       */
b = solve( X`*X, X`*Y );       /* solve normal equations */
print b[rowname={"Intercept" "Sex:Female" "BP_Status:High" "BP_Status:Normal"}];
FREDY_07
Fluorite | Level 6

Re: GLM

Many thanks for your response. I looked at the example that you provided. Hopefuly it would work.

Rick_SAS
SAS Super FREQ

Re: GLM

Since no one else has mentioned it....

With 55 variables and only 40 observations, you have an overspecified system.  There are enough parameters to fit the data exactly, which is why you are seeing R-square=1.  However, the model is meaningless.

 

An analagous example is asking for the "line of best fit" through one data point. 

FREDY_07
Fluorite | Level 6

Re: GLM

Many thanks. so you mean like finding a hyperline, right?

Highlighted
Rick_SAS
SAS Super FREQ

Re: GLM

Well, technically it is a hypersurface, not a line.  Like trying to fit a plane to a data set that has only one or two points.