- 데이터 타입 관점: 변수는 크게 두 가지 범주로 나뉜다
- 양적 변수 (quantitative variable): 수량을 나타내는 정량적 데이터를 포함하는 변수
- 범주형 변수 (categorical variable): 그룹을 나타내는 질적 데이터를 포함하는 변수
- 모델링 또는 실험 설계 관점: 변수는 크게 3가지 범주로 나뉜다
- 독립 변수 (independent variable): 종속 변수(결과)에 영향을 미칠 수 있는 변수(원인)
- 종속 변수 (dependent variable): 독립 변수(원인)에 의해 영향을 받을 수 있는 변수(결과)
- 통제 변수 (control variable): 관심 있는 독립 변수와 종속 변수 간의 관계를 살펴보기 위해 고정된 변수
- 수학적 관점: 변수는 크게 4가지 범주로 분류된다
- 단일변수 (univariable): 각 대상이 탐색 변수라고 하는 독립 변수의 단일 측정값을 제공
- 단일변량 (univariate): 각 대상이 반응이라고 하는 종속 변수의 단일 측정값을 제공
- 다변수 (multivariate): 각 대상이 탐색 변수라고 하는 독립 변수의 벡터 측정값을 제공
- 다변량 (multivariable): 각 대상이 반응이라고 하는 종속 변수의 벡터 측정값을 제공
- 정수로서 개별 항목의 개수 값
- 예: 사람 수, 다양한 이벤트 수 등
- 실수로서 연속적이거나 셀 수 없는 값의 측정값
- 예: 키, 몸무게, 거리, 부피, 나이 등
- 이진 변수는 이분형 변수라고도 하며, 참 또는 거짓, 1 또는 0의 두 가지 값을 포함
- 예: 질병/비질병, 동전 던지기에서 앞면/뒷면, 게임에서 승/패
- 순위나 순서가 없는 범주
- 예: 성별, 인종, 색상, 브랜드, 회사명
- 특정 순서로 순위가 매겨진 범주
- 예: 게임에서의 순위, 줄에서의 위치, 영화 리뷰의 평가 척도 응답
- 독립 변수는 실험 결과에 미치는 영향을 관찰하기 위해 설정할 수 있는 변수다
- 많은 사람들이 독립 변수를 예측 변수(predictors), 설명 변수(explanatory variables), 처치 변수(treatment variables), 특성(features) 등으로 부르기도 한다
- 종속 변수는 실험의 결과를 나타내는 변수다
- 많은 사람들이 종속 변수를 결과 변수(outcome variables), 반응 변수(response variables), 목표(targets) 등으로 부르기도 한다
- 통제 변수는 실험 전체에서 고정된 변수다
- 양성 대조군 (Positive control): 종속 변수에 영향을 미치는 것을 보여주기 위해 설정된 변수
- 음성 대조군 (Negative control): 종속 변수에 영향을 미치지 않는 것을 보여주기 위해 설정된 변수
- 내부 대조군 (Internal control): 연구자의 특정 의도로 종속 변수에 영향을 미치는 것을 보여주기 위해 설정된 변수
- 연관성 연구에서는 인과관계에 초점을 맞추지 않기 때문에 “종속” 및 “독립”이라는 용어의 사용을 피해야 한다
- 전후 관계가 명확할 때, 한 변수가 다른 변수보다 명확하게 앞서는 경우가 있을 수 있다
- 예를 들어, 강우량이 진흙을 유발하지 반대는 아니다
- 이러한 경우 강우량을 예측 변수(predictor)라고 하고 진흙을 결과 변수(outcome variable)라고 할 수 있다
- 교란 변수 또는 교란인자
- 교란인자는 독립 변수와 종속 변수 간의 연관성을 혼동시켜 실험에서 다른 변수의 실제 효과를 숨기는 변수다. 이는 제3의 변수가 독립 변수와 종속 변수 모두에 영향을 미치지만 실험에서 제3의 변수가 통제되지 않았을 때 발생할 수 있다. 교란인자는 분석 결과에 다양한 연구 편향, 특히 누락 변수 편향을 도입할 위험이 높다
- 예: 체육관에서 덤벨에 대한 근육량 증가 연구를 수행할 때, 성별이 연구 모델에 포함되지 않으면 성별은 교란인자다. 이는 남성과 여성이 선천적으로 다른 근육량과 덤벨 들기의 기준선을 가지고 있기 때문이다
- 잠재 변수는 직접 측정할 수 없지만 대리 변수를 통해 간접적으로 측정되는 변수다
- 예: 사람의 유당 내성은 직접 측정할 수 없지만 특정 설계된 실험에서 생화학적 지표로 소화 능력 측정을 통해 간접적으로 추론할 수 있다
- 복합 변수는 데이터의 여러 변수를 결합하여 만든 변수다. 이러한 변수는 측정할 때가 아니라 데이터를 분석할 때 생성된다
- 예: 학업 성취도가 수학, 물리학, 문학, 작문으로 측정될 때, 수학과 물리학을 결합하여 수치적 학업 성취도를 측정할 수 있고, 문학과 작문을 결합하여 언어적 학업 성취도를 측정할 수 있다
- 단일변수 (univariable): 각 대상이 탐색 변수라고 하는 독립 변수의 단일 측정값을 제공
- 단일변량 (univariate): 각 대상이 반응이라고 하는 종속 변수의 단일 측정값을 제공
- 다변수 (multivariate): 각 대상이 탐색 변수라고 하는 독립 변수의 벡터 측정값을 제공
- 다변량 (multivariable): 각 대상이 반응이라고 하는 종속 변수의 벡터 측정값을 제공
- 프로그래밍 또는 컴퓨터 과학 관점의 데이터 타입
- 데이터 측정 관점
- 종단 (또는 반복) 데이터 (longitudinal or repeated data): 각 대상이 측정값의 벡터를 제공하지만, 이는 일련의 관찰 시간에 측정된 동일한 반응을 나타낸다
- 횡단 데이터 (cross-sectional data): 단일 시점에서 측정된 결과 변수 및 공변량
- From the perspective of a data type, variable types are largely divided into two categories:
- quantitative variable: a variable containing quantitative data that represents quantity
- categorical variable: a variable containing qualitative data that represents groups
- From the standpoint of modeling or experiment designs, variable types are largely divided into 3 categories:
- independent variable: a variable (cause) that might have an effect on a dependent variabe (result).
- dependent variable: a variable (result) that might be influenced by independent variables (cause).
- control variable: a variable that is fixed to look into a relation between an independent variable in your interest and dependent variable.
- From the point of mathmatical view, variable types are categorized largely into 4 categories:
- univariable: each subject gives rise to a single measurement of independent variable termed exploratory variable.
- univariate: each subject gives rise to a single measurement of dependent variables termed response.
- multivariate: each subject gives rise to a vector of measurements of independent variables termed exploratory variables.
- multivariable: each subject gives rise to a vector of measurements of dependent variables termed responses.
- As integer, count valuess of individual items.
- ex: number of people, number of different events, etc.
- As real number, measurement values of continuous or uncountable values.
- ex: height, weight, distance, volume, age, etc.
- Binary variables a.k.a dichotomous variables contain two types of values, true or false, 1 or 0
- ex: disease/non-disease, heads/tails in flipping a coin, win/lose in a game
- catogories with no rank or order among them.
- ex: gender, races, colors, brands, company names
- catogories ranked in a specific order
- ex: ranks in a game, places in a line, rating scale responses in a movie review
- Independent variable is a variable you can set to observe an effect on the outcome of an experiment.
- By many people, independent Variables are also commonly called predictors, explanatory variables, treatment variables, features, etc.
- Dependent variable is a variable that represents the outcome of the experiment.
- By many people, dependent variables are also commonly called outcome variables, response variables, targets, etc.
- Control variable is a variable that is held fixed throughout the experiment.
- Positive control: a variable that is set for showing effect on the dependent variable.
- Negative control: a variable that is set for showing no effect on the dependent variable.
- Internal control: a variable that is set for showing effect on the dependent variable with a researcher’s certain intention.
- In association research, the use of the terms “dependent” and “independent” should be avoided because the research does not focus on causality between one another.
- When the before-and-after relationship is clear, there might be cases where one variable clearly precedes the other
- for example, rainfall leads to mud, rather than the other way around.
- In these cases, you may call the rainfall a predictor and the mud an outcome variable.
- Confounding variables or confounders
- Confounder is a variable that hides the true effect of another variable in an experiment by confounding the association between independent and dependent variables. This can happen when the 3rd variable has effect on both independent variable and dependent variable but the 3rd variable has not been controlled in your experiment. Confounders run a high risk of introducing a variety of research biases to your analysis result, particularly omitted variable bias.
- ex: When conducting a study on muscle mass increase for dumbbells in a gym, if gender is not included in the research model, gender is a confounder. This is because men and women have different innate muscle mass and baseline for lifting dumbbells.
- Latent variable is a variable that can’t be measured directly but indirectly via a proxy.
- ex: lactose tolerance of a person cannot be measured directly but indirectly inferred from measurements of a person’s can be inferred from measurements of digestion ability with biochemical metrics in a certain designed experiment.
- Composite variable is a variable made by combining multiple variables of your data. These variables are created not when you measure it but when you analyze data,
- ex: When your academic performance is measured with math, physics, literature, and writing composition, your numerical academic performance can be measured by combining math with physics, and your language academic performance by combining literature with writing composition.
- univariable: each subject gives rise to a single measurement of independent variable termed exploratory variable.
- univariate: each subject gives rise to a single measurement of dependent variables termed response.
- multivariate: each subject gives rise to a vector of measurements of independent variables termed exploratory variables.
- multivariable: each subject gives rise to a vector of measurements of dependent variables termed responses.
- From the perspective of programming or computer science data type
- From the perspective of data measurement
- longitudinal (or repeated) data: Each subject gives rise to a vector of measurements, but these represent the same response measured at a sequence of observation times
- cross-sectional data : Outcome variable(s) and covariates that are measured at a single time point
1 변수 유형
변수 유형은 연구 목적에 따라 다양한 관점으로 분류할 수 있다:
1.1 데이터 타입 관점
1.1.1 양적 변수 (Quantitative Variable)
산술 연산을 수행할 수 있는 값을 가진 변수다. 양적 변수에는 이산형과 연속형 두 가지 유형이 있다.
1.1.1.1 이산형 변수 (Discrete Variables)
1.1.1.2 연속형 변수 (Continuous Variables)
1.1.2 범주형 변수 (Categorical Variables)
범주형 변수는 수량이 아닌 범주를 나타내는 그룹화 값을 포함한다. 범주형 변수에는 이진, 명목, 순서형 변수 세 가지 유형이 있다.
1.1.2.1 이진 변수 (Binary Variables)
1.1.2.2 명목 변수 (Nominal Variables)
1.1.2.3 순서형 변수 (Ordinal Variables)
1.2 모델링 관점
실험이나 모델은 일반적으로 한 변수가 다른 변수에 미치는 영향을 발견하기 위해 설계되거나 구축된다.
1.2.1 독립 변수 (Independent Variables)
1.2.2 종속 변수 (Dependent variables)
1.2.3 통제 변수 (Control variables)
엄밀히 말하면, 독립 변수와 종속 변수의 동의어는 목적에 따라 모두 약간씩 다르다.
1.3 변수 분류 관점
변수에는 크게 3가지 유형이 있다: 교란 변수, 잠재 변수, 복합 변수
1.3.1 교란 변수 (Confounders)
1.3.2 잠재 변수 (Latent variables)
1.3.3 복합 변수 (Composite variable)
1.4 수학적 관점
2 데이터 타입
데이터 타입도 연구 목적에 따라 다양한 관점으로 분류할 수 있다:
| 데이터 타입 | 정의 | 예시 |
|---|---|---|
| 정수 (Integer, int) | 분수가 없는 숫자를 위한 숫자 데이터 타입 | -707, 0, 707 |
| 부동소수점 (Floating Point, float) | 분수가 있는 숫자를 위한 숫자 데이터 타입 | 707.07, 0.7, 707.00 |
| 문자 (Character, char) | 단일 문자, 숫자, 구두점, 기호 또는 공백 | a, 1, ! |
| 문자열 (String, str or text) | 문자, 숫자 또는 기호의 시퀀스—항상 텍스트로 처리됨 | hello, +1-999-666-3333 |
| 불린 (Boolean, bool) | 참 또는 거짓 값 | 0 (거짓), 1 (참) |
| 열거형 (Enumerated type, enum) | 사전 정의된 고유 값(요소 또는 열거자)의 작은 집합—텍스트 기반 또는 숫자 | rock (0), jazz (1) |
| 배열 (Array) | 특정 순서로 여러 요소가 있는 목록—일반적으로 동일한 타입 | rock (0), jazz (1), blues (2), pop (3) |
| 날짜 (Date) | YYYY-MM-DD 형식의 날짜 (ISO 8601 구문) | 2021-09-28 |
| 시간 (Time) | 하루 중 시간, 이벤트 이후 시간 또는 이벤트 간 시간 간격에 대한 hh:mm:ss 형식 | 12:00:59 |
| 날짜시간 (Datetime) | YYYY-MM-DD hh:mm:ss 형식의 날짜와 시간 | 2021-09-28 12:00:59 |
| 타임스탬프 (Timestamp) | 1970년 1월 1일 자정(00:00:00 UTC) 이후 경과한 초 수 (Unix 시간) | 1632855600 |
2.1 데이터 측정 관점
2.1.1 종단 (또는 반복) 데이터
종단 데이터는 동일한 대상에 대해 시간에 따라 반복적으로 측정된 데이터를 의미한다. 이러한 데이터는 시간에 따른 변화 패턴을 분석하는 데 유용하다.
특징: - 동일한 개체에 대한 반복 측정 - 시간적 변화 추적 가능 - 개체 내 변동성과 개체 간 변동성 구분 가능
예시: - 환자의 주기적인 혈압 측정 - 학생의 학기별 성적 변화 - 기업의 월별 매출액
2.1.2 횡단 데이터
횡단 데이터는 특정 시점에서 여러 대상에 대해 한 번 측정된 데이터를 의미한다.
특징: - 단일 시점의 스냅샷 - 다양한 대상 간 비교 가능 - 시간적 변화 추적 불가능
예시: - 설문조사 응답 - 인구 조사 데이터 - 특정 시점의 시장 조사
3 참고문헌
4 Variable Types
Variable types can be classified with various perspectives depending on research purpose:
4.1 From the Point of Data Type
4.1.1 Quantitative Variable
the values of the quantitative variables with which you can conduct arithematic operations. There are two types of quantitative variables: discrete and continuous.
4.1.1.1 Discrete Variables
4.1.1.2 Continuous Variables
4.1.2 Categorical Variables
Categorical variables contain grouping values representing categories rather than quantity. There are three types of categorical variables: binary, nominal, and ordinal variables.
4.1.2.1 Binary Variables
4.1.2.2 Nominal Variables
4.1.2.3 Ordinal Variables
4.2 From the Perspective of Modeling
Experiments or models are usually designed or built to discover what effect one variable has on another.
4.2.1 Independent Variables
4.2.2 Dependent variables
4.2.3 Control variables
Strictly speaking, the synonyms of independent and dependent variables are all slightly different for the different purpose.
4.3 Perspective of Modeling
There are largely 3 types of variables: confounders, latent variables, and composite variables
4.3.1 Confounders
4.3.2 Latent variables
4.3.3 Composite variable
4.4 From the point of mathmatical view
5 Data Type
Data types can also be classified with various perspectives depending on research purpose:
| Data Type | Definition | Examples |
|---|---|---|
| Integer (int) | Numeric data type for numbers without fractions | -707, 0, 707 |
| Floating Point (float) | Numeric data type for numbers with fractions | 707.07, 0.7, 707.00 |
| Character (char) | Single letter, digit, punctuation mark, symbol, or blank space | a, 1, ! |
| String (str or text) | Sequence of characters, digits, or symbols—always treated as text | hello, +1-999-666-3333 |
| Boolean (bool) | True or false values | 0 (false), 1 (true) |
| Enumerated type (enum) | Small set of predefined unique values (elements or enumerators) that can be text-based or numerical | rock (0), jazz (1) |
| Array | List with a number of elements in a specific order—typically of the same type | rock (0), jazz (1), blues (2), pop (3) |
| Date | Date in the YYYY-MM-DD format (ISO 8601 syntax) | 2021-09-28 |
| Time | Time in the hh:mm:ss format for the time of day, time since an event, or time interval between events | 12:00:59 |
| Datetime | Date and time together in the YYYY-MM-DD hh:mm:ss format | 2021-09-28 12:00:59 |
| Timestamp | Number of seconds that have elapsed since midnight (00:00:00 UTC), 1st January 1970 (Unix time) | 1632855600 |