## Problem Description:

In SAS assignment solution, we explore the association between triglycerides and overweight status in a cross-sectional study of 700 participants. Triglycerides are a type of fat in the blood that may increase the risk of cardiometabolic diseases. Overweight status is defined as BMI (Body Mass Index) greater than or equal to 25. The assignment consists of several questions involving data exploration, statistical analysis, and interpretation.

## Solution

**Question 1: **Get Familiar with the Data

- Create a binary outcome variable for overweight status (BMI >= 25).
- Calculate and report the prevalence of overweight in the population.

**Question 2: **Descriptive Table

- Create a descriptive table, Table 1, including percentages for binary variables and means with standard deviations for continuous variables.
- Estimate p-values using appropriate statistical tests.
- Determine if triglycerides are associated with overweight status based on univariate analysis.

### SAS Code:

```
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var AGE;
run;
proc freq data=WORK.QUERY;
tables (SEX) *(Overweight) / chisq nopercent norow nocol nocum;
run;
proc freq data=WORK.QUERY;
tables (RURAL) *(Overweight) / chisq nopercent norow nocol nocum;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var INCOME;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var TMETS;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var P3;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var T6;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var TG;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var GLUCOSE;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var HDL;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var SYS;
run;
proc ttest data=WORK.QUERY sides=2 h0=0;
class Overweight;
var DIAS;
run;
```

**Question 3: **Logistic Regression Models

- Create two logistic regression models with log of triglycerides as the exposure variable.
- One crude model and one adjusted model.
- Examine evidence of confounding by the adjusted variables.

### SAS Code:

```
data work.transform;
set WORK.QUERY;
log_TG=log(TG);
run;
proc univariate data=WORK.TRANSFORM;
ods select Histogram;
var TG log_TG;
histogram TG log_TG / normal;
run;
```

**Question 4:** Linear Regression Models

- Build two linear regression models with BMI as the outcome variable and log of triglycerides as the exposure variable.
- One crude model and one adjusted model.
- Report betas and p-values from the Wald tests.
- Interpret the beta coefficient in the fully adjusted model.

### SAS Code

```
proc reg data=WORK.TRANSFORM alpha=0.05 plots(only)=(diagnostics residuals
fitplot observedbypredicted);
model BMI=log_TG /;
run;
proc reg data=WORK.TRANSFORM alpha=0.05 plots(only)=(diagnostics residuals
fitplot observedbypredicted);
model BMI=log_TG AGE INCOME P3 SEX/;
run;
```

**Question 5:** Log-Binomial Regression Model

- Create a log-binomial regression model with overweight status as the outcome and log of triglycerides as the exposure variable.
- Report the prevalence ratio and 95% confidence interval.
- Estimate and interpret the prevalence ratio for a 1 SD change in log of triglycerides.

### SAS Code:

```
proc genmod data=WORK.TRANSFORM descending;
model Overweight=log_TG / dist=binomial link=log ;
Estimate 'Prevalence ratio' log_TG 1/exp;
run;
Prevalence rate is 1.1458
95% confidence interval (1.0941, 1.1999)
```

**Question 6:** Biases in Cross-Sectional Studies

- Explain two main biases in cross-sectional studies (selection bias and information bias).
- Suggest other epidemiologic study designs like cohort and case-control studies to overcome these biases.