BookmarkSubscribeRSS Feed
CamillaSvensson
Calcite | Level 5

Hi everyone

I have a question about the "Number of observations not used"-information when using proc mixed.

I'm investigation the the effect of a drug on Diabetes in a randomized clinical trial. I have five measurements pr patient - week 4, 8, 12, 16 and 1 year and blood sugar as my endpoint.

Whem I'm running the proc mixed, it says that 130 out of 400 observations are NOT used. And even though I have 103 patients in my study, it seems to only use data from 75 patiens.

I do have some missing variables in my dataset. For instance, I'm adjusting for how long each patient has had the diabetes diagnosis (in a covariate, I think), and when the patients dosn't know, I have entered ND. When I remove that covariate from the proc mixed, SAS seems to "notice" even more of my patients, as the 75 patients increase to 95.

 

What does this mean? Is SAS only analyzing the blood sugar-numbers from the 75 patients? Or is it informing me that 75 of 103 patients have a complete dataset? Can I count on/belive the statistics?

 

This is what I have typed in SAS (where "treatment" is treatment with other types of medication that might influence bloodsugar and "years" is number of years with the diabetes diagnosis):

 

proc mixed data=sasuser.data; where week>0;

class patient week group(ref='B') gender treatment years;

model bloodsugar= week group Group*week baseline_bloodsugar baseline_bloodsugar*week gender age baseline_bmi treatment years /solution cl ddfm=kr;

lsmeans group*week /cl;

repeated week / subject=patient type=un r rcorr;

run;

 

 

I really hope that you can help! Thank you in advance.

3 REPLIES 3
Reeza
Super User

Any row that has a missing value in a variable included in a CLASS MODEL BY or similar statement is excluded. 

 

One method to deal with this, if categorical, is to explicitly code the missing values. 

 

A quick way to check is to run a missing report on your data.

 


@CamillaSvensson wrote:

Hi everyone

I have a question about the "Number of observations not used"-information when using proc mixed.

I'm investigation the the effect of a drug on Diabetes in a randomized clinical trial. I have five measurements pr patient - week 4, 8, 12, 16 and 1 year and blood sugar as my endpoint.

Whem I'm running the proc mixed, it says that 130 out of 400 observations are NOT used. And even though I have 103 patients in my study, it seems to only use data from 75 patiens.

I do have some missing variables in my dataset. For instance, I'm adjusting for how long each patient has had the diabetes diagnosis (in a covariate, I think), and when the patients dosn't know, I have entered ND. When I remove that covariate from the proc mixed, SAS seems to "notice" even more of my patients, as the 75 patients increase to 95.

 

What does this mean? Is SAS only analyzing the blood sugar-numbers from the 75 patients? Or is it informing me that 75 of 103 patients have a complete dataset? Can I count on/belive the statistics?

 

This is what I have typed in SAS (where "treatment" is treatment with other types of medication that might influence bloodsugar and "years" is number of years with the diabetes diagnosis):

 

proc mixed data=sasuser.data; where week>0;

class patient week group(ref='B') gender treatment years;

model bloodsugar= week group Group*week baseline_bloodsugar baseline_bloodsugar*week gender age baseline_bmi treatment years /solution cl ddfm=kr;

lsmeans group*week /cl;

repeated week / subject=patient type=un r rcorr;

run;

 

 

I really hope that you can help! Thank you in advance.


 

pau13rown
Lapis Lazuli | Level 10

as @Reeza says, find out where the data are missing. Maybe you can agree a method for handling the missing data with your clinical colleagues or maybe the data can be retrieved: the patient ought to know when they were diagnosed with diabetes, but perhaps they know the year but not the month and day, check these patients aren't falling out of the analysis, maybe you want to impute this as 15june etc, duration will necessarily be affected by rounding etc

PaigeMiller
Diamond | Level 26

In situations like this, it really helps to actually LOOK AT your data set named sasuser.data. See what SAS is seeing. You can use VIEWTABLE (the preferred method) or PROC PRINT (less preferred).

--
Paige Miller

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
  • 3 replies
  • 2698 views
  • 1 like
  • 4 in conversation