Statistics Help @ Talk Stats Forum
http://www.talkstats.com/
Free statistics help forum. Discuss statistical research, data analysis, statistics homework questions, R, SAS, Stata, SPSS, and more.enTue, 27 Jan 2015 20:14:52 GMTvBulletin60http://www.talkstats.com/images/misc/rss.pngStatistics Help @ Talk Stats Forum
http://www.talkstats.com/
Test of discrete distributions
http://www.talkstats.com/showthread.php/59331-Test-of-discrete-distributions?goto=newpost
Tue, 27 Jan 2015 19:59:12 GMTThere are test such as Anderson Darling if a distribution is normally distributed. At least in SAS these do not cover discrete distributions such as...There are test such as Anderson Darling if a distribution is normally distributed. At least in SAS these do not cover discrete distributions such as Poisson or binomial. Nor can you do a qq plot for these [there are complex ways to generating equivalents to qq plots].

Anyone know a test if data fits any of the major discrete distributions? The chi square goodness of fit does not, because you don't know if the specific parameter being tested or the distribution is being rejected when you reject the null.
]]>Applied Statisticsnoetsihttp://www.talkstats.com/showthread.php/59331-Test-of-discrete-distributionsSum Rows of Specific Variable Based on two Conditions
http://www.talkstats.com/showthread.php/59330-Sum-Rows-of-Specific-Variable-Based-on-two-Conditions?goto=newpost
Tue, 27 Jan 2015 19:41:08 GMTPlease see example dataset below to best illustrate my goal. The cases that need to be changed are in red and blue (arbitrary color choices).
I am...Please see example dataset below to best illustrate my goal. The cases that need to be changed are in red and blue (arbitrary color choices).

I am cleaning a large dataset and I have about 2,500 duplicates. Basically, one patient (PtID) should never have more than one drug (DrugCode). So, I need to sum the values for DrugMos per the same DrugCode per the same PtID, and I need to sum the values for SzFreeMos per the same DrugCode per the same PtID. In other words, if PtID and DrugCode are the same, then the individual original DrugMos values need to be replaced the sum of those individual DrugMos values (same with SzFreeMos). It would need to look like the "After" example. Once I accomplish the After example, I can easily find duplicate cases and delete those.

Thank you
]]>SPSScatalyst989http://www.talkstats.com/showthread.php/59330-Sum-Rows-of-Specific-Variable-Based-on-two-Conditionscreate a Legend for a plot
http://www.talkstats.com/showthread.php/59329-create-a-Legend-for-a-plot?goto=newpost
Tue, 27 Jan 2015 19:27:31 GMTI am trying to run this code in R to create a legend but it doesn't work: