Art, You might find this article useful: Ryan On Mon, Nov 26, 2012 at 8:31 AM, Art Kendall <[hidden email]> wrote:
|
Hi Ryan and Art,
I really appreciate your cooperation. I find the syntax very interesting; although it gave me problems when running it. Thank you both once more. Kind regards R B <[hidden email]> escribió: > Art, > > You might find this article useful: > > http://www.ic.unicamp.br/~wainer/cursos/2s2009/1009213286.pdf > > Ryan > On Mon, Nov 26, 2012 at 8:31 AM, Art Kendall <[hidden email]> wrote: > >> I cobbled together a data generation I had with Ryan's syntax. >> I intended to use a few Ns and OMS to grab the results and graph them but >> It is now time for some clients. If I have a chance I'll add the OMS and >> graph in the next few days. >> Meanwhile here is something to eyeball to help develop a feel for the >> comparison. >> >> *compare methods confidence intervals for proportions. >> set seed 20121125. >> new file. >> input program. >> loop ID= 1 to 100. >> vector x (100,f1). >> loop #i = 1 to 100 by 1. >> compute proportion= #i/100. >> compute x(#i) = rv.bernoulli(proportion). >> end loop. >> >> end case. >> end loop. >> end file. >> end input program. >> >> EXECUTE. >> *End of Data Generation Code. >> >> *Use NPTESTS to obtain confidence limits about a single proportion >> using Clopper-Pearson, Jeffreys, and Likelihood. >> * Surprise this does not work /ONESAMPLE TEST (x1 to x100) . >> NPTESTS >> /ONESAMPLE TEST( >> x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 >> x19 x20 >> x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 >> x39 x40 >> x41 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 >> x59 x60 >> x61 x62 x63 x64 x65 x66 x67 x68 x69 x70 x71 x72 x73 x74 x75 x76 x77 x78 >> x79 x80 >> x81 x82 x83 x84 x85 x86 x87 x88 x89 x90 x91 x92 x93 x94 x95 x96 x97 x98 >> x99 x100) >> >> BINOMIAL(TESTVALUE=0.5 >> CLOPPERPEARSON JEFFREYS LIKELIHOOD >> SUCCESSCATEGORICAL=LIST(1) SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) >> /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE >> /CRITERIA ALPHA=0.05 CILEVEL=95. >> >> Art Kendall >> Social Research Consultants >> >> On 11/26/2012 7:27 AM, R B wrote: >> >> One more point--After seeing that the nonparametric procedure produces >> Likelihood confidence intervals, I tried to replicate the results using >> GENLIN. As expected, the results were the same [to at least the 3rd decimal >> place]. See the code below my name. (Note that the values inserted into the >> COMPUTE statement were obtained from the output). >> >> Ryan >> -- >> >> * Generalized Linear Models. >> GENLIN x (REFERENCE=FIRST) >> /MODEL INTERCEPT=YES >> DISTRIBUTION=BINOMIAL LINK=LOGIT >> /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=MODEL MAXITERATIONS=100 >> MAXSTEPHALVING=5 >> PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012 ANALYSISTYPE=3(WALD) >> CILEVEL=95 CITYPE=PROFILE(.0001) >> LIKELIHOOD=FULL >> /MISSING CLASSMISSING=EXCLUDE >> /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. >> >> COMPUTE Lower_Limit=exp(.7598884094034025) / (1 + exp(.7598884094034025)). >> COMPUTE Upper_Limit=exp(1.6959805306633795) / (1 + >> exp(1.6959805306633795)). >> EXECUTE. >> On Sun, Nov 25, 2012 at 7:00 PM, R B <[hidden email]> wrote: >> >>> Hi Rubier, >>> >>> Below is SPSS syntax that generates binary (0/1) data (n=100), and then >>> constructs 95% confidence intervals using the nonparametric procedure. I >>> wrote the syntax to generate the data, but then used the pull-down menu to >>> obtain the syntax for the nonparametric procedure via the PASTE >>> button. Using the nonparametric procedure on the simulated data, you will >>> obtain the following 95% confidence intervals: >>> >>> Clopper-Pearson--> 95% CI: [.675, .848] >>> Jeffreys--> 95% CI: [.681, .844] >>> Likelihood--> 95% CI: [.681, .845] >>> >>> Hope this illustration helps. >>> >>> Ryan >>> -- >>> >>> *Beginning of Data Generation Code. >>> set seed 98765432. >>> new file. >>> inp pro. >>> loop #obs= 1 to 100. >>> comp x = rv.bernoulli(.70). >>> end case. >>> end loop. >>> end file. >>> end inp pro. >>> EXECUTE. >>> *End of Data Generation Code. >>> >>> *Use NPTESTS to obtain confidence limits about a single proportion using >>> Clopper-Pearson, Jeffreys, and Likelihood. >>> NPTESTS >>> /ONESAMPLE TEST (x) BINOMIAL(TESTVALUE=0.5 CLOPPERPEARSON JEFFREYS >>> LIKELIHOOD >>> SUCCESSCATEGORICAL=LIST(1) SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) >>> /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE >>> /CRITERIA ALPHA=0.05 CILEVEL=95. >>> On Thu, Nov 22, 2012 at 10:44 AM, Rubier Perez <[hidden email] >>> > wrote: >>> >>>> Hi, Ryan. Ok, thank you very much. >>>> Rubier >>>> >>>> >>>> R B <[hidden email]> escribió: >>>> >>>> >>>> Rubier, >>>>> >>>>> You have a couple of options using the pull-down menu: >>>>> >>>>> Analyze-->Generalized Linear Models-->Generalized Linear Models >>>>> Analyze-->Nonparametric Tests-->One Sample >>>>> >>>>> The nonparametric tests procedure provides several options for >>>>> constructing confidence limits about a binomial proportion. >>>>> >>>>> Ryan >>>>> >>>>> On Nov 21, 2012, at 4:36 PM, Rubier Perez <[hidden email]> >>>>> wrote: >>>>> >>>>> Hi, Ryan. And where is the option in SPSS for the genlin procedure? >>>>>> Thank you >>>>>> >>>>>> >>>>>> Ryan Black <[hidden email]> escribió: >>>>>> >>>>>> You can use the genlin procedure to construct confidence limits >>>>>>> about a proportion. >>>>>>> >>>>>>> Ryan >>>>>>> >>>>>>> On Nov 21, 2012, at 3:42 PM, Rubier Perez <[hidden email]> >>>>>>> wrote: >>>>>>> >>>>>>> Thank you all very much for your contribution, I was really searching >>>>>>>> for the possibility of through the SPSS interface to estimate a >>>>>>>> confidence interval of 95% for the variance and the proportion. >>>>>>>> Thanks >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> This message was sent using IMP, the Internet Messaging Program. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> Este mensaje le ha llegado mediante el servicio de correo >>>>>>>> electronico que ofrece Infomed para respaldar el cumplimiento de >>>>>>>> las misiones del Sistema Nacional de Salud. La persona que envia >>>>>>>> este correo asume el compromiso de usar el servicio a tales fines y >>>>>>>> cumplir con las regulaciones establecidas >>>>>>>> >>>>>>>> Infomed: http://www.sld.cu/ >>>>>>>> >>>>>>>> ===================== >>>>>>>> To manage your subscription to SPSSX-L, send a message to >>>>>>>> [hidden email] (not to SPSSX-L), with no body text >>>>>>>> except the >>>>>>>> command. To leave the list, send the command >>>>>>>> SIGNOFF SPSSX-L >>>>>>>> For a list of commands to manage subscriptions, send the command >>>>>>>> INFO REFCARD >>>>>>>> >>>>>>> >>>>>>> ===================== >>>>>>> To manage your subscription to SPSSX-L, send a message to >>>>>>> [hidden email] (not to SPSSX-L), with no body text except >>>>>>> the >>>>>>> command. To leave the list, send the command >>>>>>> SIGNOFF SPSSX-L >>>>>>> For a list of commands to manage subscriptions, send the command >>>>>>> INFO REFCARD >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> This message was sent using IMP, the Internet Messaging Program. >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Este mensaje le ha llegado mediante el servicio de correo >>>>>> electronico que ofrece Infomed para respaldar el cumplimiento de >>>>>> las misiones del Sistema Nacional de Salud. La persona que envia >>>>>> este correo asume el compromiso de usar el servicio a tales fines y >>>>>> cumplir con las regulaciones establecidas >>>>>> >>>>>> Infomed: http://www.sld.cu/ >>>>>> >>>>>> ===================== >>>>>> To manage your subscription to SPSSX-L, send a message to >>>>>> [hidden email] (not to SPSSX-L), with no body text except >>>>>> the >>>>>> command. To leave the list, send the command >>>>>> SIGNOFF SPSSX-L >>>>>> For a list of commands to manage subscriptions, send the command >>>>>> INFO REFCARD >>>>>> >>>>> >>>>> ===================== >>>>> To manage your subscription to SPSSX-L, send a message to >>>>> [hidden email] (not to SPSSX-L), with no body text except >>>>> the >>>>> command. To leave the list, send the command >>>>> SIGNOFF SPSSX-L >>>>> For a list of commands to manage subscriptions, send the command >>>>> INFO REFCARD >>>>> >>>>> >>>> >>>> >>>> ---------------------------------------------------------------- >>>> This message was sent using IMP, the Internet Messaging Program. >>>> >>>> >>>> -- >>>> >>>> Este mensaje le ha llegado mediante el servicio de correo electronico >>>> que ofrece Infomed para respaldar el cumplimiento de las misiones del >>>> Sistema Nacional de Salud. La persona que envia este correo asume el >>>> compromiso de usar el servicio a tales fines y cumplir con las >>>> regulaciones >>>> establecidas >>>> >>>> Infomed: http://www.sld.cu/ >>>> >>>> ===================== >>>> To manage your subscription to SPSSX-L, send a message to >>>> [hidden email] (not to SPSSX-L), with no body text except the >>>> command. To leave the list, send the command >>>> SIGNOFF SPSSX-L >>>> For a list of commands to manage subscriptions, send the command >>>> INFO REFCARD >>>> >>> >>> >> >> > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |