your item1 isn't a variable, it's a scalar. The scalar can be manipulated
algebraically and displayed, but it can not be used as a variable. If you
really want a variable, then use -generate- to create it. Most likely, you
don't want a variable that is just a constant. Perhaps you should explain
what you actually want to do. If you want to record the kappa values for
different values of hosp, perhaps -statsby- could help?
I'd like to tablulate hospital specific kappas, in which a 10 item
questionnaire was completed by two observers and with dicotomous responses
to the items. I wrote a do file defining the scalars:
kap item1obs1 item1obs2 if hosp==2
scalar item1 = r(kappa)
and so on.
This displays the kappa of item 1 hospital 2 but I am not able to tabulate
this or manupulate it algebraically.
When I search for the the newly defined variable item1, I get an error
message that the variable cannot be found. It seems that it has something
to do with scalars. I've checked the manuals and can't figure it out.