R Data Types and Data.Table Subsetting
133 Questions
5 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the purpose of 'psych::' in the function to find Cronbach's alpha?

  • To specify the package where the alpha function is located (correct)
  • To ensure the function works with large datasets
  • To create a scatterplot of the data
  • To select a specific type of plot for data visualization
  • What type of plot is used to compare the distribution of data between groups?

  • Barplot
  • Histagram
  • Scatterplot
  • Violin plot (correct)
  • What is the purpose of labeling axes with quantiles in data visualization?

  • To provide more data to the reader (correct)
  • To remove unnecessary ink
  • To make the plot more visually appealing
  • To simplify the plot
  • What type of plot is used to show the distribution of data using a smooth density function?

    <p>Density plot</p> Signup and view all the answers

    What is the purpose of using shapes on scatterplots?

    <p>To distinguish between categorical variables</p> Signup and view all the answers

    What is the purpose of a QQ plot?

    <p>To check if two sets of quantiles come from the same distribution</p> Signup and view all the answers

    What is the purpose of using a deviates plot?

    <p>To check if a variable follows a normal distribution</p> Signup and view all the answers

    What is the purpose of using themes in data visualization?

    <p>To remove unnecessary ink</p> Signup and view all the answers

    What type of plot is used to show the raw data for small datasets?

    <p>Dot plot</p> Signup and view all the answers

    What is the goal of data visualization in terms of data-to-ink ratio?

    <p>Less ink, more data</p> Signup and view all the answers

    Which type of regression is most suitable for analyzing the number of children people have?

    <p>Poisson Regression</p> Signup and view all the answers

    What is the link function used in Poisson regression?

    <p>η=g(λ)=ln(λ)</p> Signup and view all the answers

    What is the assumption about the mean and variance in Poisson regression?

    <p>Mean is equal to variance</p> Signup and view all the answers

    What does an Incident Rate Ratio (IRR) of 2 indicate?

    <p>A one unit increase in the predictor is associated with twice the events of the outcome</p> Signup and view all the answers

    What is the purpose of exponentiating coefficients in Poisson regression?

    <p>To interpret the results on the original scale</p> Signup and view all the answers

    Which type of regression is suitable for analyzing a binary outcome, such as the presence or absence of major depression?

    <p>Binary Logistic Regression</p> Signup and view all the answers

    Why is linear regression rarely used for count outcomes?

    <p>All of the above</p> Signup and view all the answers

    What is the distribution assumed in Poisson regression?

    <p>Poisson distribution</p> Signup and view all the answers

    What is a common application of Poisson regression?

    <p>Examining risk factors for the number of accidents someone gets into</p> Signup and view all the answers

    What is a potential issue with Poisson regression?

    <p>It requires a large sample size</p> Signup and view all the answers

    What is the purpose of the 'by' argument in the data.table subsetting structure DT[ i , j , by ]?

    <p>To specify the grouping variable for aggregation</p> Signup and view all the answers

    What is the most efficient data type to store whole numbers in R?

    <p>Integer</p> Signup and view all the answers

    What is the purpose of the 'factor' data type in R?

    <p>To store categorical data with a specific order</p> Signup and view all the answers

    What is the result of using logical operators in R?

    <p>A logical value (TRUE or FALSE)</p> Signup and view all the answers

    What is the convention for treating boolean values in arithmetic operations in R?

    <p>TRUE is treated as 1 and FALSE is treated as 0</p> Signup and view all the answers

    What is the main purpose of using logical operators in data management?

    <p>To find outliers and values that meet specific conditions</p> Signup and view all the answers

    What is the purpose of the 'i' argument in the data.table subsetting structure DT[ i , j , by ]?

    <p>To specify the row(s) to select</p> Signup and view all the answers

    What is the difference between the 'numeric' and 'integer' data types in R?

    <p>Numeric is used for real numbers and integer is used for whole numbers</p> Signup and view all the answers

    What is the purpose of subsetting data in analyses?

    <p>To exclude outliers</p> Signup and view all the answers

    What is the rule for data merges in R?

    <p>One join at a time and the x dataset is always on the left</p> Signup and view all the answers

    What is the purpose of reshaping data?

    <p>To prepare data for repeated measures/longitudinal/panel data analysis</p> Signup and view all the answers

    What is a characteristic of wide data?

    <p>Each individual entity occupies a single row</p> Signup and view all the answers

    What is the advantage of using the rowMeans() function?

    <p>It does not return NA even if some of the data is missing</p> Signup and view all the answers

    What is the disadvantage of literally adding items together to get a total score?

    <p>If a participant misses any single item, they will be missing on the entire subscale</p> Signup and view all the answers

    What is the recommended approach to scoring questionnaire scales?

    <p>Using rowMeans() and multiplying the results by the number of items</p> Signup and view all the answers

    What is the purpose of the psych::alpha() function?

    <p>To calculate the reliability of a scale</p> Signup and view all the answers

    What is the result of a natural join?

    <p>The data has only rows present in both x and y</p> Signup and view all the answers

    What is the characteristic of long data?

    <p>Each individual entity occupies multiple rows</p> Signup and view all the answers

    What is the purpose of the 'Call' section in the output of a linear regression model?

    <p>To serve as a handy reminder of the variables and outcome used in the model</p> Signup and view all the answers

    In the 'Coefficients' section of a linear regression output, what does the 'Estimate' column represent?

    <p>The model parameter estimates or regression coefficients</p> Signup and view all the answers

    What is the purpose of the link function in general linear models (GLMs)?

    <p>To do some transformation on eta (n)</p> Signup and view all the answers

    What is the assumption of linear regression referred to as 'L.I.N.E.'?

    <p>Linear relationship, Independent variables, Normally-distributed errors, Equal variance</p> Signup and view all the answers

    What is the purpose of the density plot of residuals in assessing model diagnostics?

    <p>To verify the normally-distributed errors assumption</p> Signup and view all the answers

    What type of regression is used when the outcome variable is a count variable?

    <p>Poisson regression</p> Signup and view all the answers

    What is the purpose of the 'Residuals' section in the output of a linear regression model?

    <p>To display the residual standard error and degrees of freedom</p> Signup and view all the answers

    What is the relationship between the F-statistic and the t-statistic in a linear regression model with one predictor?

    <p>The F-statistic is identical to the t-statistic</p> Signup and view all the answers

    What is the purpose of the QQ plot of residuals in assessing model diagnostics?

    <p>To identify outliers in the data</p> Signup and view all the answers

    What is the definition of homoscedasticity in linear regression?

    <p>The variance of the error term is constant for each value of the predictor</p> Signup and view all the answers

    What does the subscript 𝑖 in the equation yi=b0+b1∗xi+εi indicate?

    <p>That each person has their own value of 𝑦 and 𝑥 and there is some unexplained residual.</p> Signup and view all the answers

    What is the purpose of squaring the residuals in linear regression?

    <p>Because we don't care if they are above or below the line.</p> Signup and view all the answers

    What is the main difference between simple linear regression and multiple linear regression?

    <p>The number of predictor variables.</p> Signup and view all the answers

    How do you interpret the regression coefficient 𝑏1 in multiple linear regression?

    <p>The change in 𝑦 for a one unit change in 𝑥1, controlling for all other predictors.</p> Signup and view all the answers

    What is the generalized linear model (GLM) an extension of?

    <p>The linear model.</p> Signup and view all the answers

    What is the purpose of the lm() function in R?

    <p>To fit a linear model.</p> Signup and view all the answers

    What is the primary output of the summary() function when used with a linear model object in R?

    <p>A quick summary of the model.</p> Signup and view all the answers

    What is the normal distribution also known as?

    <p>Gaussian distribution.</p> Signup and view all the answers

    What are the parameters of a normal distribution?

    <p>Mean and standard deviation.</p> Signup and view all the answers

    What is a probability distribution?

    <p>A function that describes the probability of a value occurring.</p> Signup and view all the answers

    What is the primary advantage of using a Generalized Linear Model (GLM) over traditional linear regression for binary outcomes?

    <p>It addresses the issue of non-normality and restricts predictions to be within 0 and 1</p> Signup and view all the answers

    What is the link function used in logistic regression?

    <p>Logit function</p> Signup and view all the answers

    What is the primary assumption of the Bernoulli distribution in logistic regression?

    <p>The outcome variable is a probability ranging from 0 to 1</p> Signup and view all the answers

    What is the interpretation of an odds ratio greater than 1 in logistic regression?

    <p>A positive relationship between the predictor and outcome variables</p> Signup and view all the answers

    What is the purpose of checking for separation in logistic regression?

    <p>To prevent a predictor variable from perfectly predicting the outcome</p> Signup and view all the answers

    What is the advantage of using logistic regression over traditional linear regression for predicting binary outcomes?

    <p>It is better suited to handle non-normality and bounded outcomes</p> Signup and view all the answers

    What is the relationship between the odds ratio and the probability of the outcome occurring?

    <p>The odds ratio indicates the change in the probability of the outcome occurring</p> Signup and view all the answers

    What is the purpose of the marginal effect in logistic regression?

    <p>To quantify the instantaneous effect of a change in the predictor variable</p> Signup and view all the answers

    What is the primary assumption of independent errors in logistic regression?

    <p>The errors are uncorrelated</p> Signup and view all the answers

    What is the requirement for the sample size in logistic regression?

    <p>The sample size should be large enough to ensure normality of the parameter distributions</p> Signup and view all the answers

    What is a consequence of missing data?

    <p>Bias in results</p> Signup and view all the answers

    What type of missing data is considered to be unbiased?

    <p>Missing Completely at Random (MCAR)</p> Signup and view all the answers

    What is the name of the method where only complete cases are analyzed?

    <p>Listwise deletion</p> Signup and view all the answers

    What is the condition required for recovering unbiased estimates in MAR data?

    <p>The missing data mechanism is conditionally independent of the estimate</p> Signup and view all the answers

    What is the characteristic of data that are missing not at random?

    <p>The missingness mechanism is associated with the estimate</p> Signup and view all the answers

    What is the consequence of analyzing only complete cases in MAR data?

    <p>Biased estimates</p> Signup and view all the answers

    What is the assumption required for unbiased estimates in listwise deletion?

    <p>The data are missing completely at random</p> Signup and view all the answers

    What is the name of the approach that involves analyzing only complete cases?

    <p>Listwise deletion</p> Signup and view all the answers

    What is the purpose of the likelihood ratio test in model comparison?

    <p>To compare nested models and determine if the additional parameters significantly improve the fit</p> Signup and view all the answers

    Why can't we use log likelihood for non-nested models?

    <p>Because it will always increase as additional predictors are added</p> Signup and view all the answers

    What is the advantage of using the BIC over the AIC?

    <p>It has a stronger penalty for complex models</p> Signup and view all the answers

    What is the purpose of fitting polynomials of different degrees?

    <p>To compare the fit of different polynomial degrees</p> Signup and view all the answers

    What is the critical step in using the likelihood ratio test and AIC/BIC for model comparison?

    <p>Ensuring the observations are identical across models</p> Signup and view all the answers

    What is the role of ontology in research?

    <p>It sets the assumptions about the nature of the world and the phenomenon being studied</p> Signup and view all the answers

    What is the purpose of epistemology in research?

    <p>It sets the assumptions about knowledge and how it is acquired</p> Signup and view all the answers

    Why is it important to consider both ontology and epistemology in research?

    <p>Because they shape our understanding of the phenomenon being studied</p> Signup and view all the answers

    What is the relationship between ontology and epistemology?

    <p>They are complementary and influence each other</p> Signup and view all the answers

    What is the main difference between fixed effects and random effects in regression analysis?

    <p>Fixed effects have a constant coefficient for all individuals, while random effects have varying coefficients for each individual</p> Signup and view all the answers

    What is the intraclass correlation coefficient (ICC) used for?

    <p>To compare the variability between individuals to the variability within individuals</p> Signup and view all the answers

    What is the purpose of the Meandeviations() function?

    <p>To calculate the between and within versions of a repeated measures variable</p> Signup and view all the answers

    What is the advantage of using restricted maximum likelihood over maximum likelihood?

    <p>It is less biased and provides better variance estimates</p> Signup and view all the answers

    What is the purpose of an intercept-only model?

    <p>To compare the fit of a more complex model</p> Signup and view all the answers

    In a linear mixed model, what is assumed about the distribution of individual units' deviations from the fixed effect?

    <p>They follow a normal distribution with mean 0 and standard deviation equal to the standard deviation of the deviations</p> Signup and view all the answers

    Which of the following research paradigms suggests that there is no fixed social reality?

    <p>Constructionism</p> Signup and view all the answers

    What is the main assumption of linear mixed models?

    <p>That the random effects follow a normal distribution</p> Signup and view all the answers

    What is the primary concern of qualitative research?

    <p>Understanding and interpretation of social phenomena</p> Signup and view all the answers

    What is the purpose of reflexive thematic analysis?

    <p>To identify and code patterns in qualitative data</p> Signup and view all the answers

    What is the difference between covariance and correlation?

    <p>Covariance measures the linear relationship between two variables, while correlation measures the strength of the relationship</p> Signup and view all the answers

    What is a covariance matrix?

    <p>A set of covariance values for each pair of variables</p> Signup and view all the answers

    What is the primary distinction between critical realism and constructionism?

    <p>Critical realism assumes a fixed reality, while constructionism assumes a subjective reality</p> Signup and view all the answers

    What are the four elements of trustworthiness in qualitative research?

    <p>Credibility, transferability, dependability, and confirmability</p> Signup and view all the answers

    What is the purpose of the 'random effects' heading in the output of a linear mixed model?

    <p>To display the variance components of the random effects</p> Signup and view all the answers

    What is the purpose of qualitative sampling?

    <p>To select participants based on their competence and relevance to the study</p> Signup and view all the answers

    Why is dual coding not relevant in qualitative research?

    <p>Because qualitative research assumes a subjective reality</p> Signup and view all the answers

    What is the key element of qualitative research?

    <p>Defensibility</p> Signup and view all the answers

    When is it possible to recover unbiased estimates?

    <p>When data are missing at random (MAR)</p> Signup and view all the answers

    What is the purpose of multiple imputation?

    <p>To address missing data by generating multiple datasets</p> Signup and view all the answers

    What is the formula to determine total uncertainty in the average estimate in multiple imputation?

    <p>T = V¯ + B + B/m</p> Signup and view all the answers

    What is an issue with using imputed datasets with general linear models?

    <p>All of the above</p> Signup and view all the answers

    What is the purpose of examining missing data before imputation?

    <p>To understand the patterns of missing data</p> Signup and view all the answers

    What does the aggr() function in the VIM package in R show?

    <p>All of the above</p> Signup and view all the answers

    What is the implication of mean positive affect being a cause of missingness?

    <p>Mean positive affect is MNAR</p> Signup and view all the answers

    What is the purpose of pooling the results from the analyses run on each imputed dataset?

    <p>To generate an overall estimate with some estimate of uncertainty</p> Signup and view all the answers

    What is the consequence of having small sample sizes when using imputed datasets with general linear models?

    <p>Increased uncertainty due to sampling variation</p> Signup and view all the answers

    Why is it important to examine the patterns of missing data?

    <p>To develop an effective strategy for addressing missing data</p> Signup and view all the answers

    What is the primary advantage of using linear mixed models over repeated measures ANOVA?

    <p>They can handle data with continuous time points</p> Signup and view all the answers

    What is the purpose of a margin plot in identifying patterns of missing data?

    <p>To show the values of one variable when missing on the other</p> Signup and view all the answers

    What is the assumption of linear regression regarding observations?

    <p>Observations are independent of each other</p> Signup and view all the answers

    What is the difference between fixed effects and random effects in linear mixed models?

    <p>Fixed effects assume identical coefficients for each participant, while random effects allow for different coefficients per participant</p> Signup and view all the answers

    What is the purpose of using linear mixed models instead of traditional linear regression?

    <p>To relax the assumption of independence</p> Signup and view all the answers

    What is the characteristic of data that is clustered within a higher-order unit?

    <p>The data is clustered within a higher-order unit</p> Signup and view all the answers

    What is the purpose of examining the distribution of stress when negative affect is missing in a margin plot?

    <p>To compare the distribution of stress when negative affect is missing or not</p> Signup and view all the answers

    What is the difference between fixed effects and random intercepts?

    <p>Fixed effects have a fixed intercept, while random intercepts have a random intercept</p> Signup and view all the answers

    What is the purpose of using linear mixed models in repeated measures data?

    <p>To relax the assumption of independence and account for clustering within participants</p> Signup and view all the answers

    What is the characteristic of data that is repeated measures data?

    <p>The data is collected at discrete time points</p> Signup and view all the answers

    What is the main purpose of calculating the Mahalanobis distance in a multivariate normal distribution?

    <p>To identify multivariate outliers</p> Signup and view all the answers

    In a linear mixed model, what does the subscript 'j' indicate?

    <p>Between-person variance</p> Signup and view all the answers

    What is the purpose of the likelihood ratio test (LRT)?

    <p>To compare the fit of two nested models</p> Signup and view all the answers

    What is the consequence of not including a random intercept in a linear mixed model?

    <p>The model will not account for between-person variance</p> Signup and view all the answers

    What is the difference between marginal and conditional effects in a linear mixed model?

    <p>Marginal effects include only fixed effects, while conditional effects include both fixed and random effects</p> Signup and view all the answers

    What is the solution to convergence warnings in a linear mixed model?

    <p>All of the above</p> Signup and view all the answers

    What is the purpose of including random slopes in a linear mixed model?

    <p>To account for within-person variance</p> Signup and view all the answers

    What is the characteristic of a nested model?

    <p>One model is a restricted or constrained version of the other</p> Signup and view all the answers

    What is the consequence of having a singularity warning in a linear mixed model?

    <p>The model is over-parameterized</p> Signup and view all the answers

    What is the purpose of using the chi-squared distribution to evaluate the Mahalanobis distance?

    <p>To test for multivariate normality</p> Signup and view all the answers

    Study Notes

    Data Types and Operators

    • Data types in R:
      • Logical: used for logical data, i.e., TRUE or FALSE
      • Integer: used for whole numbers, e.g., 0, 1, 2
      • Numeric: used for real numbers, e.g., 1.1, 4.8; can also be used for integer data, but it's a less efficient format
      • Factor: a special representation of numeric data when the data are fundamentally discrete
      • Characters: used for text type data, e.g., names, qualitative data
    • Operators:
      • Logical operators: used to compare values and return TRUE or FALSE
      • Examples of operators: =, %>%, %<%, %in%, %!in%, %c%, %e%
      • Boolean values: can be used to refer to things that return a boolean value (TRUE or FALSE)

    Data Management

    • Subsetting data:
      • A common task in analyses, e.g., excluding outliers, selecting specific participants
      • Order of subsetting can matter
    • Merging data:
      • Rules: one join at a time, x dataset on the left, y dataset on the right
      • Types of joins: natural, full outer, left outer, right outer
    • Reshaping data:
      • Necessary for repeated measures/longitudinal/panel data
      • Wide format: each measure has a separate variable for each time point
      • Long format: time point is a variable, IDs have multiple rows

    Scoring Questionnaire Scales

    • Two ways to score questionnaire scales:
      • Add items together to get a sum total score
      • Calculate an average of all items
    • Using the rowMeans() function:
      • Can be used to exclude missing data
      • Multiply results by the number of items to get a total score
    • psych::alpha() function: used to calculate Cronbach's alpha, a measure of scale reliability

    Data Visualization

    • Types of plots:
      • Bivariate plots: show the relationship between two variables
      • Univariate plots: show the distribution of a single variable
      • Violin plots: used to compare the distribution of data between groups
      • Histograms: show the distribution of a single variable
      • Density plots: show the distribution of a single variable
      • Dot plots: show the distribution of a single variable
      • QQ plots: used to compare the distribution of two variables
    • Best practices:
      • Aim for a high data-to-ink ratio
      • Use themes to achieve this
      • Axes can be useful for providing more data
      • Shapes can be used to quickly identify categorical variables

    Linear Regression

    • Simple linear regression:
      • Equation: yi = b0 + b1 * xi + εi
      • Parameters: b0 (intercept), b1 (slope), εi (residual)
    • Multiple linear regression:
      • Equation: yi = b0 + b1 * x1i + ... + bk * xki + εi
      • Parameters: b0 (intercept), b1, ..., bk (slopes), εi (residual)
    • Line of best fit: the regression line that minimizes the sum of squared residuals
    • Residuals: the difference between the observed and predicted values
    • Interpretation of R output:
      • Coefficients: the estimated regression coefficients
      • Std. Error: the standard error of the coefficients
      • t value: the t-value for each coefficient
      • p value: the probability value for each coefficient

    Generalized Linear Models (GLMs)

    • GLMs: extend linear regression to different outcomes
    • Examples of GLMs:
      • Linear regression: continuous, normally distributed variables
      • Logistic regression: binary 0/1 variables
      • Poisson regression: count variables
    • Link function: transforms the linear predicted value to the desired scale
    • Inverse link function: transforms the predicted value back to the original scale

    Poisson Regression

    • Poisson regression: used for count variables

    • Assumptions:

      • Poisson distribution
      • Mean and variance are equal
      • Linear relationship on the link scale (ln)
      • No need to worry about normally distributed errors or equal variance
    • Link function: η = ln(λ)

    • Incident rate ratios (IRRs): the ratio of the expected outcome for a one-unit change in the predictor

    • How to do Poisson regression in R:

      • Use the glm() function with the family = poisson argument### Interpreting IRRs in Poisson Regression
    • IRRs are interpreted as a multiplicative change in the outcome for each one unit change in the predictor score.

    • An IRR of 1 means no change in the outcome, equivalent to a coefficient of 0 on the link (log) scale.

    • To interpret Poisson regression outcomes, coefficients need to be exponentiated to take them out of log space.

    Binary Logistic Regression

    • Binary logistic regression is used for outcomes with only two values: 0 or 1.
    • It is useful for questions such as predicting disease occurrence, treatment outcomes, or probability of events.
    • Linear regression is not suitable for binary outcomes because:
      • Straight lines can predict impossible values.
      • Binary variables or residuals do not follow a normal distribution.

    GLM Solutions

    • Link functions transform linear predicted values to ensure they never go below 0 or above 1.
    • The Bernoulli distribution is used instead of the normal distribution, with a single parameter: the average probability of an event occurring (p or μ).

    Logistic Regression

    • The link function is defined as η=g(μ)=ln(μ/1−μ), known as the logit function.
    • The probability that the outcome will be 1 is denoted as μ, ranging from 0 to 1.
    • Assumptions of logistic regression include:
      • Bernoulli distribution of the outcome.
      • Linear relationship on the link scale.
      • Independent variables and errors.
      • No outliers or separation.
      • Large sample size.

    Performing Logistic Regression in R

    • Use the glm() function with the 'family = binomial' argument.

    Odds Ratio and Marginal Effect

    • The odds ratio indicates how many more times the odds of the outcome occurring will be for a one unit change in the predictor.
    • An odds ratio > 1 indicates a positive relationship, while < 1 indicates a negative relationship.
    • The marginal effect is the instantaneous effect of change at a particular point, equivalent to the slope of a straight line.

    Missing Data

    • Missing data are common but problematic, leading to biased results and loss of efficiency
    • Types of missing data:
      • Missing Completely at Random (MCAR): missingness is independent of observed and unobserved data
      • Missing at Random (MAR): missingness depends on observed data
      • Not Missing at Random (NMAR): missingness depends on unobserved data
    • Consequences:
      • List-wise deletion leads to inefficiencies and biased results unless data are MCAR
      • Multiple imputation can recover unbiased estimates for MAR data
      • NMAR data cannot be recovered

    Multiple Imputation

    • A robust approach to address missing data
    • Steps:
      1. Start with incomplete data
      2. Generate multiple datasets with imputed values
      3. Analyze each dataset
      4. Pool results to estimate parameters and uncertainty
    • Formula for total uncertainty: T = V¯ + B + B/m

    Examining Missing Data

    • Use the VIM package in R to explore missing data
    • Functions: aggr(), marginplot()
    • Goals:
      • Identify patterns of missing data
      • Check for overlap between variables
      • Identify potential issues with data

    Clustered Data

    • Data are clustered when observations are not independent
    • Examples:
      • Repeated measures data (longitudinal studies)
      • Grouped data (people within families, schools, companies)
    • Statistical methods for clustered data:
      • Linear mixed models
      • Repeated measures ANOVA (limited to discrete time points, equal number of time points, and normal distribution)

    Linear Mixed Models

    • Relax the assumption of independence in linear regression
    • Types of effects:
      • Fixed effects: slope and intercept are identical for everyone
      • Random effects: slopes and intercepts vary randomly for each participant
    • Benefits:
      • Handles clustered data
      • Allows for varying slopes and intercepts
      • Can handle continuous time and missing data

    Intraclass Correlation Coefficient (ICC)

    • Measures the ratio of between-person variance to total variance
    • Interpretation:
      • 0: all individual means are identical
      • 1: all values are identical within individuals and vary between individuals
    • Example: ICC of 0.25 means 25% of variance is between people and 75% is within individuals

    Linear Mixed Model Assumptions

    • Normal distribution of individual intercepts
    • Constant variance
    • Independent and identically distributed residuals

    Interpreting R Output

    • Random effects: ID x SD is the average difference between an individual's average and the population average
    • Residual x SD is the average difference between an individual score and predicted score
    • Fixed effects: intercept x estimate is the fixed effect of the intercept### Model Comparison
    • Model comparison involves checking all observations are the same
    • LRTs (Likelihood Ratio Tests) are used to compare nested models (m0 vs m1, m0 vs m2, ..., m0 vs malt)
    • AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) are used to evaluate all models

    Qualitative Research

    Ontology and Epistemology

    • Ontology: assumptions about the nature of the world and the phenomenon within it
    • Epistemology: theory of knowledge, concerned with the mind's relation to reality
    • Importance of ontology and epistemology: shape how we know what is true and judge competing truth claims

    Qualitative Research Philosophy

    • Critical Realism: fixed reality, interpreted differently by individuals
    • Constructionism: no fixed social reality, meaning is given through individual experiences
    • Two schools of thought:
      • Critical Realism → thematic analysis (methodology)
      • Phenomenology → interpretative phenomenological analysis

    Qualitative Research Methodology

    • Qualitative sampling: non-probability sampling, sampling based on competence rather than representativeness
    • Alternative to reliability and validity: rigour and trustworthiness
    • Four elements of trustworthiness:
      • Credibility: confidence in the accuracy of findings
      • Transferability: applicability of findings in other contexts
      • Dependability: consistency and replicability of findings
      • Confirmability: neutrality of findings, free from researcher bias

    Reflexive Thematic Analysis

    • Method for developing, analysing, and interpreting patterns in qualitative data
    • Involves systematic processes of data coding to develop themes
    • Steps in reflexive thematic analysis:
      1. Familiarising with the dataset
      2. Coding
      3. Generating initial themes
      4. Developing and reviewing themes
      5. Refining, defining, and naming themes
      6. Writing up

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Quiz covering R data types including logical, integer, and numeric, as well as the data.table subsetting structure in R programming.

    More Like This

    Data Types and Subsetting in R
    168 questions
    PictoBlox Programming Concepts and Lists
    5 questions
    SQL: DML Bagian 2 - JOIN
    23 questions

    SQL: DML Bagian 2 - JOIN

    PermissibleZircon702 avatar
    PermissibleZircon702
    Use Quizgecko on...
    Browser
    Browser