Blog Stats
 1,349,805 views
Latest Updates
Singapore Maths Tuition

Singapore Maths Tuition
 Aquatic Plants 水生植物
 How to keep Python / R Running on Mac (without screen lock or sleep)
 Best way to time algorithms in Python
 The Enigma of the Erasers (Homeschool Math Challenging Puzzles)
 Buy Prescription Glasses, Spectacles & Sunglasses Online from the UK’s Favourite Online Optician!
 Worry Doesn’t Solve Anything
 Seachem Root Tabs Review
 Singapore PM Lee Hsien Loong Mentions Tropical Fish Shop in his speech on COVID19
 Underwater Garden
 Home Cooked Food for My Dog Charlie
Archives
Maths Strategy Tuition
Follow me on Twitter
My Tweets
Tag Archives: r
2 types of chisquared test
Most people have heard of chisquared test, but not many know that there are (at least) two types of chisquared tests. The two most common chisquared tests are: 1way classification: Goodnessoffit test 2way classification: Contingency test The goodnessoffit chisquared test … Continue reading
Popular packages in R and Python for Data Science
Most of the time, users of R and Python will rely on packages and libraries as far as possible, in order to avoid “reinventing the wheel”. Packages that are established are also often superior and preferred, due to lower chance … Continue reading
caret package in R: known issue when converting factor variables
In the R language, often you have to convert variables to “factor” or “categorical”. There is a known issue in the ‘caret’ library that may cause errors when you do that in a certain way. The correct way to convert … Continue reading
Calculate Cronbach Alpha using Python
R has the package “psych” which allows one to calculate the Cronbach’s alpha very easily just by one line: psych::alpha(your_data, column_list) For Python, the situation is more tricky since there does not seem to exist any package for calculating Cronbach’s … Continue reading
Python code for PCA Rotation “varimax” matrix
The R programming language has an excellent package “psych” that Python has no real equivalent of. For example, R can do the following code using the principal() function: principal(r=dat, nfactors=num_pcs, rotate=”varimax”) to return the “rotation matrix” in principal component analysis … Continue reading