McNemar’s Test in SPSS

This tutorial explains the definition of McNemar’s test, the writing of the null and alternative hypotheses for McNemar’s test, the steps of conducting it in SPSS, and how to interpret the output of McNemar’s test as well as how to report the results. When to Use McNemar’s Test? The McNemar test is used to analyze … Read more

Create OpenAI Style Illustrations in Python

This tutorial shows how to create OpenAI website style illustrations using Python Turtle graphics. The following includes two examples. Example 1: Parallel Lines The following is the first example of drawing an OpenAI-style figure using Python Turtle. If you run the code, you will get the following figure, which includes some parallel lines with different … Read more

Meaning of #### in Excel

In Excel, the term “####” typically represents a series of number or pound signs (#####) that appear in a cell when the content is too long to be displayed fully within the available column width. It is often referred to as the “overflow error” or “cell truncation.” The following reproduces this term, namely #### in … Read more

How to Create Contingency Table in Excel

You can create a contingency table in Excel using the Pivot Table. This tutorial includes steps showing how to create a contingency table for count data. Data and Resarch Question for Contingency Table The following is the sample data used in Excel. It is a hypothetical data record showing a group of 20 participants’ recent … Read more

How to Export DataFrame to CSV in R

You can use the write.csv() from base R or write_csv() from “readr” package to export a dataframe to CSV in R. write.csv() write.csv(df_1,”csv_file_name.csv”, row.names=FALSE) write_csv() write_csv(df_2,”csv_file_name.csv”) Example 1: Use write.csv() The following is the output of the dataframe df_1. > print(df_1) Letters Numbers 1 A 1 2 B 1 3 C 0 4 D 1 … Read more

Generate Vectors only Contains 0 And 1 in R

You can generate a vector only containing 0 and 1 in R using sample() and rbinom() functions. sample: sample(c(0, 1), size = 10, replace = TRUE) rbinom: rbinom(10, size = 1, prob = 0.5) In both sample() and rbinom(): Example 1 The following is the output. > print(vector_1) [1] 0 0 1 1 1 1 … Read more

Calculate p-value in Linear Regression

This tutorial shows how you can calculate p-value for linear regression. It includes formulas and data examples in Python. Formulas for p-value in Linear Regression We can estimate the regression coefficient B using the following formula. Where, Such calculation only generates regression coefficients but no p-values. To calculate the p-value, you need to calculate the … Read more

Experimental Design in Advertising Research

This tutorial explains the types of advertising experiment design and the detailed steps of conducting experimental research for advertising campaigns. Types of Advertising Experiments The first one is a simple version of the experiment design, which includes a control condition (no ad) and a treatment condition (with ad viewing). In some situations, you might want … Read more

Linear Mixed Models in SPSS

This tutorial includes the explanation of what a linear mixed model is, how to structure its statistical model, data example, as well as steps for linear mixed models in SPSS. Definition of Linear Mixed Models Linear mixed models (LMMs) are statistical models used to analyze data that have both fixed and random effects. They are … Read more

Data Type and Data Summary

This tutorial explains what data type (including numerical data and categorical data) is and how to summarize different types of data. Data Type Broadly speaking, data can be categorized into two types: categorical and numerical. Categorical data refers to variables that have a finite number of categories or groups. Examples of categorical data include gender … Read more