Mixed Procedure

The MIXED procedure fits a variety of mixed linear models to data and enables you to use these fitted models to make statistical inferences about the data. The PROC MIXED was specifically designed to fit mixed effect models. It can model random and mixed effect data, repeated measures, etc.
Following code is an example for mixed procedure.


ods listing close;
proc mixed data=data;
    /*var1 and var2 are categorical variables*/
    class var1 var2; 
    /*for each id value the mixed procedure will be repeated*/
    by id; 
    /*Here var1, var2 and var3 are independent variables.*/
    model dependent= var1 var2 var3/ residual solution outp=predresid;
    /*variable for which to present the least square estimate and the control group*/
    lsmeans var1/ diff=control ("Group1");
    /*Here we fix the estimate required and also the significance level*/    
    estimate 'Group2-Group1' var1 -1 1/cl alpha=0.1; 
    /*Outputting the required into a SAS dataset*/    
    ods output diffs=lsdiff lsmeans=lsm;
ods listing;
You may also like:

Author: Dinesh Motkar – Clinical SAS Programmer at Genpro   As part of SAS programming, we often come across situations where we need to remove unwanted data or to locate specific rows from data. Performing this processing using where clause or statement along with index...

Read More
Introduction to Linear Mixed Model

Introduction to Linear Mixed Model   Author: Anoop Jose – Clinical SAS Programmer at Genpro Research In clinical trials, usually, we take multiple measurements from a subject at different time points. In the case of repeated measures or longitudinal data, multiple observations are collected from...

Read More
Clinical Data and Wearable Device : Future of Data Capturing

Clinical Data and Wearable Device : Future of Data Capturing   Author: Mr. Vinu C Raju – Clinical Statistical Programmer at Genpro   Have you ever wondered how your social networking app is suggesting a friend request for a person you met yesterday in a...

Read More
Our Products