Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Summarizing Kappa Output


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Summarizing Kappa Output
Date   Sat, 26 Jun 2010 10:14:04 +0200

<>

Try this to get the results into .txt:

*************
webuse rate2, clear

expand 3
set seed 54968
gen byte mygroups=irecode(runiform(),0,.5,.75,1)

tempname hdle
cap erase info.dta

postfile `hdle' str10(var1 var2) int group /* 
*/ kappa prop_agree z using info.dta

qui levelsof mygroups

foreach gr in `r(levels)'{
	kap rada radb if mygroups==`gr'
	post `hdle' ("rada") ("radb") (`gr') /* 
	*/ (r(kappa)) (r(prop_o)) (r(z)) 
}

postclose `hdle'

u info, clear
l, noo

outsheet using myfile.txt, replace
!start myfile.txt
*************


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Donald Spady
Sent: Samstag, 26. Juni 2010 06:12
To: statalist@hsphsun2.harvard.edu
Subject: st: Summarizing Kappa Output

It has been a long time since I visited Statalist, but I need some help now.

I have a project with a 'bazillion' kappas and I want to summarize them
Here is my command:
kap var1 var2 if var3 == 'n'

where 'n' can take many values and there are various combinations of 
var1 and var 2

What I want to be able to do is get output (using the 'return' function 
I think) so that it looks something like this:
Var1 var2 var3value (e.g. 1) kappa  %Agreement  Z
Var1 var2 var3value (e.g. 2) kappa  %Agreement  Z
Var1 var2 var3value (e.g. 3) kappa  %Agreement  Z

This should allow me to export it to a spreadsheet or a table.
I imagine it could be done by returning the values to a matrix somehow, 
but I have no experience in this at all
Can I do this? If so, How?

Many thanks.
Don



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index