[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Stata programming and the scalar/tempname command
> Hi this is a bit of a programme that I am writing. Can anyone spot why it
> does not work? The scalar commands do not appear to work. I get the
> following error "= invalid name" and "unrecognized command:
> when I run the programme. Any help is greatly appreciated.
> tempname catnum degreef obs
> tempvar scoreqq scor_uqq scor_nqq diffqq1
> noisily oprobit `*' `if' [`weight'`exp']
> scalar `catnum'=e(k_cat)
> scalar `obs' = e(N)
> predict `scoreqq' `if', xb
> ge `scor_uqq' = `scoreqq'
> replace `scor_uqq' =. if `1'==.
> ge `scor_nqq' = `scor_uqq'
> replace `scor_nqq' = `scor_uqq' - _b[`2'] if `2'==1
> replace `scor_uqq' = `scor_nqq' + _b[`2'] if `2'==0
> ge `diffqq1' = normprob(_b[_cut1]-`scor_uqq') -
> normprob(_b[_cut1]-`scor_nqq') if `1'~=.
Put a space between
There's possibly a more subtle error with your call to -oprobit-,
depending partly on what -syntax- you allow.
* For searches and help try: