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

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: RE: Stata programming and the scalar/tempname command |

From |
Finne Håkon <Hakon.Finne@sintef.no> |

Date |
Thu, 6 Jun 2002 17:19:08 +0200 |

Reply-to |
statalist@hsphsun2.harvard.edu |

Sender |
owner-statalist@hsphsun2.harvard.edu |

scalar__0000OP is the concatenation of scalar and the expanded name of `degreef' (which will change every time you run it). Put a space between the two in line 5 (not counting blank lines) of your code below, and the parser will understand the first one as a command and the second one as a parameter for that command, instead of the whole as a command and = as a parameter for that command. Håkon Håkon Finne http://www.sintef.no > -----Original Message----- > From: Anna-Lisa Pierre [mailto:annaf2001@hotmail.com] > Sent: 6. juni 2002 16:38 > To: statalist@hsphsun2.harvard.edu > Subject: st: 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: > scalar__0000OP" > 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`degreef'=e(df_m) > 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'~=. > > > > _________________________________________________________________ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: RE: Stata programming and the scalar/tempname command** - Next by Date:
**Re: st: reading a value from a file into a scalar** - Previous by thread:
**st: RE: Stata programming and the scalar/tempname command** - Index(es):

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