GithubHelp home page GithubHelp logo

maxinexiong / weight_loss_analysis Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 18 KB

This SAS case study aims to generate simple cross-tab in Proc Freq to exam possible trend of weight loss (in lb) in response to daily walking steps. The program effectively addresses the data requirements, enabling quick analysis on the relationship between weight loss and daily walking steps.

Home Page: https://maxinexiong.github.io/dark-mode/projects/sas.html#sas-ws

License: MIT License

SAS 100.00%
case-study sas sas-base-cert sas-programming sas-studio

weight_loss_analysis's Introduction

SAS Case Study: Weight Loss Analysis

GitHub License: MIT Platform - SAS 9.4


Case Study Descriptions

Objective

Generating simple cross-tab in PROC FREQ to exam possible trend of weight loss (in lb) in response to daily walking steps.

Data

Weight_loss.xlsx: contains 19 participants/observations.

Variables

  • Pid: participant id.
  • Gender: participant gender.
  • Weight0: weight at the beginning of the program.
  • Weight1: weight at the end of 1st month of the program.
  • Weight2: weight at the end of 2nd month of the program.
  • walk_steps: walking steps daily.

Steps

  • Import Excel data file into SAS, create SAS data set named as WL0.
  • Data management:
    1. Check Data using PROC MEANS and PROC FREQ. Create a new data set WL1 using a data step program including the following steps: step (i) and (ii).
    2. Clean data: change value ‘9999’ to missing using Array statement.
    3. Create weight difference variables:
     wd1 = weight0 - weight1;
     wd2 = weight0 - weight2;
     wd12 = weight1 - weight2;
    
    1. Using PROC MEANS and PROC FREQ, check weight difference variables (only pick wd2 for this project, you may use others for practice) and walk_steps var for making groups from these var. Create a new data set WL2 using a data step program including the following steps: step (v) and (vi).
    2. Create groups for walk_steps: create new var ws_group. The new group var should have 3 categories:
      • “less than 5000”
      • “5000-10000”
      • “greater than 10000”
    3. Create groups for wd2: create new var wd2_group The new group var should have 3 categories:
      • “not losing weight”
      • “losing <= 5 lb”
      • “losing > 5 lb”
  • Create permanent data set from data set WL2: projectd.weight_loss.
  • Create cross-tab using PROC FREQ for walk steps' groups (ws_group) and weight loss groups (wd_group) to exam the possible trend.

Repository Structure

This repository is structured as follows:

Weight-Loss-Analysis
├── Weight_Loss_Analysis.sas
├── Weight_loss.xlsx
├── README.md
└── LICENSE
  • Weight_Loss_Analysis.sas: This SAS program file addresses all requirements in the weight loss analysis case study. It is the main file for conducting the data preparation and analysis based on the provided dataset.
  • Weight_loss.xlsx: This Excel file contains the raw dataset that is imported and utilized in the SAS program for the weight loss analysis.
  • README.md: This file provides an overview of the repository, including descriptions of the case study and relevant information for usage.
  • LICENSE: The license file for the project.

Please note that the Weight_Loss_Analysis.sas program should be used as the primary entry point for conducting the weight loss analysis, and the Weight_loss.xlsx dataset serves as the input data for the analysis.


Prerequisites

To run the TSA Claims Data Analysis program, you need an active account for either SAS® OnDemand for Academics or SAS® Viya. These platforms provide the necessary environment for executing SAS programs and analysing the data.


Usage

Follow the steps below to use the Weight Loss Analysis program:

  1. Download this repository to your local machine.
  2. Start SAS Studio from your SAS software.
  3. Within SAS Studio, create a new folder named data to store the dataset.
  4. Select the data folder and click on the Upload button.
  5. In the Upload File window, click Choose Files and browse to locate the Weight_loss.xlsx file on your computer. Select the file and click Open. Click Upload. The Weight_loss.xlsx file is added to the data folder on the SAS server. You should now have the dataset ready for use in the Weight_Loss_Analysis.sas program.

By following these steps, you can ensure that the necessary dataset is available for the Weight Loss Analysis program to run successfully.


License

This project is licensed under the MIT License.

weight_loss_analysis's People

Contributors

maxinexiong avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.