I am trying to write the results of alpha to a file using statsby, a command with which I had not previously worked, for the source data at the bottom of this message. The command without statsby
works great and returns all the relevant results for alpha for each item. However, the basic statsby code
does not return the relevant results for each item. Instead, it returns 19 observations that are a series of 0s and 1s that, frankly, might as well be random for all I know
I have played around with changing the term in the by parantheses. Leaving a blank
gets me an output with the test level Cronbach's alpha, but not all the statistics for each item that I need. If I specify each variable individually, I can get their individual alpha coefficient to show up. So
yields
The correct Cronbach alpha for v12570069 is displayed in the zero line, but it's missing the item-test etc stats I also need, and obviously I don't want a separate command and file for each individual item.
I have spent hours with both the help files on statsby and the one post on this board that referenced alpha and statsby together and am still hitting a brick wall.
Thanks in advance,
Bryan
SOURCE DATA BELOW
Code:
alpha v*, item
Code:
statsby, by(v*): alpha v*, item
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(v12570069 v12570679 v12571087 v12791904 v12803332 v12855959 v12855960 v12855962) 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 . . . . . . . . end
Code:
by()
Code:
statsby, by(v12570069): alpha v*, item
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte v12570069 float(alpha k cov) 0 .8634465 109 .01164183 1 .6299615 110 .002703245 end
I have spent hours with both the help files on statsby and the one post on this board that referenced alpha and statsby together and am still hitting a brick wall.
Thanks in advance,
Bryan
SOURCE DATA BELOW
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(v12570069 v12570679 v12571087 v12791904 v12803332 v12855959 v12855960 v12855962) 1 . . . 1 0 0 1 1 . . . 1 1 0 0 1 . . . 1 1 1 1 1 . . . 1 1 0 1 1 . . . 1 1 1 1 0 . . . 0 0 1 1 1 . . . 1 1 1 1 1 . . . 1 0 1 1 1 . . . 0 1 1 1 0 . . . 1 1 0 1 1 . . . 1 1 1 1 1 . . . 1 1 1 0 0 . . . . 0 0 1 . . . . 1 . . . 1 . . . 1 1 1 1 1 . . . 1 0 1 1 1 . . . 1 1 1 1 1 . . . 1 1 1 1 1 . . . 1 1 1 1 1 . . . 1 1 1 1 1 . . . 1 1 1 0 1 . . . 1 1 1 1 0 . . . 1 0 1 1 0 . . . 1 0 1 1 1 . . . 0 0 0 1 1 . . . 1 0 0 0 1 . . . 1 0 1 1 1 . . . 1 0 1 1 1 . . . . 1 0 1 0 . . . 0 0 0 1 0 . . . 1 0 1 0 1 . . . 1 0 1 0 0 . . . 1 0 0 0 1 . . . 1 0 1 0 1 . . . 1 0 1 0 1 . . . 1 0 1 1 1 . . . 1 0 1 0 1 . . . 1 0 1 1 1 . . . 0 0 0 0 1 . . . 1 0 1 0 1 . . . 0 0 1 1 0 . . . 1 0 1 0 1 . . . 1 1 1 1 0 . . . 1 0 0 0 1 . . . 1 1 1 0 1 . . . . 0 1 1 1 . . . 1 1 1 0 0 . . . 1 1 1 1 1 . . . 1 0 1 1 0 . . . 1 0 0 0 0 . . . 1 0 1 1 1 . . . 1 0 0 0 1 . . . 1 1 1 0 1 . . . 1 0 1 1 1 . . . 1 1 1 1 1 . . . 0 0 1 1 0 . . . 0 0 0 0 1 . . . 1 0 1 1 0 . . . 0 0 0 1 1 . . . 0 0 0 1 0 . . . . 0 0 1 1 . . . 1 1 1 1 0 . . . 1 1 0 1 . . . . 0 . . . 1 . . . 1 0 0 1 1 . . . 1 1 0 1 1 . . . 1 0 1 0 1 . . . 1 1 0 1 1 . . . 0 0 1 0 1 . . . 1 0 1 1 1 . . . 1 1 1 1 1 . . . 1 0 1 1 1 . . . 1 0 1 1 1 . . . 1 1 1 1 1 . . . 1 1 1 1 1 . . . 1 0 1 1 0 . . . 0 0 1 1 1 . . . 1 0 1 0 0 . . . 1 0 1 1 0 . . . 1 0 0 0 1 . . . 1 1 1 1 1 . . . 1 1 0 0 1 . . . . 1 1 0 1 . . . 1 0 0 0 0 . . . 0 1 1 0 0 . . . 1 1 1 0 1 . . . 1 0 0 1 1 . . . 1 0 1 1 0 . . . 1 1 1 1 1 . . . 1 0 1 1 1 . . . 1 1 1 1 1 . . . 1 0 1 0 1 . . . 1 1 1 1 0 . . . 1 0 1 0 0 . . . 0 0 0 0 1 . . . . 0 1 1 1 . . . 1 0 1 1 1 . . . 1 1 1 1 0 . . . 0 0 0 0 0 . . . 0 1 0 0 end
Comment