Dummy coding is a simple, one of the most famous, and most common coding system for categorical variables. In dummy coding one of the categories of a categorical variable is referenced as based and analysis is interpreted considering the base of the original variable. Researchers use various approaches such as designating base as the group/category with the most observation, or category ranked as lowest or highest in the original variable which I will demonstrate below using education variable as an example. Let’s demonstrate dummy coding using a real-life hypothetical example. Suppose you want to predict monthly expense using education (educ).…
Structural Equation Modeling using STATA Webinar, Q&As: Q1. If I need to design single latent construct using binary and continuous and multinomial variables, what is the best way to do that? Is that latent construct valid from the statistical standpoint? You can certainly use -gsem- with a latent variable measured by a combination of binary, continuous, and multinomial variables. You just need to pick an appropriate model for each variable. Convergence will be dependent on your particular model and dataset. You may find that an option such as -difficult- will solve the problem. Other times, I find it best to…
In this post, code line starts with the “.” Install tab2docx package from the internet: . net install http://www.stata.com/users/kcrow/tab2docx / Setup Working Directory (This is optional step. However, you should know where you saved your file at the end when you don’t set up working directory. Usually it is the document folder in your computer.): . cd “<Path to the folder>” (Usually I create another folder inside folder with data and name it result and set it up as a working directory). Import Data File (in Excel Format; you can do any type of data):. import excel “path to data…
/* Import Facebook Data into STATA */ First, install module “facebook2stata” module in your STATA software with the command below: /* Install module to import data from Facebook to STATA. */ net install https://www.stata.com/users/kcrow/facebook2stata, replace