SAS Module 2 Data Exploration and Preparation

SAS

Module 2 Data Exploration and Preparation

Dimensional Modeling Fundamentals:

  • Fact: basic measurements and are generally “numeric” and “additive”, lower level details
  • Dimension: A way of categorizing and summarizing facts (often use “by” – profit by region/month). Dimensional models are generally represented in star schemas or OLAP cubes in relational databases

Data Types:
Category:

  • Nominal: categories, states, or “names of things”, identifiers; No order among values of nominal attributes (ex: ID number, Zip code, Title )
  • Binary: Nominal attribute with only 2 states (Male/Female, True/False)
  • Ordinal: Similar to Nominal, but values have a meaningful order (ranking) but magnitude between successive values is not known

Measure:

  • Interval: Measured on a scale of equal-sized units; Values have order (dates); No true zero-point
  • Ratio: Inherent zero-point; We can speak of values as being an order of magnitude larger than the unit of measurement (grades, balance)

Attribute Types:

  • Discrete Attribute: Has only a finite or countably infinite set of values (ex: zip code, ISBN); Binary attributes are a special case of discrete attributes
  • Continuous Attribute: Has real numbers as attribute values (ex: weight, height), can only be measured and represented using a finite number of digits; Typically represented as floating-point variables

Data Preparation in SAS: SAS Data Studio - Prepare Data
Prepare data first in order to make visualize analytics easier

  • Create and Manage Columns: Rename, Convert Column, Change case(大小写), Split, Remove, Trim whitespace
  • Apply Filters
  • Convert Data Types (Measure to Category)
  • Append
    Combine two tables based on a common identifier to form one integrated table
  • Join
    Challenges:
    • Data Redundancy: Two identical or highly correlated columns can cause confusion in data modeling as it can obscure the actual drivers of an output. So we need to remove redundancy data before dong join
    • Imprecise Match Keys: Same entities are represented differently in different tables. Standardize the data first will help with the issue. In SAS, we can also create “Matchcodes” with different level of sensitivity (higher number means higher level of sensitivity, more accurate) to perform “fuzzy joins”
    • Inconsistent Attributes: Need to standardize the data format and data scale
  • Transpose Data: transpose variables to be observations
  • Insert Custom Code (Data step, CASL)
  • Create Data Preparation Plan Files and Jobs
  • Cleanse Data
  • Data Enhancement: Variable Tranformation
    - Replacing a variable by the results of a function of this variable for understanding the data better (log, square, normalization)
    - Variable/Feature Creation: Generating new variables/features based on existing variables (dummy variables, parsing components - date to day, month, year)

Data Explore and Visualization in SAS:

  • Table must be loaded to use. A “lightning bolt” indicates it is loaded, “*” indicates it needs to be loaded
  • If some bad data appears, go back to prepare data tab to fix it
  • Histograms often tell more than Box-plots
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值