You can specify the base level of a factor variable by using the ib. operator. The syntax is
Base
operator(*) Description
-----------------------------------------------------------------------------------------------------------
ib#. use # as base, #=value of variable
ib(##). use the #th ordered value as base (**)
ib(first). use smallest value as base (the default)
ib(last). use largest value as base
ib(freq). use most frequent value as base
ibn. no base level
-----------------------------------------------------------------------------------------------------------
(*) The i may be omitted. For instance, you may type ib2.group or b2.group.
(**) For example, ib(#2). means to use the second value as the base.
Thus, if you want to use group=3 as the base in a regression, you can type
. regress y i.sex ib3.group
You can also permanently set the base levels of categorical variables by using the fvset command.