Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Error after -predict- in -apc_ie-

From   Steven Samuels <>
Subject   st: Error after -predict- in -apc_ie-
Date   Mon, 3 Jan 2011 22:46:52 -0500


Wincent Ronggui Huang ( wrote to me privately that advice that I had given in August about -predict- following - apc_ie- did not work. (-apc_ie- is the age-period-cohort "intrinsic estimation" command. It and apc_cglim ("generalized linear models with equality constraints on age-period-cohort effects") are commands in package -ap by Schulhofer-Wohl and Yang. ("net describe apc, from( )".

I got mixed up and gave Wincent information about apc_cglim, not apc_ie. -predict- works after -apc_cglim-, but after -apc_ie- it raises an error. In the example do file that accompanies the package, the error message is:
". predict mu;
variable age_0 not found

I apologize to Wincent for my mistake. I can only suggest that he contact the authors of -apc-.


On Jan 2, 2011, at 9:55 PM, Wincent wrote:

May I ask how to use the three options. It generates an error like this,

. use "apc_example_data.dta", clear
. apc_ie death_f if age<=90,  age(age) period(year) cohort(cohort)
family(poisson) link(log)   exposure(exp_f) agefx(A) cohortfx(C)
option agefx() not allowed

On 1 August 2010 20:24, Steve Samuels <> wrote:

The -help- for -apc_ie-  indicates that it takes -glm- options, and
inspection of the source code reveals that it indeed calls -glm-. So
all -glm- post-estimation command should work. The answer to your
question is "yes", provided you use the agefx(), periodfx() and
cohortfx() options (not mentioned in the -help-) and keep the
generated variables. Run the second example in the accompanying do
file (net describe apc, from( and
do _not_ drop the generated variables _A* _P* and _C*. Then -predict-
should work as expected.


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index