BookmarkSubscribeRSS Feed
FREDY_07
Fluorite | Level 6

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

 

Ksharp
Super User

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

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

Rick_SAS
SAS Super FREQ

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

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

Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 20 replies
  • 2562 views
  • 3 likes
  • 4 in conversation