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

RE: st: countfit and inflate(_cons)

From   "Nick Cox" <>
To   <>
Subject   RE: st: countfit and inflate(_cons)
Date   Wed, 29 Aug 2007 18:13:40 +0100

In addition to this work-around, it does seem
at first sight that Garry has been bitten by a bug
in -countfit-. -countfit- accepts a string 
as the argument to -inflate()- but internally 
it calls another program that only accepts
a varlist in the corresponding argument. 
That therefore chokes on -_cons-. 

The -countfit- code includes this intriguing

** better way to do this?
local nvars : word count `varlist'
foreach i of numlist 2(1)`nvars' {
	local var : word `i' of `varlist'
      local inflate "`inflate' `var'"

I suggest instead 

gettoken response inflate : varlist 


Scott Merryman
> Rather than using -_cons- you could create your own constant:
> sysuse auto,clear
> replace rep = 0 if rep ==.
> gen mycon =1
> zip rep mpg gear ,inf(mycon, nocons) nolog
> countfit rep gear mpg, inflate(mycon) noprtable ///
>   nodash noestimates  zip prm
Garry Alan Anderson 

> > The inflate(_cons) option does not seem to be working with countfit.
> > Countfit is a user-written command and can be found via 
> -findit countfit-
> > and spost9_ado

*   For searches and help try:

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