How to Create Scatter Plots in SPSS

This tutorial shows how you can create scatter plots in SPSS in 5 steps. In addition, it shows how to add a fit line in SPSS. Note that, the tutorial is based on SPSS 27; if you are using a different version of SPSS, the interfaces might look a bit different, but it should not … Read more

How to Do Correlation Analysis in SPSS (4 Steps)

This tutorial shows how you can do correlation analysis in SPSS. Correlation is a statistical measure of the relationship between two variables, X and Y. The typical situation of using correlation analysis is when both X and Y are continuous variables or scales in SPSS sense (either interval or ratio data ). However, it is … Read more

SPSS Measure: Nominal, Ordinal, and Scale

This tutorial provides definitions and examples for the 3 SPSS measures, including nominal, ordinal, and scale. Definitions for Nominal, Ordinal, and Scale Nominal Data Variables at the nominal level are categorical and have no inherent order or numerical meaning. Examples include gender (e.g., male or female), ethnicity (e.g., Asian, African American, Caucasian), or marital status … Read more

lower.tail in qnorm() and pnorm() (4 Examples)

This tutorial explains how to set and understand lower.tail in qnorm() and pnorm(). qnorm(p, mean, sd, lower.tail = TRUE, log.p = FALSE) pnorm(q, mean, sd, lower.tail = TRUE, log.p = FALSE) For both qnorm and pnorm, the meaning of lower.tail is the same: TRUE means p=F(q). That is, cdf is calculated from -∞ to q. … Read more

Categories R

Latex Code: CDF of Standard Normal Distribution

The following is the Latex code for CDF of Standard Normal Distribution. \Phi(x)=P(Z \leq x)= \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{x}\exp\left\{-\frac{u^2}{2}\right\} du. Showing CDF of Standard Normal Distribution on WordPress If you combine the latex above with some JavaScript and HTML, you can add it as WordPress Shortcode and show it in WordPress. <script type=”text/javascript” async=”” src=”https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML”> </script> … Read more

qnorm() in R: Definition and 5 Examples

This tutorial explains how you can use qnorm() in R with examples. qnorm(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) p: the probability. mean: The mean of the normal distribution sample data. The default value is 0. sd: The standard deviation. The default value is 1. lower.tail: By default, lower.tail = TRUE. It means … Read more

Categories R

Type 3 ANOVA in R (with Examples)

Type 3 ANOVA in R can be calculated using Anova() function from CAR. The following shows the steps of doing it in R. Step 1: Prepare data in R The data has two categorical IVs (cities and stores) and one DV (sales). x_1 = rep(c(‘City1′,’City2’),each=5) x_2 = rep(c(‘store1′,’store2’), 5) sales=c(10,20,20,50,30,10,5,4,12,4) df <- data.frame (cities = … Read more

Categories R

Type 2 ANOVA in R (with Examples)

This tutorial shows how you can calculate Type 2 ANOVA in R with an example. Anova() in the package of Companion to Applied Regression (CAR) can be used to calculate Type 2 ANOVA in R. Note that, Anova() in CAR only provides options of Type 2 and Type 3 ANOVA. It is different from another function … Read more

Categories R

Type 1 ANOVA in R (with Examples)

This tutorial shows how to do Type 1 ANOVA in R. There are two functions in R that can be used to calculate Type 1 ANOVA, anova() or aov(). Note that, anova() here is different from Anova() in Companion to Applied Regression (CAR). Anova() in CAR can be used only for Type 2 and Type … Read more

Categories R

How to Get Current Weekday in Python

This tutorial shows how you can get the current weekday in Python with 2 examples. Method 1: use weekday() Method 2: use isoweekday() Examples of getting current weekday in Python Example 1 for method 1 We can also check which weekday it is using weekday(). It returns the day of the week as an integer, … Read more