# how can I deflate my variables in stata?

#### gihan

##### New Member
dear all,
how can I deflate the variables with average total assets in stata program? thanx

#### wangwang

##### New Member
You may need to show a simple example with necessary variables so others may understand your problem.

#### gihan

##### New Member
famamacbeth regression with stata help

thank u sir for your reply. i really need some help. i'm trying to perform famamacbeth regression with stata, i'm using xtfmb_ado and i followed the steps in the help file (http://fmwww.bc.edu/repec/bocode/x/xtfmb.ado) which are too much steps, i'm new to stata and don't know weather i'm doing it the right way. all i do is to copy and paste the commands in the .ado file and replace timevar by year, panelvar by company, rhsvar with independent var and lhsvar with dependent var and allvars with year company independent var dependent var, all other things i strictly copy and paste it without any change, that worked with me until the following command:
else { // Replay of the estimation results
if "e(cmd)'"!="xtfmb" error 301
syntax [, Level(cilevel)]
}
where stata responded to me that ''program error: code follows on the same line as
> open brace
r(198);''
and when i tried to skip this step to see what will happen in the next step which is:
local R2text "avg. R-squared = "
if lag'!=9999 local SE_Text "Newey-West corrected SE (lag length: `lag')"
stata responded to me that ''=9999 invalid name
r(198);''
so i stopped, i seriously need to know -and please pardon my ignorance of stata-is that right what i'm doing by following all these steps? and if it is right what can i do to make these steps mentioned above work? and am i supposed to repeat this whole thing for each regression equation to apply famamacbeth regression on it. thank you for your patience for this long message and i will indeed appreciate any help.

Last edited: