UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Frequently Asked Questions about MLwiN
How do I create a group mean centered variable?

This is a 2 step process. The first step is the create a contextual variable that contains the group mean for the variable of interest (see How do I make a contextual variable (group mean)? for instructions on that step).  Then, you can then compute the group mean centered variable by taking the original variable minus the group mean variable.  For example, in How do I make a contextual variable (group mean)? we created miq_verb which is the group mean centered version of ciq_verb

Strategy 1: Point and Click

You can then create the group mean centered version of this variable by taking ciq_verb minus miq_verb via Data Manipulation then Calculate. We can compute this as shown below.

Strategy 2: Command Interface

Say we wish to store grpc_iqverb into the next free column which is c28.  We could then enter these commands in the command interface.

name c28 "grpc_iqverb"
calculate "grpc_iqverb" = "ciq_verb" - "miqverb"

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.