[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: -warning: variables in at() list not found in model after mfx or mfx2

From   "Mentzakis, Emmanouil" <>
To   <>
Subject   RE: st: -warning: variables in at() list not found in model after mfx or mfx2
Date   Fri, 20 Jul 2007 18:28:41 +0100


I have the same problem as Mirko and I think the problem might be the
length of the -at()- option. 

Below I have created an example (with huge names for the variables where
you can see the warning message. 

Does anybody have a suggestion?


*######### begin example ############

set obs 200
set seed 125
gen pid=_n
expand 3
bys pid: gen thisistomakethenamebiga=invnormal(uniform()) 
bys pid: gen thisistomakethenamebigb=invnormal(uniform()) 
bys pid: gen thisistomakethenamebigc=invnormal(uniform()) 
bys pid: gen thisistomakethenamebigd=invnormal(uniform()) 
bys pid: gen thisistomakethenamebige=invnormal(uniform()) 
bys pid: gen thisistomakethenamebigf=invnormal(uniform()) 
bys pid: gen thisistomakethenamebigg=uniform()>.5
bys pid: gen thisistomakethenamebigh=uniform()>.5
bys pid: gen thisistomakethenamebigi=uniform()>.5
bys pid: gen thisistomakethenamebigj=uniform()>.5
bys pid: gen thisistomakethenamebigk=uniform()>.5
bys pid: gen thisistomakethenamebigl=uniform()>.5

gen y3 = 4*(uniform()+1)
gen y2=round(y3)
recode y2 (4=1 one) (5=2 two) (6=3 three) (7=4 four) (8=5 five), gen(y)

# delimit ;
regoprob y  thisistomakethenamebiga thisistomakethenamebigb
thisistomakethenamebigd thisistomakethenamebige thisistomakethenamebigf
thisistomakethenamebigh thisistomakethenamebigi thisistomakethenamebigj
thisistomakethenamebigl, i(pid);
# delimit cr ;
estsave, gen (reg)

# delimit ;
mfx2, m varlist(thisistomakethenamebiga) at(thisistomakethenamebigb=0,
thisistomakethenamebigc=0, thisistomakethenamebigd=0,
thisistomakethenamebige=0, thisistomakethenamebigf=0,
thisistomakethenamebigh=0, thisistomakethenamebigi=0,
thisistomakethenamebigj=0, thisistomakethenamebigk=0,
thisistomakethenamebigl=0) stub(mfx);
# delimit cr ;

*###### end example ##############

-----Original Message-----
[] On Behalf Of Richard
Sent: 20 July 2007 18:25
Subject: Re: st: -warning: variables in at() list not found in model
after mfx or mfx2

At 10:27 AM 7/20/2007, Mirko wrote:

>Both -mfx2- and -mfx- seem to work, but both the commands return a 
>warning that reads:
>"-warning: variables z10 ...z30 in at() list not found in model-
>I checked repeatedly and those variables are (and must be) in the
>I then wondered if there was a maximum number that could be dealt with 
>by the -at()- option. Playing with my model I found out that I stop to 
>get that warning when I have less than 10 variables in -at()-

Without a replicable example it is hard to tell.  I wonder if a possible
workaround would be to center your x1-x40 variables so they all had a
mean of zero, e.g. using Ben Jann's -center- command, available from

center x1-x40 if !missing(y, x1-x40, z1-z30)

and then on mfx/mfx2 specify -at(zero)-.

I think this will work so long as x1 is continuous; if it isn't then you
shouldn't center it.

If you try this, also try it with the set of fewer vars (where mfx/mfx2
currently work) and confirm that results are the same.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index