ࡱ> } sx !"#$t&'()*?,-./0123456789:;<=>%@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqruwyz{|Root Entry F%n08@>Workbook#._VBA_PROJECT_CUR"!H708VBAM7 7 \pHumberto Barreto Ba= ThisWorkbook=h<%<X@"1 Arial1 Arial1 Arial1 Arial1 Arial1 Arial1 Calibri1  Calibri1 Calibri14 Calibri1  Calibri1 Calibri1 Calibri1,8 Calibri18 Calibri18 Calibri1> Calibri14 Calibri1< Calibri1? Calibri1h8 Cambria1 Calibri1  Calibri"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)                                                                      ff + ) , *     P  P        `            a>      !  20% - Accent1 20% - Accent2 20% - Accent3 20% - Accent4 20% - Accent5 20% - Accent6 40% - Accent1 40% - Accent2 40% - Accent3 40% - Accent4 40% - Accent5 40% - Accent6 60% - Accent1 60% - Accent2 60% - Accent3 60% - Accent4 60% - Accent5! 60% - Accent6 "Accent1 #Accent2 $Accent3 %Accent4 &Accent5 'Accent6(Bad) Calculation* Check Cell+,-./Explanatory Text 0Good1 Heading 12 Heading 23 Heading 34 Heading 4 5Input6 Linked Cell 7Neutral 8Note 9Output: ;Title <Total= Warning Text`+Sheet1gg(This add-in wasn't documented carefully.mI wrote the DW module while in Costa Rica in 1998 and merged it with the other functions sometime after that.II will begin keeping a log of changes (like we do with the other add-ins)(Added foreign language uninstall support5Added error handling to enable Cancel buttons to workAdded file search. = cc||A}A} 00\);_(*ef;_(@_) }A} 00\);_(*ef;_(@_) }A} 00\);_(*ef;_(@_) }A} 00\);_(*ef;_(@_) }A} 00\);_(*ef;_(@_) }A} 00\);_(*ef ;_(@_) }A} 00\);_(*L;_(@_) }A} 00\);_(*L;_(@_) }A} 00\);_(*L;_(@_) }A} 00\);_(*L;_(@_) }A} 00\);_(*L;_(@_) }A} 00\);_(*L ;_(@_) }A} 00\);_(*23;_(@_) }A} 00\);_(*23;_(@_) }A} 00\);_(*23;_(@_) }A} 00\);_(*23;_(@_) }A}  00\);_(*23;_(@_) }A}! 00\);_(*23 ;_(@_) }A}" 00\);_(*;_(@_) }A}# 00\);_(*;_(@_) }A}$ 00\);_(*;_(@_) }A}% 00\);_(*;_(@_) }A}& 00\);_(*;_(@_) }A}' 00\);_(* ;_(@_) }A}( 00\);_(*;_(@_) }}) }00\);_(*;_(@_)    }}* 00\);_(*;_(@_) ??? ??? ??? ???}-}/ 00\);_(*}A}0 a00\);_(*;_(@_) }A}1 00\);_(*;_(@_) }A}2 00\);_(*?;_(@_) }A}3 00\);_(*23;_(@_) }-}4 00\);_(*}}5 ??v00\);_(*̙;_(@_)    }A}6 }00\);_(*;_(@_) }A}7 e00\);_(*;_(@_) }x}800\);_(*;_(  }}9 ???00\);_(*;_(??? ???  ??? ???}-}; 00\);_(*}U}< 00\);_(*;_( }-}= 00\);_(*M 20% - Accent1 ef %M" 20% - Accent2 ef %M& 20% - Accent3 ef %M* 20% - Accent4 ef %M. 20% - Accent5 ef %M2 20% - Accent6  ef %M 40% - Accent1 L %M# 40% - Accent2 L湸 %M' 40% - Accent3 L %M+ 40% - Accent4 L %M/ 40% - Accent5 L %M3 40% - Accent6  Lմ %M 60% - Accent1 23 %M$ 60% - Accent2 23ٗ %M( 60% - Accent3 23֚ %M, 60% - Accent4 23 %M0 60% - Accent5 23 %M4 60% - Accent6  23 %AAccent1 O %A!Accent2 PM %A%Accent3 Y %A)Accent4 d %A-Accent5 K %A1Accent6  F %9Bad  % Calculation  }%  Check Cell  %????????? ??? Comma( Comma [0]&Currency. Currency [0]G5Explanatory Text %;Good  a%G Heading 1 I}%OG Heading 2 I}%?G Heading 3 I}%239 Heading 4 I}%uInput ̙ ??v% K Linked Cell }%ANeutral  e%"Normalb Note  wOutput  ???%????????? ???$Percent1Title I}%MTotal %OO? Warning Text %XTableStyleMedium9PivotStyleLight16BĘ7ɹq1   ,-  dMbP?_*+%"??U} m       ~ >@  ~ ? V@ @>@  7 Sheet2ggD& ThisWorkbook] __SRP_96__SRP_8>OptionsForm +ś  !"#$%&'()*+,-./012345789:;<=?@BCDEFGHIJKLMNOPRSTUVWXYZ[\]^_`abcefghijklmnpqrstuvwxyz{|}~82@ "P P#< YO1qFpbOǽ xpbOǽ YO1qMEPSLSS6"<<<<N0{00020819-0000-0000-C000-000000000046}@ @`|JT  `X ` %@ %0 %@@\T}I$*\Rffff*1`49d07e964"" BP "X  " 2     @`x D$   R( < Check Solver Reference and attempt to add it if not presentA@ Put the Wizard menu item inA@op@+ Delete the new menu command from the Tools menu.check languagecheck language] "!$$WThanks to John Talyor ( "%&Tools' =it's not English, try to get the word for Tools from the userd(The language of this installation of Excel does not appear to be EnglishUS. Please enter the word that Excel is using for Tools on the main menu across the top of the screen. For example, in Spanish, it is Herramientas.Get the word for TOOLS Herramientas "%*' kdTools' kDummyDepVar Analysis ... Worksheet Menu Bar "%,%.%.B@0oxpAttribute VB_Name = "ThisWorkbook" Bas0{00020P819-0C$0046} |GlobalSpacFalse dCreatablPredeclaIdTru BExposeTemplateDerivBustomizD2Sub _AddinInstall() ' Check Solver Referensand att;t to add it if not presepnt   +Puhe WFrd menu em inddDummyD@epVarM I4 E<YQ]UniG/ ' Delet@newcommA0from ATools C A#.On Erro>suNex 5 cBFlanguag@kDim myB As Sng If Left(Applicatio@n.Oper@ngSys;, 1)W" The@E'Thanks[John Ta0lyorInternal(xlNonEnglishFuncAs) <> A?DA.)AB'it'st, t$rygeCowonf@G8FSuse&E K*putBox(e R of@dis@B2Excel doe$appeDarA#be (US. Ple!zOVA;that #@ using on@e mainCacros#@-`FtopCe screen. D F@exa`ne, @n,```s Herrami@as.", "G%OOLS!I, #2`o!]If ^(".`4/,#VgJC]Bars("|she aj ").Contr_($@("p AnMs'h...djqrU pa616#4a``  I  W 0   0 @  44PrU @$ `U$A `Y n'"P1#xME (SLSS<N0{00020 $A$8 coefficient in the analysis sheet. 3) A data set with 3 or more X vars means coefficients have a second digit on the row (e.g., $A$10) and a loop based on 5 (for $A$8 + 1) had to be fixed.Z Although tested on various datasets, it is unclear how universally flexible this code is.]@]X]p]]]]]]]]P]h]]]]]]]](]@]X]p]]]]]]]]0 Get the name of the sheet t!'L Make sure you're on the sheetA1 t%vB@H Get the number of X variables 62 6$| "!x%z < '<d~Fk~ Get the number of Obs 6' 6$| "!x%z > '>d`FkPH@ > <Hh Estimated SE analysis 2!!Estimated SEs (using numerical derivatives if NNLS) are calculated. These SEs require large sample sizes. The small sample properties are not generally known. $ $uThe algorithm assumes Solver has found the optimal solution. Actual calculations can be seen beginning in column AA. Estimated SEs $'  A@r|PkH Put down the derivative matrix < '@ IF it's NLLS$| Predicted 6 @ 6  $|Change 6+| 8 > +$A$ 6 'P 8$|! P'R 8$|! R $'\+($A$ 6  + 0.00000001)'^ 8$|! R P $'` \ ^ `'d=( 8$|!$ -  d )/0.00000001 8 6$|( 8 6 @ 'B B <  'DMatrix @ +|!=MINVERSE(MMULT(TRANSPOSE(R2C27:R > C @ ),R2C27:R > C @)) B$| <  D$|$v( Put down the resultsEstimates and Estimated SEs+|Est RMSE+|$|! > < $+| 8 <   8  $|! 8+| 8 $|! 8+|$|! 8 B 8  $|!$ 8+| 8 IF it's ML$| Likelihoode! Error handling for Out of MemoryF Put down predicted Predicted+| 8 > =1'P 8$|! P'R1-'P 8$|! P'T= 8$|! R T R  $'X X 8$|(tn"PPxMEPSPSSSiabl`@.`B`D`F{ 1 HHa sp (2) has0`JA$3.`Lused`Not E`Phe w`Rhe u`T `V`X`Z`\`^```b`d`f`h`j`l`n`p`rH %`   `ends@ ng m`o R`ikel forenges in  ` suc   bee{ 1( xpH%x %HHx}I k  > vX >    ` "  (08@HPX` hpx  8 $Hp $"  (H"` l   &   (<@  *6 (@ h X      @  . 8 4X  4 . L  h x  (      8  H  h  x >   "(@ X h  V ( B8   , & &0Xp *&88H  >FL8: " ( 8P@h     (0X *` F. "8 X h x( & &( @ P p *2 " H h x@   @ ` (p ( F. "Hp   .  6  .8 4h   np x   <    @ X  ` x    ( 8*X  0@p4.> 8 (H p x  @!P!X! `! "h!! ! ! 2! # #(#0# 08#h#p#.x# $$$$%% %%% (%& &&"0&X&`&x&*&& D&' '0'P' X'h' 2p''' ' ' ' ( (( 8(X(`(*h( (((( () )0)H) X)h)))) ) 0))*6*P*4h* @***+ +(+@+ X+h+x+"+ ++ @+@(, h, ,,$, , , 0,  -0- H- h- x- - - --*- .(0.X. p.. .. ..../ / 00/`/h/6//4/ @0H0P0h0 000 000"0 101 @P1@1 1 12$2 @2 P2 $X22 (P3:x333333 $3 4*04`4h4 4,4 404 5"05>X5 5 $55&`66 &6,6.67807h7 7 &8 $08 X8,p8@8 8 8 9 89 H9`9*h99 9 d9@: H: *X: ::Z: ;; ;  ( ;PH; ; ;(;@; (< @< `< < <<*<< = d == = *= ==Z= H>P> X>  (h>N> > .> ?(? ?@@ @ 8@ X@  h@ x@@ A@AHA&PAxA"AAAA6A6B  PB 4`B B @B CD D0D D E E(E0E@E FGG G,0G `HpHxH H H General Comments7 This work depends on complicated string manipulations.o Run time errors are likely to be caused by unforeseen, subtle changes in names of variables and other objects.8 In testing, 3 such errors (which have been fixed) were:ng{ 1) A sheet name with a space such as Data (2) has cell reference 'Data (2)'!$A$3. The apostrophes caused run-time errors. not Ez 2) A data set had values in cell $A$8 of the data sheet which conflicted with the 8 Put down Residuals SquaredRes^2+| 8 > IF('P 8$|! P'R=1'P 8$|! P'T=( 8$|! R T R  $-Y 8)^2'Z Z 8$|( 8< Need another IF here because the derivatives for Probit and Logit are different. IF it's Probit$|!NORMDIST Put down analytical derivatives First the interceptInterceptDerivative+| 8 > NORMDIST'P 8$|! P'R 8$|! R $'\ 1-NORMDIST'P 8$|! P 'T 8$|! R T R  $1)'f 8$|! R T R  $0)'h,0,1'P 8$|! P'V 8$|! R V R  $)'j( h+ j* f)/( f^2)'l( h-( j*(1- f)))/(1- f)^2'n=- h* \ l, n)'d d 8$|(Fill myXArray for later use1 8 +H 8 Now the Xs 6 @ 6  $| Derivative 6+| 8 >  Get the X variable+$A$ 6 'P 8$|! P'R 6 @ R 8$|!+'Td R 8$|!,0,1'Tkh 8$|! R P T R  P $'d=AA 8* d 8 6$|(Fill myXArray for later use d 8 6 +H 8 6 IF it's Logit$|!EXP e Put down analytical derivatives First the interceptInterceptDerivative+| 8 > EXP'P 8$|! P'R))))'P 8$|! P'T 8$|! R T R $'^=-( ^)))/((1+ ^)))^2)'d d 8$|(Fill myXArray for later use1 8 +H 8 Now the Xs 6 @ 6  $| Derivative 6+| 8 >  Get the X variable+$A$ 6 'P 8$|! P'R 6 @ R 8$|!+'Td` R 8$|!))'Tk0 8$|! R P T R  P $'d=AA 8* d 8 6$|(Fill myXArray for later use d 8 6 +H 8 6' Other possibilities to EXP or NORMDISTdSomething is wrong. This algorithm uses the cell value in B2: if NORMDIST is in the formula, it's Probit; if EXP is present, it's Logit. Neither could be found. The algorithm will quit now.A@ A@r|0k(/ Form the foundation of covar matrix, see Judge @ 'B B <  'DSecond Partials of lnL @ +| B$| <  D$|$vB@  > 6 < 8 <  6$H1   8 $|! 6 8 B  $|! 6 8 B  $|(d  6$H'd d!'R d R $'J 6 Check to see if there single quotes in the sheet name J' J J $'J d R $'Nk d R $'N   8 $|! N J$%v! 6 8 B  $|! 6 8 B  $|(k 8 6  Get the covar matrix Covar Matrix <  B+|=-MINVERSE(R2C B:R <  C D) <  B$| <  <  D$|$v( Put down the resultsEstimated Coefficients and SEs+| 8 <   8  $|! 8+| 8 $|! 8+| < 8  B 8  $|!$ 8+| 8" Other possibilities to NLLS or MLdSomething is wrong. This algorithm uses the cell value in B1. If the text is Predicted, it's NLLS; if Likelihood, it's ML. It's neither or cannot be read. The algorithm will quit now.A@ A@r|kk Predicted Probability Table 2!! Put away the form 2B@Predicted probabilities for a range of values for a particular X variable are calculated, holding all other included Xs at their means. $ $<The algorithm assumes Solver has found the optimal solution.%Predicted Probability Table and Graph $'  A@r|k) Get the exo var to be used for pred prob]pClick on a single cell in column A with an exogenous variable name (not coefficient number) to be used in calculating predicted probabilities. To be meaningful, the variable should be a continuous variable.8Choosing an Exogenous Variable for Predicted Probability "%*. A check -- value must be text ! "!x%zYou clicked on a cell that contains the coefficient value itself. Please click on a cell that contains the NAME of the exogenous variable.A@Fkh Get myExoVar as a string] !$'! Get the labels of the other exos] <No other X variables+d < '6 8 <   8$|! != skip this one since it's the Exo var for the Pred Prob tabled 6 '6 8$|! 6+k 8k+ Get the equation string from the first obs'6 $A$4+$A$6'P 6$|! P'R,0,1'P 6$|! P'T T))))'P 6$|! P'Tk]  6$|! R T R $' Get myExoVar first cell ! $|!*'P  P'R*'P R  P 'T+'P R  P'V]8P V  T V T $'dp  T$'kP <GFj* Strip off the intercept and Exo Var terms]h $'+ ! $|!* 'P  P'R  R $  R P $'9 Loop to separate the other exo vars into separate pieces] <  8 < +'P  P'R R  P'T T  'Tk  R T R $ 8+ Cut the leading plus sign 8$$ 8+: Cut this individual exo var out for the next loop through  R $  R 8$  $' cut the coefficient value*'P 8$ P'R 8$ R $ 8+ 8* Get the equation string from the Last obs > '6 $A$4+$A$6'P 6$|! P'R,0,1'P 6$|! P'T T))))'P 6$|! P'Tk  6$|! R T R $' Get myExoVar last cell ! $|!*'P  P'R*'P R  P 'T+'P R  P'V V  T V T $'d  T$'k <GFj* Strip off the intercept and Exo Var terms] $'+ ! $|!* 'P  P'R  R $  R P $'9 Loop to separate the other exo vars into separate pieces] < @ 8 < +'P  P'R R  P'T T  'Tk  R T R $ 8+ Cut the leading plus sign 8$$ 8+: Cut this individual exo var out for the next loop through  R $  R 8$  $' cut the coefficient value*'P 8$ P'R 8$ R $ 8+ 8  Get where to put the resultsRInput the range of the cell where you want to put the Predicted Probability table. $ $1You may move this dialog box if it is in the way.l "%*." Put down the title and formattingPredicted Probability Table ! !$|( ! !$|! 999q  Put down means of X variables <$ ! !$|(d 6 <  Put down AverageAverage ! !$|( Put down the label 6$ ! ! 6 $|( Do the average 6$: 6$'p p$v "!x% ! ! 6 $|( 6 Put down description of tablegWhile varying a particular X value, all other included X variables are held constant at their averages. ! !$|( ! !$|!(kp Put down X variable of interestSDs away ! !$|( ! ! ! $|( 6 6  ! 6  !$|( : $v "!x% : $v "!x% 6  ! 6  ! $|( 6 Put down predicted probability Need IF for Probit and Logit IF it's Probit$|!NORMDIST Predicted Probability ! ! $|( 6  Form the pred prob string First the intercept$A$4'r Now the Xs'F 8 <   8$|! !  It's the One Exo Var r+ ! $|!* ! 6  ! $|!'rd <$ Do nothing -- it's the 1 X var casedp F 'F r+ 8 $|!* ! ! F $|!'rkk 8! Put down the formula in the cell =NORMDIST(+ r,0,1,1) ! 6  ! $|( 6 IF it's Logit$|!EXP ePredicted Probability ! ! $|( 6  Form the pred prob string First the intercept$A$4'r Now the Xs'F 8 <   8$|! !  It's the One Exo Var r+ ! $|!* ! 6  ! $|!'rdp <$ Do nothing -- it's the 1 X var cased( F 'F r+ 8 $|!* ! ! F $|!'rkk 8! Put down the formula in the cell=(1/(1+EXP(-(+ r)))) ! 6  ! $|( 6' Other possibilities to EXP or NORMDISTdSomething is wrong. This algorithm uses the cell value in B2: if NORMDIST is in the formula, it's Probit; if EXP is present, it's Logit. Neither could be found. The algorithm will quit now.A@ A@r?|?k? Put down the chart Minimize screen flicker "( B@  (9 !  ! L$%| !  ! L$%| L$%v  B@  L B@ 9Predicted Probability5!(d  7( !  7!!(d  7(9q > ! t%! t!! t%( ! t% ! t!! t%( "(- Select a cell that shows the table and graph ! ! t%|B@HThe predicted probability table holds the other X variables, including any 0/1 X variables, constant at their means. You can easily modify the table to create cases for your dummy X variables by entering a 0 or 1 for the Average value of the dummy X variable. &Important Dummy X Variable Information$' Pred Prob Ifk; A last messageAnalysis is complete. Note that no formatting has been applied to cells. You should display the results clearly, rounding numbers or using scientific notation as needed.A@ Put away the form A@r Error handling: !FAn error occurred during calculation because a cell formula contained d2 characters (max allowed is 1018). One way to cut down on the number of characters is to rename the data sheet with a shorter name (e.g., Rep instead of Replication). If you have many X variables, try a single letter sheet name. After getting the SEs, you can rename the sheet back to its original name.  Error Warning$' A@r|8k8 ! !An error occurred during calculation, but it is unclear how serious it is. Check your output carefully. To see the error, launch Visual Basic and remove the On Error Resume Next statement at the beginning of this procedure, then run Estimated SE analysis again.  Error Warning$' A@r|7k7ox7p7иAttribute VB_Name = "OptionsForm" Bas0{6B4BD7DB-DA8F-49A8-8260-7CC0DC33D575}{D7B2ECE1-233J322-A688-79697A4D50% dGlobal!SpacoFalse CreatablPre declaIdTru BExpose0TemplateDerivCustomizD' General Comments ' This work depends on co3ic4d sng mani,pu=.Run tierrors j likely to @be caudby unforeseen, subtchanges in n;f variYnd other object sBIesti ng, 3chB (whi@have@en fixed) were:+1) A@ sheet with a s ssuas Do (2) hcell ref@n|''!$ A$3. @Ne aktroph@2;run-E.(A dAs hard:luC?8 of < *C5conflict{-  coefpficirQanalyst:3>B3 or$ md X]s `means}s@R@Hed d0igitrow (e.g., !10) aka loop bon 5 (@}A8 + `=CBg'Although tv8Aous %s,   uncleaHr hun_rsalMflex iantAYcode iE PdX Sub^Button1_"C@*k()Dim I As Integer !J.K.myNumC01ObsALastC_ColStartManxEnd Kk#myXA rray( As vSz%SM`Act ,XV0NrS3ch Po!2R3Res0Lef:toCd RighMidd1New0 DF%PXbOn eTermZe$ro3AvgecO!Pro GAxaB my>= .Makere you'u DIR("A1").SelAmBtœnumbf3c 8= 4 To 50*ep 2 @If Appp;a.WPkFALIs8P(C[sh(I,`G)tvZnssW;= 0JE3}Go@=Donqd17 If Next / @@G 2A 10w k a 3~) A F = N RePfC1a sOS' EPymₘ SE`Ch .roxSECheckBox.Va`p pp!Msg@(pr!t:="WSEs (us p$c`dA!vuf NNLSi@*cedc{requi 4samp>sizes}smf Pperti`not g0hknown." & Chr(1 w"ThlgorPm assum1`Sol;†fo6ut4o` solu2- 8u wU n!!pgXinncpmn AA.", _c&Tips:=vbOKCza`l08 +hBep3UnlopM ExySub  0/Put dP=trix?myo726AIF~'s NLLS$<1, P7M"=C27o)J&I32 * (I - 825)P & "y>J);0Smyjo + p=0d(@J .mp*, 0JanalyticaliFirstintercept(27MIEDGO&*zi= OOLef^t5v%s2V1^-WW`2ICIf I <LastChangeCol` Then$m:yg2hk, 8"+"2Elsq1'))'nd DIf PNewMxid(^Lhen()t-7IC\J"=AAmJ=*A@(.'FillXArray flater uLmy(J@#@y6)Next J " I C' Or possibilities to EXP NORMDIST kMsgBox "Somethis wrong. algorithnmA*clue in B2: if E @9åit's Probit; # present, Logdit@Ne@Fcould beJHund#e G#wSquit now.@UnloaHd MExS|ub@9EGfoon of co ma@x, see JHudg GtartMbf=8h+ 2EndS +NumCoef; J"SecoPial"s!lnL` Raxd_2" \ >2``Ga))).Cl`ContM1s!%$ MN1I c\AEi! [M, I1"PI #J )u).V*aO=M26J* 1 uq)$Æw, "!iShe= ᙊ@ ca ' CheckA}Wre s`zle qXuotss nam \e^'") > ~0P5d@@, $!2Ȩ 'Var+S,@Vb1AA %O* vser.393 5(+*,B "^^M19g9LE/$8Bl8CO EE!4)31 9F` GCAbcq= "=-MINVERSEp(R2Ct?:~RM1x4ia)bS ' Put` downr` hu|ltPO6`Esti`ed ZficiQ aXXSEsO51R53@JQ}311")@1/- 3s(4, Sqr$a:h5p27u&q%%OADτNLLSфMLC~ |10~H  t@Predicted4LikelihoRoMLtpnЎcannot1rea PQCP%dH$ bay T O@ptions!.. !bZ0lTrDs)awQ " IHid 5P+peT(prompt:="u& b3 1 Xa raqvssQra pc r are calqhold*ao rПclud02Xs air means."07Chr(1-`.&i";assumiSolv0ha! 9omal soluA.", _c2TitleA:Graph`Butt:=vbOKCan'/ ?ЏWexo1w`d`d Dim@EpAs RUYP+se0: SPmy= Applic".InpDut@"("C0k Pa|R3|cPmn A w genousKA !~ (10cPTL number)y !! r7?K$ 61pful, shUa@ntinu "CQan 4 3 *G,h`T, 8'cR--0mus3>D YWorkFunc%Is0|#9ZTrue Then MsgBox "You clicked on a cell that contains4e0efficient valitself. Pleas@NAME ofNexogenousLriable."GoTo ChooseExo: End If ' G et myVar asstring DimS As  3 = Mid( .Formula, 2)  1the laPbelsWo rj Zs5OELI()7IfFNumCoef =d 2ReU 1 z1AmyB)""No CXsElse R +myE-9I@0 > J55 + D  *@.Step 2Cf5Cs(J@, 1).VB=]DǗ2' skip{iRne since it'@OA2 for „PrProb t7A.1*INKIAK*DĒNext JǖI~equati from'first ob!DEmySearch"$A($4+6DmyHPosZIn(1, 'IC ,0,123BT0S#*)$?'#$yCaXy'hv ohvT',Q- : #8!ǬC ÂRowL@5\Address` & "* 9my Cg7 X "+3FA g /p0Fa[La ]1E3 > E%+?2! 3 3'{x B啅 ǡ?Kpintercept a@ @ `m`z'Rů"iR.eI5`,,M@6IMM#Ø!=Te!.,Q M = @^dyP1)+ Len0dZ aLoop`o separateTFuQ`s pie cePC*Individualwepu(v-qpY R7p-rs4f5JH,@CGBe9Qk9@ A=)D XmyofJQu eC"25>/' Cutp"dК pl`sigoxoo_Z 0iV#VonAl)hroughu7/2 A%2cc )eq?By/&"&/ ( !a' Nė Z _   k?Gk.i7I>]lOngOo4O+O60 Oi IzQOngY %b-߃ut9O sd If If myNumCoef = 2 Then GoTo Results:' Strip off the intercept and Exo Var &ms QDimOVr:8Last AsngHmy = Mid(myX1qng, 5)-Search"+" & `Cells2f.Row + 1, 1).AddrHess!"*'mFyPPos#In)(G,a :D[ D!3-I'Eomy+ 8Lene 99 ' Loop to separateo e0varspieceIndividual >$()eRe 1 #nj- 2@(For JRn>aL2oEPq¾0o$ACcK)A E'myWXJ)ǀ)Y~2 -@$@T' Cutzleading plus signnE*" ,7 iIEK o f< N next lRhroughL%41)b12&c&cficient value)lg %= H'myu"= A5N.JGe@t whero p Smy7 range Application.InBox( _prompt:\=""Ooc@ wa*@bPredicted Probability @table.!C`hr(13='"You may movaOdialog box if it R" @way.",Type:=8#!#P@ down`titleVmatth "!pIColumn).VF&"T" With&_ B FontC.o.Siz41&2horDex@3Bold@%yqa ti8culQ/_, all includI1 aShe4constE!Ma2wir s~.$!!_ C>.ItaW:(aesA?54SDs aR o5 OP <11&{ u I$O(I`6) / Out`gi?H ++e+B669)) /)St0DevPP& * (6`@=3plp&uy%unNe`,IF !vC`rLogi#' it'sx`_6?2).m2, "NORMDIST") > 尟_#P?_s! )$R' RR A siP6C(6"$A$4p#_N`^XotKK 0c5=a5@$pL *@Step)J21@OneES5J $P 4myoutputrange.Column + 1).Address Else4PIf myNumCoef = 2 Then DL' Do nothing -- it's the 1 X var ca YkH 0W/Z.VPaluet"wi cted yab ility* 7 I1 To 11U<Tp pAstrirstBintercep7oDaL$A$4'l NXD¤0C!J!5!5d(- 2) *Step 2 7RCFJ;myExo.CՀdOne Var 1 ]@9c`.+ w7s  5V&" du-l@(1/(1+@|(z-ш)@fgOfr possiIwieo  or Ë MsgBox "SomeCis wrong. algorithm usA a@!B2: ifo& dD,Úip`1Y"a+_Z5).etLeft$`2S*).Aqo=h=#"BSel& a Nthat show#tab%a graph "_Q). apons*cY("0 ed #hold# +0Si sPUncludany ,0/ctant 0cir meansVYoun easily modifySto Pp/%2sZr r `dummyS hby ^e0 !h1 Averagedof"=.", vbIndX@Impor Dp ")Q_g%~' A las2tssqAn0alysPj co@mpleteNotep 0no m`]!hasjcaacA #ldisplaults cleharlDrnn@umbersu"ssci`if,ic!b nepededo naw Xq1Errh+l 0rHer: v .0`67DpB= U*A"a occurducalc0!tca5' P(ta@qd ""Len r{ "(e@.g., R@instepAP0 have m!78es, try a single letter sheet name. AfHgd the SEyou can reN.lback to its original", vbCritical, "Error WarnY ") Unload MeExit Sub End If If 8.Numb> 0 A<> 7 ThenAmyorNote = MsgBox( "An e~occurred d urpMculation, butc is unclear how serious Chey@r outpcarefullyiToe8, la&h VisuBasic aaremovOnrResume Next stateme nt at'bec ofSprocede쀀 ru$stim d܀3alysagain.d9d giSheet2ADDVModule~K__SRP_7 Q__SRP_6d820-0000-0000-C000-000000000046}@(%H@0}IxAttribute VB_Name = "She@et2" Bast0{00020820- C$0046} |Global!SpacFalse dCreatablPre declaIdTru BExposeTemplateDeriv$Bustom izD2rU~| 16 Y|K``:d%tx$ Xx @t $Q`[TX\$ X\ @X 8) xt\TX $ (|$ $xt`\XT0 `  0   0 Applications Extensibility 5.3*#1b*\R1*#f1$*\Rffff*1`49d07e96)  2 P ` 6x 4      8( `     ( > H P h   $    @ "X      2"*`  ,P 4  > 8 "H" px $ ` p  2 :"  D`x   & ( 4( `   (  & * @  X 0x : @ ( d@ 0 , ,  8 H h (  @ ( 6@  x     N  ^    "@RPh   & >(Xh  ..  (0`X  t8   ($(@ h  0< >Pbh 0 ,,0 ` p (  ">X6p   N (8@ P   B0x|   &  >HV  .. @ (P`x 0 8rX   ((&8*`   0: @8vd Ą"PPxME\@"0v<6  tant@@ tad @B  U@D Rica@F @H @J @L 6-28`N int@P @R mics`Te$1@V e, I@X  E`Zash. ` v ` |@P  f@R hing@T  D@\ 199@^ Ex@` p@b `d ` @ d@6  `8 ` @ @6  I`8 ` @ the@6 Inte`8 `  h `J 00`8zR `x ` \)/(( 0 `   `"X#  .`#.# # (#`# X$x$$$ $r$ P% X%h% (%%$%(% & & 0@&<p& >&&b' 0p' ,',' ( (0( (H(p( "(>((6) H) X) `)Nx) )))) *  *B*+|0+ +  &+ >+V(,  .,., ,  (,`- x---- -p- h. p. . P0 h0 x0 0" 0 00 60" 02181@1 P1<X11 1 1*142&H26p2&2 2 2X3X3 " `3h3(3 3 333 x4 4  44 " 44 (4 4 5(5@5lX5 5x5 `6 p6  66 " 66 (6 6 67~(7 7 7  77 " 777 8 8 08*P828 8 08 68 (9 " @9 H9`9h9p9 *x9"29 99K9 :;0:H: DX::$R:;;;;,S; 8(<`<<jh<Ts< T=X=`= Bh== = 8= >>p>P> X> p> >> 0>> ? " ?T?(@ " 0@ 8@X@ <`@"<@J@@@ @ <A"<HA2_pAAA A $AA A $B `(B(aBB BB " B .BC 0CK8C $XC TC &C ND JPD DD D 5D DJ D 8E@E,HE b`EE (EE  E E  E J E  (F '0F]@F `F hF3xF 0G8G@G  *HG xG 2GNG G DHPH XH<`pH &H $H *H I(I0I 8IPI@`XI &I $I *I JJJ  J8J:`@J &J $J *J JJK K 6 KXK6``K *K KK KLz+LLL @LZ+L8N @N " HNPN`N " hN pN DN BN BO `OO @OO  OOOP " PHP  PP0`P @PP P @P 4 QXQ`Q pQ DOCUMENTATIONO, This add-in does a Dummy Dependent Variable analysis User Input0 It is assumed that the user has a 0/1 dependent. variable in a column and X data in contiguous columns AUTHOR Humberto Barreto1 Written during 1998/99 Visiting Professor at UCR Profesor Visitanteused Facultad de Economia Universidad de Costa Rica San Jose, CR" email: hbarreto@cariari.ucr.ac.cr7 phone: 011-506-283-5978 (when calling internationally)ns Dept.of Economics Wabash College$1 Crawfordsville, IN 47933 E -mail: barretoh@wabash.edued o phone: (765) 361-6315clea FAX: (765) 361-6277 this 9 This work was financially supported by the Wabash Center for Theology and Teaching.h DATE April 1999] `Excel 2003 workaroundp+must remove solver reference before closing solver ! %" ! !"B@$&AddIns.Add("solver").Installed = False-AddIns.Add("solver add-in").Installed = False B@&o07 Run the Dummy Dep Var Analysis by executing this macro2 It will bring up a form which enables the user to input necessary information`A@ Show an informational messageaThe Dummy Dependent Variable Analysis assumes a 0/1 dependent variable (Y) and independent variables (X) in contiguous columns. No missing values are allowed. Copy the data sheet and delete all observations (i.e., the entire row) with missing values in Y or included X variables before proceeding. You may choose from a variety of estimation methods.-Dummy Dependent Variable Analysis Assumptions $'* * , .B@0kxop+ This macro takes user inputted information4 and estimates Probit NLLS or ML or Logit NLLS or MLA@8]0H`x ]8Ph] Speed up "( Get number of observations, NObs 4!! ':"Get number of X variables, NumXVar 4! !'F. Use IF statements to decide which of the four estimation methods to do ProbitNLLS .!\!! Insert new worksheet for results `!.^ ProbitNLLS !  ^( ProbitNLLS ! $B@H Formatting h d t%%b(f*Put down objective function and parametersSSR ProbitNLLS ! $,| Intercept ProbitNLLS ! $,| 6 F=j 6$4% 6  ProbitNLLS ! $%|() Keep track of parameters to be estimated% First the slopes added via this loop T$A$ 6 ,'T 6 Second the intercept$A$4, T'T! Finally strip off the last comma T T $'T Put down Predicted Values Predicted ProbitNLLS ! $,| 6 : +$a$4+$a$6*j 6 $4%'P F 'R < F R+$A$ < *j 6 <$4%'R <k P R'P =NORMDIST( P,0,1,1) 6  ProbitNLLS ! $%|( 6 Put down Squared Residuals Residual2 ProbitNLLS ! $,| ln ProbitNLLS ! $%|%!(p 6 :=(j 6 $6% - B 6 )^2 6  ProbitNLLS ! $%|(rs a 6to be Put down the objective functionn 8 Not needed here, but note: "" acts as " within a stringuc =Sum(C2:C : ) ProbitNLLS ! $%|(' Run Solver to get the min SSR solutionap $A$2tv TxA@r 2|A@z had" Add the additional options button$ !$ !$!~$!~ $!~ t!% Give characteristicss haShowOptionsForm9Analysis Options5(dp baq  Inform user it's donexed. .!!GSProbit NLLS estimation is complete. Additional estimation, if any, will now begin.A@jXkH ProbitML .!!! Insert new worksheet for results `!.^ProbitML !  ^((ProbitML ! $B@H Formatting h d t%%b(f*Put down objective function and parametersSum lnLProbitML ! $,| G InterceptProbitML ! $,| 6 F=j 6$4% 6 ProbitML ! $%|( 6) Keep track of parameters to be estimated% First the slopes added via this loopP Z$A$ 6 ,'Z 6imated Second the intercept$A$4, Z'ZEsti! Finally strip off the last comma Z Z $'Zhese S Put down Likelihood Valuese smal LikelihoodProbitML ! $,| 6 :thm as +$a$4+$a$6*j 6 $4%'Val F n be'X < FAA. X+$A$ < *j 6 <$4%'X <Hk V X'Vri=IF(j 6 $6% =1,NORMDIST( V,0,1,1),1-NORMDIST( V,0,1,1)) 6 ProbitML ! $%|( 6 > Put down Log Likelihood Ln LikelihoodProbitML ! $,| 6 :+($A=IF(B 6 =0,LN(1E-307),LN(B 6 )) 6 ProbitML ! $%|($ 6$ Put down the objective function 8 Not needed here, but note: "" acts as " within a string =Sum(C2:C : )ProbitML ! $%|(R2' Run Solver to get the min SSR solution $A$2tv ZxA@r|A@z " Add the additional options button$ !$ !$!~$!~ $!~ t!% Give characteristicsShowOptionsForm9Analysis Options5(dq Inform user it's done .!!GQProbit ML estimation is complete. Additional estimation, if any, will now begin.A@j!$k( LogitNLLS .!! I! Insert new worksheet for results `!.^ E LogitNLLS !  ^( LogitNLLS ! $B@Hted Formatting 8 h d t%%b(f*Put down objective function and parametersSSR LogitNLLS ! $,|R Intercept LogitNLLS ! $,| 6 F down =j 6$4% 6  LogitNLLS ! $%|($|) Keep track of parameters to be estimated% First the slopes added via this loop $A$ 6 ,')^2 6Z 8 Second the intercept$A$4, 'IF h! Finally strip off the last comma   $'iffere Put down Predicted Values Predicted LogitNLLS ! $,| 6 :ives +$a$4+$a$6*j 6 $4%'e F ' < FNORM +$A$ < *j 6 <$4%'' < 1-NOk  '8 =(1/(1+EXP(-( )))) 6  LogitNLLS ! $%|( 6 R  Put down Squared Residuals,0,1 Residual2 LogitNLLS ! $,| ln LogitNLLS ! $%|%!(p)/( 6 :'l =IF(ISERR(B 6 )=TRUE, j 6 $6%,(j 6 $6% - B 6 )^2) 6  LogitNLLS ! $%|(1 6+H Put down the objective function X8 Not needed here, but note: "" acts as " within a string| =Sum(C2:C : ) LogitNLLS ! $%|(' Run Solver to get the min SSR solution| $A$2tv xA@r|A@z" Add the additional options button$ !$ !$!~$!~ $!~ t!% Give characteristics ShowOptionsForm9Analysis Options5(dr usqH Inform user it's done .!!GRLogit NLLS estimation is complete. Additional estimation, if any, will now begin.A@jalytick LogitML F .!!! Insert new worksheet for results `!.^>LogitML !  ^($|LogitML ! $B@H Formatting'T h d t%%b(f*Put down objective function and parametersSum lnLLogitML ! $,|yXAr InterceptLogitML ! $,| 6 F the X=j 6$4% 6 LogitML ! $%|( 8) Keep track of parameters to be estimated% First the slopes added via this loop$| $A$ 6 ,'8 6 Second the intercept8$A$4, ''T! Finally strip off the last comma   $' $ Put down Likelihood Values 8 LikelihoodLogitML ! $,|8 6 :H +$a$4+$a$6*j 6 $4%'ti F NOR' < Fing is +$A$ < *j 6 <$4%'la <bit; ik   ' L=IF(j 6 $6%=1,(1/(1+EXP(-( )))),1-(1/(1+EXP(-( ))))) 6 LogitML ! $%|(B 6  Put down Log Likelihood l Ln LikelihoodLogitML ! $,|vB@ 6 : >=IF(B 6 =0,LN(1E-307),LN(B 6 )) 6 LogitML ! $%|( 6 $ Put down the objective function|8 Not needed here, but note: "" acts as " within a string =Sum(C2:C : )LogitML ! $%|(t ' Run Solver to get the min SSR solution $A$2tv xA@r|A@z $" Add the additional options button$ !$ !$!~$!~ $!~ t!% Give characteristicsShowOptionsForm9Analysis Options5(d matq( Inform user it's done .!!GPLogit ML estimation is complete. Additional estimation, if any, will now begin.A@jk Inform user about Solver  .!!GExcel's Solver, like any numerical optimization algorithm, does not always work perfectly. You should check the estimates for intuitive plausibility and change the endogenous variable cells to check the solution. $ $If #NUM or other Solver problems arise, try changing the coefficient (changing) cells and running Solver (Tools; Solver) again. Solver CaveatA@jbj Update displayin "(errorso Shows the Options Form 1 2B@0h a spo@0 Not used but useful in string manipulation workap]H`xet had'< < '@f '6 6  $|Change 6+|lysi'8+$A$ 6 'P 8$|! P'R 8$|! R $'\ and a($A$ 6  + 0.00000001)'^Z A R 8$|! P'T i 8$|! R T R  $'b 8$|! T $'` \ ^ b ^ `'d dA@P=( 8$|!$ -  d )/0.00000001 8 6$|(o ]H`x$|!$|$vB@ P sheet 6 M 8 the s   8 $|!  6Data$%|! 6 8 $|! 6 8 $|( 8'< 6~F oP ]$| !$|$vB@ PXiXiPrimeMatrix 6H 8 <  6Data$%|!  8Data$%|! 6 8 $|(eric Second Derivative Matrix  $|! 6 8 $|! 6 8 $|! 6 8 $|( 8e algo 6mes So ound toh ]Xption0$|2$|$vB@ PSEs 6 8A@r  +$|!  8Data$%|! 6 8/ $|! 6 8/ $|(ic 8 6 6  o '8NORMDIST'P 8$|! P'R))))'P 6 8$|! P'T 8$|! R T R $'^ =-( ^)))/((1+ ^)))^2)'d+ 0.00o@) ****************************************/ This macro adds a menu item so the DummyDepVar macro can be run define variables] ]8'$ Make sure the Tools menu is visibleDWorksheet Menu Bar$,(!=MINcheck languageE(R2]P "!$$W),R2Thanks to John Talyor @ ( "%&|Tools'  =it's not English, try to get the word for Tools from the users andXThe language of this installation of Excel does not appear to be EnglishUS. Please enter the word that Excel is using for Tools on the main menu across the top of the screen. For example, in Spanish, it is Herramientas.Get the word for TOOLS Herramientas "%*' $|k(d Tools' k Worksheet Menu Bar$,%.(1 Check to see if there is a DummyDepVar menu item' 8 Worksheet Menu Bar$,%.!.! 8 Worksheet Menu Bar$,%.%.!DummyDepVar Analysis ...MMeans the DummyDepVar menu item is already there, make DummyDepVarIsHere True'd;Means the DummyDepVar menu item is not there, so do nothingkH 8+|1 Add the DummyDepVar menu item if it is not there 'R l Worksheet Menu Bar$,%.!.%.$  ShowDDVForm9DummyDepVar Analysis ...9qhk`* Message to the user when add-in is loadedJYou have successfully loaded the Dummy Dependent Variable Analysis add-in. $ $&You may access the macro by executing  : DummyDepVar Analysis ... !Dummy Dependent Variable Analysis$'Inteo8hDummyDepVar Analysis ...ToolsWorksheet Menu Bar$,%.%.B@0o? Check Solver Reference]6 Check all of the references to see if any are missing 6 ! !"! 6 ! %"!$Fk? 65 Check all of the references to see if any are Solver 6 ! !"! 6 ! %"!Solver  FkH> 6 Run AddSolverReference macroA@|> Remove the missing referenceZ Must be done outside of loop so that .Count in Missing loop (last ref checked) is correct$ 6 ! %" ! !"B@$F@=o8=' Attempt to add Solver programmaticallyF* Check to see if this is Excel for Windows "!$$W Add the Solver.xla referenceM 9/2003 addition to catch XP version of Solver that is called simply "Solver" 10/2003 fix End With code errorG 5/2007 workaround to removal of Application.FileSearch from Excel 2007C Must add "Public FileSearch As New CLRFileSearch" to top of moduleFind Solver or Solver.xla C@ "!99 Solver*.*91 this does catch plain "solver" with no extensionC@q: !!  % ! !"B@dx:"expand the search before giving up C@C:\99 Solver*.*9$1 this does catch plain "solver" with no extensionC@5! 7 ! !"B@d9 Giving upSolver cannot be found. It must be installed from the Office CD in order for the Comparative Statics Wizard to function properly. Fatal Error: Solver Not FoundA@k8q8k8# Save the add-in with the referenceThisWorkbook.Save, Check to see if this is Excel for Macintosh "!$$Me Add the Solver reference> Mac doesn't support directory search so let's take four shots7 First attempt "!:Office:Excel Add-ins:Solver ! !"B@if successful save and exit sub # Save the add-in with the reference B@&|6k6Second attempt' "! :Office:Excel Add-ins:Solver.xla ! !"B@if successful save and exit sub # Save the add-in with the reference B@&|5k5 Third attempt' "!:Office:Add-ins:Solver.xla ! !"B@if successful save and exit sub # Save the add-in with the reference B@&|5k4Fourth attempt0last chance if can't find it, go to ErrorHandler4 "!:Office:Add-ins:Solver ! !"B@# Save the add-in with the reference B@&| 4 Neither Win nor Macd3oThis machine seems to be neither Windows nor Mac. Macros that rely on Solver may have to be manually adjusted.A@kp3|h39 Handling the error when the Solver add-in can't be foundKThe Solver reference cannot be found. You will have to manually add this reference. Launch the Visual Basic Editor from Excel, then execute Tools: References. Click the Browse button, navigate to the Solver add-in and open it. Make sure it is checked in the available references list. Then delete the auto_close sub in Module1.A@|1o1@ "!$A@o1sample code from>http://support.microsoft.com/default.aspx?scid=kb;EN-US;141571;I added Resume Next at the end to see how Resume Next works;It works as advertised it goes to the next line in the code where the error occurred]9 Run the Error handler "ErrHandler" when an error occurs.00B:A@B:\A@: B:\XLFilesA@: Book1.xls B@ Disable the error handler./ .The destination workbook is !A@: Exit the macro so that the error handler is not executed.|(/ /9 If an error occurs, display a message and end the macro.*An error has occurred. The macro will end.A@.o..~Attribute VB_Name = "DDVModule" ' DOCUMENTATION@This add-in doe Dummy Dependent Variable\analy sis User InputIt Kssumed thate u$haY`0/1 dW2vZ }a column and @X datacontiguou s'"~AUTHORGHumberto Barreto  Writteluring 1998/99 VisitProfessor UUC% ant{Fac ultad_ E!Iomia0Universid CosZRicSan Jose , -emai l: hbS@cri.ucr. ac.crphone: 011-506-283-5978 (wBhfcall^iMrnatio8ly)mt.ofE)cMWabash Colleg4Crawf@ordsvi, IN 4793b3DE -C**h@w.eduA((765) 361-6315 FAX: 277ABwork wfinanci2y supportby+@eBD@* Th@eology‡TPeach@A.DATEApri lz9APublic FileSearch As New CLRA 'Excel 2003 )@around@must remove sol|@ference be'e clos# Sub@ auto_e(@gOn ErrReA!xt AEWEbook.VB@ject.Res ("&"!AAddIns.. t.,= FalsA")Sav@Eu(q0Run8&a Ad ety estim@0thods.", Titl^e`-K ,A,pAsButt6:=vbOKCel`eA:If :n aG.D_If^H`'Z tak/"UiAinS'B/@bit NLLS)MLLogjcZEF#(ByV`TSelXRange @Ni, Y`Cal mamDim@ NObs,@%t:IRJla stRowd, NumXP,@nrt!C|P} Ipkga]Yamy#SЋn~g@Izqma8ramA ɉMLoalPGe)Q' Sp+ up A ppe).ScreenUp5`-0UDG5n,y5s@ q .@s.Cgt - 1>(5vPy~um0`  IF 0temGrJ@ & "$A$ 4@)",ANext I0EeeWe4,?2eFPllPpfr|\mmP OBLeft(, Len{V)K4/Pr 1capA.o/$0@<)..2) <t{*U ro +$a$24A6*6X(I?`25((pOp >> 2lLSG A 626Upmy~öLLSString = myAdditionalProbitN& "+$A$" & 4 + 2 * intI8"*(SelXR@ange(I<1,:).ress(Exter:=True) Next/End If|myKSheets("<^ .Count^).Cellse2).Formula"=NORMDIST(N,0,1,1,)":oI ' Put down Squared Residpuals+R36)L"2;0#.C haracjs(Start:=9, Length:=1Ant.Superscri @W1_) 5=0a5_X)do, 5at4& QS?FF/&IFϣA;=1,* ",1-'A_ 3og~ .%//2Lnx3?99 =`۶=0,LN(1E-307))QrG%p@p6 ! a^@J:yhgt#z' Add the additional op@s button With ActiveSheet.B`s.(Columns(4).Left , 0, &Width, Rows(1).Height + 2 B3) ' Gt characteristics.Onon = "ShowOForm ""C8s.Text)Aysi s .End q ' Inf user it's done If DDV..NoMessageCheckBox.Value.False Then Msg "Probit ML e)^ma ?complete. , if any, will now bepgin.Xn 2 ^If]^LogitNLLS X TTrWS<@;t new wo(rksAy A r esult@\Se`t New:WE  .Na mB"" & B s.Coun~(1 C( ).Select(^atting  Borders(xlEdgeBom).W= xlMediDumPutuw`n objfun@@a@pmgrĚ+CelBl, 1)H"XSSRkj3EIncept{ @ I1 To NumXVar2 * IEa .+ula="6elXRange(1, I)!}a@As(Ex h:=!Ht!' Keep ttk of '( to W_ed' Firstslopesed viaCdloopmyP2FKStrA`& "$A$M4Q",)N!I ' Seco ?Ai.c 4, SE Fi &Ply sp#f"la@ma (3 , Lent) -P]&^Pr``d \v).\2\f SLOb Cmy6" +$a$46*(}NI5O@Oa > b`)#`pD7!l?l2lmy R+R" _pbZg 0?& e6Fo^"~iF(1/(1+EXP(-(34):-Squa@- Residux/ "q"&mh(-3"-E2T +G(Start:=9r:gth:=Font.SupjcripQTS '^*449IF(ISEpRR(B20")=TRUE, elY_$ .O8e),;OLetMLEWlO4OOt.OOOoO@d(3 4 o"aA lnL (?t?9O,0-O L +@ 2 * I, 1).Formula = "=" & SelXRange(1, I).Address(External:=Tru e) ' Keep track of parameXs to be est@imated fFirst the slopes added viais loo"p/myPULogitMLString& "$A$4 +","NNex(t I'vco$ndCinYcept 9-4,.+Fily *sTpf0laAycomma1Left(., LDen ) -  ' Put down Likelihood @Values;Sheets("S3.Count@MCells<2)Q I@1 To NO&bmy j"+$a$46*IAIf NumXVar > hen3 myitio_N - /@|A02B0C  +LB@A A$B +EIfO_}M&WJCDD72 IF(~ idogdd3dmxd_,M,3N,Ba,"+'0,LN(1E`-307)A)>!objective funo@l' Not neehere, buote: "" acts " wit hin ang ))2.Sum(C2:C!a9Run S olvergeCmSSR sHolu cOJkt!:=2", _MaxhMin:QByChA:=#  userfinishC Badd opUAsa*t-W( A0D.Buts!(C mns(4)., 0, hWidth , Row@).Heigh`t %|' GTchvcpi{ct].On1 on``ShowOc .m..@@s.TePv AXys|J1jInf it'skne ^DDV!.NoMageCheckBo x.lpFalse Tp` MsgŐ #m MLE`& @wpl0.  'b8, if any, ,ll nowgin.? &uV ab.o1# s =  ' prompt@)Excel1#, l| numerical!r#miza# algor#m,Дn;always work p)=lyYou should Nc!)Es  eu)`@plausibility!03ndogenous variable ` Nl7."4& Chr(1S"@#NUM or oHr=P"m@FrisGtry `QQKcoe@fficie(%+ng)and runn (Tools;) agaF@`TitlePC aveat ' Upd disy ApplQ.Screen= q.q#Sub1p4`hhe 1 .Iub 5(921! ZSZGd Y1fulX manip"1!FtDimPSearch,PosdYxCerRF MiddlmyNew As `umC``;2LCUK@06A77ƨ,I)2 (I25)ᯱcaSJ4;my @s™`In@ cJ, ǎYB(a`1As"(4 h0.01pios2C +  +4 52@- 4B"z$=(nmyQT XU&)f5§ @ax')./@(8:S=MLCoRMaxu7M, J2I@ger c 731)~"4, 33)).Cl:$Cont@z  M`o 8014!q4"3c1J = 1 To 3 Cells(I + 1, J30).ValuepRMp26J8* Sheets("Data").!V2, IL+ .Next J I  M End S ub AnotherTry() Dim MhAs Integer+Range(v31),9, 33)UlearConts FoHr M80 'XiXiPrimeMatrixI"ā' SecoDerivatiXve \6O{-L{7z x,xFirstOrder*x48x{50&xns1+s4G=DM43M_yFҐlPSn`gFindAP2 mySchW"NORMD0IST" CmyHPos`In(@C>J, 2)."mula, K pJo ) 2 Sj Ceur M|id{`2 -jNew =-(" &$ & "`/((1+^2) *" ' This macro adds a menu item so  DummyDPepVa'can be runa Public AddHM I ?' define variable@J !IsHere!Boo= FalseMake svuT@s visi CommandBarWorks  VC;TruC check luags@Amy# @#9 If Left(App"ation.Oper  ngSys!, D1) "W"@0e`'Thanks to John Talyo.` rnB al(xlNonEnglishFunc! s) <> A$ i= "G@'it's A, tryget?word fcfromtusE- +putBox("Thef& of``Ninstall AExcel doe3 app BP& US. P 8se 7B that usi$ng on e main-.s1p top# #cr@een. Wexample, a0Spant (rami as.", "GOOLS4, 2 @If;o7E**rop(_+ C+ &see i50 aY>'@@?86av  nt 5 .Count_.0lCap_q05B5s...E7+1'Me 0GeniGoFd:End IJf NW I  ' Run A dd@p macro Exit Sub emove the missing r0Must be done outsidf lo op soat in M!1(la' checked) is corr R=:Rse W!W > ZV=M()Asav' ?piE!'Second o`.|b{+W! 'P8/ A:____/;<:ׯ&- Dr"f'bch^aq@P5fit, g@oH߿`3dv33/q/]ILNeer0Yn nD–}ua YhipmDon!5. aILro`reonKmay hWa2manuj@fed.0ekф whenb/DA\l0 s: w ?UoYoullF  plM 67La`mh2 Vis Basic Edit ',1n@ ols:  JCkBr e button, navigat; p)hV dlSopit0_sur=tczqavailableW s lisT decauto _closPubM"12(TO&S oPs~t1D/LMy *roM() 'sample code fromhttp://support.microsoft.com/default.aspx?scid=kb;EN-US;141571I added Resume Next at the end to s@ee how !works=t   asGvertisLit go,es=HnTline inY=@ wherekrror occurred Dim MyWlbook As  ' Ru*E!handlPer "H"4n an e3Ds. On G8oTo!1ChDrive "B,:" i2B:\ XLFiles [s.Open#g1.xl(' Disab/ fU0G(SetIJ= Act@,KTMsgBox "TwdestinationqXis " & .Name' LEx@wA(ma \soo, not executed0Sub][:If k, display a messagedè3#׆T;AE~h . AAC1will.DlHE„,  0   0   0   0   0   0   0 h  0   0   0 @  0        %rU $`$`8`$`$!`$I`$q`$`$`$ `$ `$9 `$a `$ `$`nrU  DDVFormCLRFileSearchU__SRP_5 oH__SRP_4mmandButton1_C+k() On Erro@r GoToHler: ' The user has inpdt cell rIs vi a | dialog boxPPassifation to EstimCmacro HF=:=@, <<' Cl@dDurbin-0WatsA Unload MrExitF @=MsgBox prompt:="Ex@; enc ounte an eM. Pletry again, checking cAfullyA;make sure youSve@ CNYd X d corre ctb sel#]at t onHNethod.", _ Title.O8I@nd@P2' GetBVA's Y+(zI!AHide )Dso#Kc`)se6e Jssheet . O of  Tacc obj & -- at'swh'!-Typ`#8 iChoos@5Y]SLcI ~AppdS.I_B(e,C"" t!contB0/1&ei@pr by;E mL wmo, stypi`fn." & Chr(13)*"YL@may moLth o'r if _q way)G# a&MfV` fir@st row@' not a number IfB %Work7Func}.IsNB((,(1, 1).Value)!nXp"aCwt~=Z+/>`/>4G.>X7'\>g">r > $>?>w>s>O>>>P> >>ue>">{>Ho@$>>(s) ?>?>ls?>?@V1"9>O{|n'tpUn 20 {Var;5b=.Columnsp0 >pMZ phe few.K Ak 1<_$Sb@Sq aic$epuimum5ASl3E IB2 Row Y=+q E(I] Next I2b5S`y -`"r.T]d-@gc3 1o repTenÉ.ansjneмbdcre-e Rdon1W&em^veOFƐXbtcc2.`qccFeaWaa#aa   ebugging - 3=full, 2=some 1=a little, 0=noJ ------------------------------------------------------------------------- Object model:nf Methods:D Execute - actually run search (returns Boolean which is always true8B unless deletes were requested which failed). If deletesC were requested, the list returned from the actual search has no members. NewSearch - clear it Properties:+ Lookin (string) - directory to search from0 Sort (boolean) - whether or not to sort resultsJ IncludeDirs (boolean) - include directories with results (not just files)& FoundFiles (collection) - the results& SearchSubFolders (boolean) - recurse?: DeleteFiles (boolean) - delete files as search progresses> DeleteFolders (boolean) - delete folders as search progresses celJ --------------------------------------------------------     Rb+ !"#$%&'()*,-./0123456789:;<=>?@BCDEFOHIJKLMNAPQScUVWXY[\]^_`aThdefgijkmlnopqt"PPxMEPSPSSS  j*' 8 G[(CLRFileSearch) L  ->  j  G G[(CLRFileSearch) L  ->  jA$6'@o84 Run when an instance of the class is started - just! ( runs the clear procedure. CLR, 14/5/99.6New class instanceA@A@o Clear the search. CLR, 17/5/99.xo8c:\'!'''Cleared search criteriaA@''''o6 Run when the instance of the class is closed. I'm not T 100% sure about this part. Tx Kill off our results list.Fj.!Class termi  ) > "P\=;6D*=h8+3qVEhHK_2xVEhHK_2=;6DME$ SS S06"<(<<<< <,<0<4<8<<<N0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}j4 @jP8,@j<4 @jDH @% %bP @l ( AXh6J8XAi ,!h \Qi Ah6J` Vi . If,!xh Xdbi  `| p hi i ecto  8`vJtt x`vJh z `rJx,`rJ l i   `NX| i ! x D 6$ tx%`r$|`p`lript`jWhil` Xhar X`"f clud`$deld `&`erag`(^!`*\ !  @%bpH@bL@j(6$ @*x@<@jFP @HXxPxx(p8icte@ H`&}I*\R0*#1c$*\Rffff*1O49d07e3fTAQ  B h (  : P P h p  J H J  p     2 6 PH , , @ D8 P H H h 8p J <H FP  8 >H 4P "   . & B H8 H H F (X 'p 6    B 2  ( "  0 .8 &h ( ' 6     B  2 X ` >h "  @ B @ B @` Bp   : . " 8  @ ` h &p "      &    < "P" x "0 ,B  ( H h p  < 8"   4H Pp  ,x  8 : Xp 8x  <   8 &@h "p   <  (%   $Hpx  0 , ( @ H #h       4 4@ 2x   >7   ( 08@H  :P 8 &>) 8 >H > : 0,28  h x    H 88P X `x $   (0 <8 Jx L H J` H   6 H:SX"G  @0 @8 x Ng  Nu 08 Pg@    0 63 "0 X ")`  #  :3       ( 0 08 h  "=    @ D! P! p!x! %! !! D! @" @P" &" "("" "##&# 8#@#H#P#X# `#p# Code from Chris RaeF< Source: http://chrisrae.com/vba/routines/clrfilesearch.htmlg box May 9, 2007! By Chris Rae, 13/5/99 to 6/7/99.P3 Are we dnated, memory releasedA@o& The main run procedure. CLR, 13/5/99.!" Start recursing from the top dir.Executing searchA@R' A@ 'ip6 The recursive bit. Stolen from various other programs <1 I wrote with similar ends in mind. CLR, 13/5/99.. All of the files which match in the directory,0]x And the directories,1))]& The count of how many files there are(] And the directories down ]2 The string each filename is temporarily stored in]3 The loop to go through each entry and perform what  is necessary ]01 The loop to recurse through each directory entry]H5 The flag to say whether any actual changes were madeon  during the bubblesortnote]` The sort loopng]x The temporary swapping variablePr] Whether or not the file is' R a directoryhe min]5 If a copy failed then don't bother trying the delete|A@ in case we lose stuff.na] Searching: " "A@ Find the directories in here$' \*.* ,$~'char  .. .Anal ) This trap will catch if the file doesn't & exist at all (occasional problem withit M  NetWare volumes).  Check if it's a directory \ $0'(( ( ,LS Adding dir: A@  'sh @ `!  +gik 2 . - File wouldn't read - in this case it doesn'td - really matter because we're just finding the(f + directories. However, make sure it doesn'tSSR  think it's a directory.'(Skipping (error): " \ "A@  2  k ~' 4 Go ahead and read all of the filenames matching the1 given spec into the array. Similar code to above but there ain't much we can do.s ' \       $~'2  87 Check if it's a directory. Need to force the result of F8 the GetAttr to a boolean because otherwise it isn't andre4 the "Not" function gets all confused. Don't ask howLogitN) *!&"^%^! long this took me to work out.  \ $0 ,X,$4  'e @'  +FkX ~'HB Sort the names into alphabetical order. Using a bubblesort, which1 seems to be fast enough at least for the moment.   _'" $  $$ $ $ P These two need to be swappedResi $$'& $ $ $+$ & $ +'"k $! "k5 Create any directories necessary. This bit has to goR(BD before the file-handling section because, if directories need to be 6F created, they need to be created before we start trying to copy filestNLLB into them. Note the big lack of error-handling - the usual reasonD for directories not being created is because they're already there.hin a B What really matters is the file copies - if they fail, we have to be careful.(/ If we're copying stuff then make the directory t Creating dir    $A@itiona`    $A@4 !0k(  $9 Presume pleasantly that the copy (if one happens) worked'*: If we're copying the files then do that before the delete  Writing file  \ $  $A@io6  \ $  \ $  $A@8:6Failed copy to  \ $  $A@'*:`:XPkH) If we're deleting them all then go ahead  *PuRemoving file \ $A@Clearing attributesA@,< \ $A@> !DeletingA@ \ $A@@B8<0Failed delete on \ $A@'BBd * As we're not wiping the whole thing, just  add the files to the list \ $ B@kH : Okay, here's the recursive bit. We now have an array full= of the directory names from this particular path and we must cycle through these.    \ $A@ k8> If we're deleting stuff then zap the directory. Remember that: some files in it may have failed copies but that's okay -: if they failed the copy then the file hasn't been deleted so the rmdir won't work anyway. Deleting directory A@D A@FHDFailed remove on A@'HHkorAttribute VB_Name = "CLRFileSear ch" Bas0{FCFB3D2A-A0FA-1068-A738-08002B3371B5} |Global!SpacFalse dCreatablPre declaIdCExposeTemplat@eDerivCustomiz E' Code from Chris Ra`' Source: http://c rae.com/vba/routines/clr fs.html ' May 9, 2007 ' By1, 13/5/99 to 6/7.Option xlicit ' Are we debugging - 3=full0=so1=a little, 0=no #Const SHOWDEBUGV0C-?C:Objectd m@Ql:M@ethodsExec- actually run CL (returns Boolean which @balways truBd unlessCletes@FGrequest faed). If &weI , the@P@L#?-,Khas no members@p' N,ew@ic@4r q' PropertieFLoo@kin (snDg) dirTo@P C#E02?S_= 3QDFDZDQ(' Rn ipancCe of the class is started - just ' runsear procedure. CLR, 14/5/99. Private Sub C_Initialize () SDebug "Ne wnrnce"J#Sich EndN lCls7ublicCxLookIn = "c:\"ortFalseIncludeDirs Hl FoldeTr>ujPO criterialDeleteFi 0 h35= 0F1= I!p\*.*vbTJWh'45<>0 #1P`.." A K"?+:Q1!strap wAqcSOCs>essexr at aS(ocj0/%;@[MNetW`K volumes 1Opnrr&GoC`w.uNu' Check if it's''= GetAttr\u`(,iB%%?0IA+E0%%, ~3;Q#XR!+ 1RIm PYertpsrd1 UL 6}gZkIf;SkipFNT y:A1le would&!G?0,Res3 NexpqT| e) !CWS' Go ahqy21?%scA1\givspecQprpray 1codPy bovqbRT `muЇ^caa(3D >>,P82 66@80~40$4OW!̥'_Hi@A. c1e SQ'eIQa0o/"pwip0,iqXd-"pR" fge!conf04`Duask *!&"^У%^!0tn@Aok wor>k@uQ PQYOr  (CQ(V/le)iT)TQ ReDim Preserve FilesHere(1 TopCount) > B =` This XEnd IfBXDir.Wend ' Sort the names into alphabetical order. Using a bubb5, whichHseems =be fast enough at lefor4momentB.If (k > 1) AcJ0ThenDoAnyChangZ= FalseF7BV&= - 1 *GFˇ)L +XS#' two needGswapp.eb SFHm", ,98= % bTruLbA( Nex t YLoop Until N|otEzC' Create any dire ctori@necessary. bit hagĒ' be*e¥f-@dlEAsioncause, ifLs!c!d,y{e we sdtanry! @fcopy s prm.A big lack of@ error-1"usuvso9g' n"*be3is"'r%@)ldyrea$u' Wh`ylly matter)a .-A%@ aile.t. carefuld owe"astuffn k y`priC (<> ""nSDebug "D  " & & Mid(B as Hy, Len(@QkInb)`, 2WOn E0sume YMk_ N Go 0h#AddItem ~#'Dplant8tG: 5!7y ( \on5ns) worka,F@:_.'@ k7 bZ7doH(ndel*Hk %C`=r!Yributes", 3  S ܈SetAttrO,O4Gp y p Kill{ V-- -`-G 0~|+Okay+a* ?, :,'( AsXn0~wip AXwhols, jusXj' adT|QTliFd! s.Hi7ŸLS' , h 'Åyursi# . Wow3an arr}l vfXromstdole h%^*\G{00020430-;C 0046}#2.0#0#C:\WINDOWS\sys@tCLRFileSearch1T_VBA_PROJECTG dir__SRP_0Z2Boolean which is always trueB unless deletes were requested which failed). If deletesC were requested, the list returned from the actual search ->  has no members. NewSearch - clear itof t Properties:! + Lookin (string) - directory to search fromNew 0 Sort (boolean) - whether or not to sort resultsheJ IncludeDirs (boolean) - include directories with results (not just files)& FoundFiles (collection) - the results& SearchSubFolders (boolean) - recurse? of : DeleteFiles (boolean) - delete files as search progresses> DeleteFolders (boolean) - delete folders as search progressesJ -------------------------------------------------------------------------B The directory to look in. Set using the procedures. CLR, 13/5/99.]@HB The directory to copy to. Set using the procedures. CLR, 13/5/99.]@p2 Whether or not to sort the results. CLR, 13/5/99.] D Whether or not to include directories in the results. CLR, 17/5/99.] 5 The filename (well, spec) to look for. CLR, 17/5/99.] (? Whether or not to search through subdirectories. CLR, 17/5/99.] P The list of results.] 1 Whether or not to delete the files. CLR, 5/7/99.] x7 Whether or not to delete the directories. CLR, 5/7/99.] - Whether everything was in fact deleted okay.]@( Set the directory to look in. Tidies up trailing slashes. CLR, 5/7/99.< Giving a base directory with a trailing slash doesn't work.B This poses a little of a problem because you can't pass somethingB like "C:\" to it. So we just chop the slash. This, however, meansB that you can't give it "C:" to mean the current working directory@ on drive C - tough. You shouldn't write code like that anyways. $\   $'(Cutting trailing slash on directory nameA@k0 'm X+ Get the directory to look in. CLR, 5/7/99. 'm( Set the directory to copy to. Tidies up trailing slashes. CLR, 5/7/99. $\   $'(Cutting trailing slash on directory nameA@k 'm+ Get the directory to copy to. CLR, 5/7/99. 'm7 The routine to display debugging information. 24/5/99.x  G[(CLRFileSearch) L  ->  j  G[(CLRFileSearch) L  ->  j  G[(CLRFileSearch) L  ->  j@o84 Run when an instance of the class is started - just( runs the clear procedure. CLR, 14/5/99.New class instanceA@A@o Clear the search. CLR, 17/5/99.8c:\''''Cleared search criteriaA@'''o6 Run when the instance of the class is closed. I'm not 100% sure about this part.x Kill off our results list..!Class terminated, memory releasedA@o& The main run procedure. CLR, 13/5/99." Start recursing from the top dir.Executing searchA@' A@ 'ip6 The recursive bit. Stolen from * 2 ="PxME (SS S<N0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}j jPj j  %b l  AX8i O,!i s Bo A i. If,!xXi   ii ecto  8 x  , i  Xi  ````` `" `$`&`(`*   @%bpbj( *xj HXxPxx(p8h H}IAQ  B h (  : P P h p  J H J  p     2 6 PH , , @ D8 P H H h 8p J <H FP  8 >H 4P "  . & B H8 H H F X p 6    B 2  ( " 0 .8 &h   6    B 2 X ` >h "  @ B @ B @` Bp   : . "8  @ ` h &p "     &    < "P"x "0 ,B ( Hh p < 8"  4H Pp  ,x  8 : Xp 8x  <   8 &@h "p   <  (   $Hpx  0 , ( @ H h     4 4@ 2x   >   ( 08@H  :P 8 &> 8 >H > : 0,8 h x   H 88P X `x $ (0 <8 Jx L H J` H   6 H:X"  @0 @8 x N  N 08 P@    0 6 "0 X "`    :      ( 0 08 h  "    @ D! P!p!x! ! !! D! @" @P" &""("" "##&#8#@#H#P#X# `#p# Code from Chris Rae'< Source: http://chrisrae.com/vba/routines/clrfilesearch.html May 9, 2007! By Chris Rae, 13/5/99 to 6/7/99.P3 Are we debugging - 3=full, 2=some 1=a little, 0=noJ ------------------------------------------------------------------------- Object model: Methods:D Execute - actually run search (returns various other programs1 I wrote with similar ends in mind. CLR, 13/5/99.. All of the files which match in the directory,0]x And the directories,1))]& The count of how many files there are(] And the directories down ]2 The string each filename is temporarily stored in]3 The loop to go through each entry and perform what  is necessary ]01 The loop to recurse through each directory entry]H5 The flag to say whether any actual changes were madeon  during the bubblesortnote]` The sort loopng]x The temporary swapping variablePr] Whether or not the file is' R a directoryhe min]5 If a copy failed then don't bother trying the delete|A@ in case we lose stuff.na] Searching: " "A@ Find the directories in here$' \*.* ,$~'char  .. .Anal ) This trap will catch if the file doesn't & exist at all (occasional problem withit M  NetWare volumes).  Check if it's a directory \ $0'(( ( ,LS Adding dir: A@  'sh @ `!  +gik 2 . - File wouldn't read - in this case it doesn'td - really matter because we're just finding the(f + directories. However, make sure it doesn'tSSR  think it's a directory.'(Skipping (error): " \ "A@  2  k ~' 4 Go ahead and read all of the filenames matching the1 given spec into the array. Similar code to above but there ain't much we can do.s ' \       $~'2  87 Check if it's a directory. Need to force the result of F8 the GetAttr to a boolean because otherwise it isn't andre4 the "Not" function gets all confused. Don't ask howLogitN) *!&"^%^! long this took me to work out.  \ $0 ,X,$4  'e @'  +FkX ~'HB Sort the names into alphabetical order. Using a bubblesort, which1 seems to be fast enough at least for the moment.   _'" $  $$ $ $ P These two need to be swappedResi $$'& $ $ $+$ & $ +'"k $! "k5 Create any directories necessary. This bit has to goR(BD before the file-handling section because, if directories need to be 6F created, they need to be created before we start trying to copy filestNLLB into them. Note the big lack of error-handling - the usual reasonD for directories not being created is because they're already there.hin a B What really matters is the file copies - if they fail, we have to be careful.(/ If we're copying stuff then make the directory t Creating dir    $A@itiona`    $A@4 !0k(  $9 Presume pleasantly that the copy (if one happens) worked'*: If we're copying the files then do that before the delete  Writing file  \ $  $A@io6  \ $  \ $  $A@8:6Failed copy to  \ $  $A@'*:`:XPkH) If we're deleting them all then go ahead  *PuRemoving file \ $A@Clearing attributesA@,< \ $A@> !DeletingA@ \ $A@@B8<0Failed delete on \ $A@'BBd * As we're not wiping the whole thing, just  add the files to the list \ $ B@kH : Okay, here's the recursive bit. We now have an array full= of the directory names from this particular path and we must cycle through these.    \ $A@ k8> If we're deleting stuff then zap the directory. Remember that: some files in it may have failed copies but that's okay -: if they failed the copy then the file hasn't been deleted so the rmdir won't work anyway. Deleting directory A@D A@FHDFailed remove on A@'HHkorAttribute VB_Name = "CLRFileSear@ch1" Bas0{FCFB3D2A-A0FA-1068-A738-08002B3371B5} |GlobaBlSpacFalse dCre atablPr@edeclaIdCExposeTemplateDerivCustomiz E' Code from Chr is Ra`' Source: http://c rae.com/vba/routines/clrfs.html ' May 9, 2007 ' By1, 13/5/99 to 6/ 7.Option xlicit ' Are we debugging - 3 =full0=so1=a little, 0=no #Const SHOWDPEBUGV0C-?C:Object m@Ql:MethodsExec- actually run CL (returns Boolean w hich @balways truBd unlessCletes@FGrequestfaed).8 If &weI , the@P@L#-,Khas no me mbers@p' XNew@ic@4r q' Prop ertieFLookin (sng) dirTxoryHA"Sort (bJ whZer or @!t"AresultsAIncludeDirs*i ` with d (not jf [) `Found` collU$ SubFold#Jurse?! Dea8D d C `,!prog sebP Da?"kT@H7l; in. Set us!w%cedu. FGP@@ priACIn As SCt copAE KÍk CTom WJh<ubT dyC O` 7b Y /aUn!(welspec)bB1for% AP -p!"@gh subOhh bliofEpn֥o_u,$01< 5fP 8= HO=48Keveryth1wp:` fV4[d okayt1 dOPQ+x&Uy L63(TopO-0L_} 5 #V:TidPupd trd slashesuGivQa brUali doesn't workThoTs } !aAo0m becau`you catpaps@Blike:\"/4itAo1]chLopo . Q,P how,lanVhat g mm!{curren Q PdPe CPntough. YP shouldiric tqanya|RightS)pv"@?na =Ű fLenSjf1 SDq uzt g}q 6yE"PEnd If'8q7[=  S) &*G'*))3' )dc6qb=Gc1S_1jff11LR, *  , J6a qrtyq*t//A8&/f&/'`:e tdisp&yReinnmaa. 24sSSub(DBI, B0L@lQIntegerT2#16<= 3.0pA"(`Qvp) L" &Y& " <->@P C#E02?S_= 3QDFDQ(' R)n ipanCce of the class is started - just ' runsear procedure. CLR, 14/5/99. Private Sub C_Initializ@e() SDebug "Newnrnce."J#Sich EndN Cls7ublicCxLookIn = "c:\"ortFalseIncludeDirs HAlFoldeT|rujPO criterialDeleteFxile / -ICopyToF"ZRun wheniclosed. I'm no100% s abou6t~p}qTe0rminvR' Killf our results listByet Found:Nothinng]ˆ Hd, memory_@@z-N 0 h35= 0F1= CIp\*.*vbTJWh'45<>0 #1P.." A K~"+:Q1!strap wAqcSOC>essexr at aS(ocj0/%;@[MNetW`K volume.s 1Opnrr&GoC`w.uNu' Check if it's''= GetAttr\u`(,iB%%0IA+E0%%, 3;Q#XR!(+ 1RIm Pertpsrd1 UL 6}ZkIf;SkipFNT  y:A1le would&!G?0,Res3 NexpqT| e) ;!CWS' Go ahqy21?%scA1\givspecQprprayc codPy bovqbRT `muЇ^caa(3D >>,SP82 66@8040$4OW!̥'_Hi@A. 0QSQ'eIQa0o/"pwip0,iqXd-"pR" f ge!conf 04`Duask *!&"^%^!0tn@A ok work@uQ PQYOr  (CQ(V/le)iT)TQ ReDim Preserve FilesHere(1 To8Count)  B = 0This XEnpd IfBXDirWend ' Sort the names into alphabetical order. Using a bubb5, whichHseems =be fast enough at lefor4moment.!If (k >` 1) AcJThenDoAnyChangZ= FalsjeF7BV&= - 1 *oGFˇ)L +XS#'Ӏ two needGswappeb SFHm", ,8= % bTruLbA( Next YLoop Until No>tEzC' Create any directori@necessary.ˀ bit haBgĒ' bee¥f-@dlA"sioncause, ifLKs!c!d,y{e we st2anry! @fcopy s pr m.A big lack of error-"usuvsog' n"*beis"'r@)ldyre$u0' Wh`ylly mattero)a .-GA%@ aile .t. carpefuld owe"astufjfn k yã`priC (`<> ""nSDebug "D  " & & Mid(Bas Hy, Le n(@QkIn)1`, 2WOn E0 Resume YMk_ N Go 0h#AddItem ~#'Ήplant8t: 5!7y ( \ on5ns) worka,F@:_.'@ k7 bZ97doH(ndexlet^9!9Wxrit9BO9="\G&)?==1G!@@,  _I((( oo6* Skip : 8Qk2o o 4wG `,OdD6 ;41Y4+2)q%U+ml+gPhea8{*D+%Rjh Remov+"*>*H 5%C`=r!Yributes", ~3  S ܈SetAttrO,O4Gp y p Kill{ V-- -`-G 0~?|+Okay+a* ??, :,' AsXn0~wip AXwhols`, jusXj'x adT|Ql*iFd! s.Hi7ŸLS' , hц'Åyursi . Wow3an arr>l vfr,omCLRFileSearch11@49d07db5KCLRFileSearch1=Hx`|!Go I8"+73,I%XLJ4܏ݻ=Z#@XN9-02A!1G 1@62mV9rU~~~~w     SelXRange SelYRange e cannot be found. You will have to manually add this reference. Launch the Visual Basic Editor from Excel, then execute Tools: References. Click the Browse button, navigate to the Solver add-in and open it. Make sure it is checked in the available references list. Then delete the auto_close sub in Module1. Executing search Searching: " " \*.* .. . Adding dir: &Skipping (error): " Creating dir  Writing file Failed copy to Removing file &Clearing attributes Deleting "Failed delete on  &Deleting directory "Failed remove on   C  x   8 @ X D x     $Worksheet Menu Bar F F Tools Herramientas F FControls CountCaption 0DummyDepVar Analysis ...TypeAdd ShowDDVFormOnActionp The language of this installation of Excel does not appear to be EnglishUS. Please enter the word that Excel is using for Tools on the main menu across the top of the screen. For example, in Spanish, it is Herramientas. ,Get the word for TOOLS' You have successfully loaded the Dummy Dependent Variable Analysis add-in. LYou may access the macro by executing  4: DummyDepVar Analysis ... BDummy Dependent Variable Analysis `  BClass terminated, memory released=;6DVEhHK_2 solver YO1qpbOǽ R to funK*yrU(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ;3jQL8X   ! AYyqyDummyDepVarAnalysis ThisWorkbook OptionsFormSheet2 DDVModuleDDVForm CLRFileSearchCLRFileSearch1F /C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLLVBA  q`F4C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXEExcel yp0FC:\WINDOWS\system32\stdole2.tlbstdole 1y.E .`M C:\WINDOWS\system32\FM20.DLLMSForms YRK[| .C:\DOCUME~1\user\LOCALS~1\Temp\VBE\MSForms.exd YL-[DR?C:\Program Files\Common Files\Microsoft Shared\office11\mso.dllOffice aF.}PGUXeMFš~ OkVͿHDFWorkbookWorkbook_AddinInstallWorkbook_AddinUninstall @ auto_close ShowDDVForm EstimationFFShowOptionsFormtest MLCovarMatrix AnotherTry FirstOrder StringFindAddDummyDepVarMenuItemdeleteCheckSolverReferenceAddSolverReferenceostestMyMacrotestsolvercallMainSolverDialog +=h8+3qݻABr Z*=h8+3qλ1BK[2!=h8+3qClassPgv3+3o VBInternal   9 8gĤIx8<gĤIx8< LookInCopyToSDebugClass_Initialize NewSearchClass_TerminateExecuteRunDown `HL8@`FzF~F SolverFF 1F W Solver*.* C:\B Solver cannot be found. It must be installed from the Office CD in order for the Comparative Statics Wizard to function properly. :Fatal Error: Solver Not Found M 8:Office:Excel Add-ins:SolverfĤIx8< @:Office:Excel Add-ins:Solver.xla 4:Office:Add-ins:Solver.xla ,:Office:Add-ins:Solver .Cleared search criteria  \ PCutting trailing slash on directory name k 9 This machine seems to be neither Windows nor Mac. Macros that rely on Solver may have to be manually adjusted. HVBE6.DLL i X S x   $New class instance c:\ The Solver referenc__SRP_1DDVForm 77fotY (Sort IncludeDirsFileNameSearchSubFolders FoundFiles  8 DeleteFiles DeleteFoldersToDirDBInfo DebugLevel BaseDirectory/(H  @"}Z)R KQDBTimes New Roman T, 10H,g ,1Tahoma4F a0NProbit NLLS1Tahoma(OKNOqTahoma(~Click on the button below to input the cell range containing the 0/1 Y values. Include the Y variable label as the first cell.v1TahomaH,g ,1Tahoma( Input Y Data; OqTahoma(Click on the button below to input the cell range containing the X variables. Include the X variable labels as the first row of cells..1Tahoma( Input X Data; OqTahoma`(NChoose from the desired estimation methods below (any or all choices allowed):vN1Tahoma4F y a0NProbit MLata1Tahoma4F a0NLogit NLLSta1Tahoma0F* F0NLogit ML1Tahoma@F0NDon't show any messages1TahomaSelYRangeStaq( PProbitNLLStaOI,0CommandButton1 !(2 Label1, 10SelXRangetto,8CommandButton2( 2 Label2 , 8CommandButton31( 2| Label3'$ PProbitMLI( PLogitNLLSttoO$LLogitMLL0\ NoMessageCheckBoxsa &  Microsoft Forms 2.0 FormEmbedded Object9qVERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} DDVForm Caption = "Dummy Dependent Variable Analysis" ClientHeight = 6045 ClientLeft = 45 ClientTop = 330 ClientWidth = 4260 StartUpPosiCompObjaVBFrame:OptionsForm77f0tion = 1 'CenterOwner TypeInfoVer = 34 End (H  @ }R KQDBTimes New Roman(2hL(;Choose from the options below (any or all choices allowed):.k{1TahomaLL@F{0NCalculate Estimated SEs1TahomaPF%0{0NPredicted Probability Table and Graph5}1Tahoma(OKNo`CompObjaVBFrameIPROJECTwm "qTahomaLabel3ML,\ApproxSECheckBoxO,lPredProbCheckBox,0CommandButton1oxg   Microsoft Forms 2.0 FormEmbedded Object9qVERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} OptionsForm Caption = "Dummy Dependent Variable: Additional Options" ClientHeight = 2160 ClientLeft = 45 ClientTop = 345 ClientWidth = 4635 StartUpPosition = 1 'CenterOwner TypeInfoVer = 11 End ThisWorkbookThisWorkbookDDVFormDDVFormOptionsFormOptionsFormDDVModuleDDVModuleSheet2Sheet2CLRFileSearchCLRFileSearchCLRFileSearch1CLRFileSearch1PROJECTSummaryInformation("PDocumentSummaryInformation8CompObjmID="{475A1D74-0388-11D3-8666-04BEF9C00000}" Document=ThisWorkbook/&H00000000 Package={AC9F2F90-E877-11CE-9F68-00AA00574A4F} BaseClass=DDVForm BaseClass=OptionsForm Module=DDVModule Document=Sheet2/&H00000000 Class=CLRFileSearch Class=CLRFileSearch1 HelpFile="" Name="DummyDepVarAnalysis" HelpContextID="0" VersionCompatible32="393222000" CMG="2624B64D56BF4BC34BC34BC34BC3" DPB="1F1D8F5471B46BB56BB56B" GC="181A88AB89AB8954" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C DDVForm=0, 0, 0, 0, C, 66, 87, 1296, 658, C OptionsForm=0, 0, 0, 0, C, 44, 58, 1274, 629, C DDVModule=110, 145, 1107, 695, C Sheet2=0, 0, 0, 0, C CLRFileSearch=0, 0, 0, 0, C CLRFileSearch1=0, 0, 0, 0, C Oh+'0  PXx  Dummy Dep Var AnalysisBarreto/Howland4Probit and Logit Analysis with Solver 2 June 2008Humberto BarretoMicrosoft Excel@.@7՜.+,0 PXd lt|  Sheet1  Worksheets F!Microsoft Office Excel WorksheetBiff8Excel.Sheet.89q