Example: quiz answers

clogit — Conditional (fixed-effects) logistic regression

Conditional (fixed-effects) logistic regressionDescriptionQuick startMenuSyntaxOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso seeDescriptionclogitfits a Conditional logistic regression model for matched case control data, also known asa fixed-effects logit model for panel compute robust and cluster robust standarderrors and adjust results for complex survey [R]asclogitif you want to fit McFadden s choice model (McFadden 1974).Quick startConditional logistic regression model ofyonxwith matched case control pairs data identified byidvarclogit y x, group(idvar)Fixed-effects logistic regression model with panels identified byidvarclogit y x, group(idvar)Add categorical variableaand report results as odds ratiosclogit y x , orAs above, but using sampling probability weightwvarclogit y x [pweight = wvar], orMenuStatistics>Categorical outcomes> Conditional logistic regression12 clogit Conditional (fixed-effects) logistic regressionSyntaxclogitdepvar[indepvars] [if] [in] [w]

Biostatisticians and epidemiologists call these models conditional logistic regression for matched case–control groups (see, for example,Hosmer, Lemeshow, and Sturdivant[2013, chap. 7]) and fit them when analyzing matched case–control studies with 1:1 matching, 1:k

Tags:

  Logistics, Effect, Regression, Conditional, Logistic regression, fixed, Clogit conditional, Clogit, fixed effects

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of clogit — Conditional (fixed-effects) logistic regression

1 Conditional (fixed-effects) logistic regressionDescriptionQuick startMenuSyntaxOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso seeDescriptionclogitfits a Conditional logistic regression model for matched case control data, also known asa fixed-effects logit model for panel compute robust and cluster robust standarderrors and adjust results for complex survey [R]asclogitif you want to fit McFadden s choice model (McFadden 1974).Quick startConditional logistic regression model ofyonxwith matched case control pairs data identified byidvarclogit y x, group(idvar)Fixed-effects logistic regression model with panels identified byidvarclogit y x, group(idvar)Add categorical variableaand report results as odds ratiosclogit y x , orAs above, but using sampling probability weightwvarclogit y x [pweight = wvar], orMenuStatistics>Categorical outcomes> Conditional logistic regression12 clogit Conditional (fixed-effects) logistic regressionSyntaxclogitdepvar[indepvars] [if] [in] [weight], group(varname)[options]depvaris treated as binary regardless of values.

2 Depvarequal to nonzero and nonmissing (typicallyequal to 1) indicates a positive outcome, whereasdepvarequal to 0 indicates a negative group(varname)matched group variableoffset(varname)includevarnamein model with coefficient constrained to 1constraints(constraints)apply specified linear constraintscollinearkeep collinear variablesSE/Robustvce(vcetype)vcetypemay beoim,robust,clusterclustvar,opg,bootstr ap,orjackknifenonestdo not check that panels are nested within clustersReportinglevel(#)set confidence level; default islevel(95)orreport odds ratiosnocnsreportdo not display constraintsdisplayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor-variable labelingMaximizationmaximizeoptionscontr ol the maximization process; seldom usedcoeflegenddisplay legend instead of statistics group(varname)is contain factor variables; see[U] Factor ,by,fp,jackknife,mfp,mi estimate,nestreg,rolling,statsby,stepwis e, andsvyare allowed;see[U] Prefix (bootstrap)andvce(jackknife)are not allowed with themi estimateprefix; see [MI]mi are not allowed with thebootstrapprefix.

3 See [R] (),nonest, and weights are not allowed with thesvyprefix; see [SVY] ,iweights, andpweights are allowed (see[U] weight), but they are interpreted to apply to groupsas a whole, not to individual observations. SeeUse of not appear in the dialog [U] 20 Estimation and postestimation commandsfor more capabilities of estimation Model group(varname)is required; it specifies an identifier variable (numeric or string) for the (varname)is a synonym forgroup().offset(varname),constraints(c onstraints),collinear; see [R]estimation Conditional (fixed-effects) logistic regression 3 SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that are derived fromasymptotic theory (oim,opg), that are robust to some kinds of misspecification (robust), thatallow for intragroup correlation (clusterclustvar), and that use bootstrap or jackknife methods(bootstrap,jackknife); see [R] , available only withvce(clusterclustvar), prevents checking that matched groups arenested within clusters.

4 It is the user s responsibility to verify that the standard errors are theoreticallycorrect. Reporting level(#); see [R]estimation the estimated coefficients transformed to odds ratios, that is,ebrather thanb. Standard errorsand confidence intervals are similarly transformed. This option affects how results are displayed,not how they are be specified at estimation or when replaying previouslyestimated ; see [R]estimation :noci,nopvalues,noomitted,vsquish,noempt ycells,baselevels,allbaselevels,nofvlabe l,fvwrap(#),fvwrapon(style),cformat(%fmt ),pformat(%fmt),sformat(%fmt), andnolstretch; see [R]estimation options. Maximization maximizeoptions:difficult,technique(algo rithmspec),iterate(#),[no]log,trace,grad ient,showstep,hessian,showtolerance,tole rance(#),ltolerance(#),nrtolerance(#),no nrtolerance, andfrom(initspecs); see [R]maximize.

5 These options areseldom the optimization type totechnique(bhhh)resets the defaultvcetypetovce(opg).The following option is available withclogitbut is not shown in the dialog box:coeflegend; see [R]estimation and are presented under the following headings:IntroductionMatched case control dataUse of weightsFixed-effects logitIntroductionclogitfits maximum likelihood models with a dichotomous dependent variable coded as 0/1(more precisely,clogitinterprets 0 and not 0 to indicate the dichotomy). Conditional logistic analysisdiffers from regular logistic regression in that the data are grouped and the likelihood is calculatedrelative to each group; that is, a Conditional likelihood is used.

6 SeeMethods and formulasat the endof this clogit Conditional (fixed-effects) logistic regressionBiostatisticians and epidemiologists call these models Conditional logistic regression for matchedcase control groups (see, for example, Hosmer, Lemeshow, and Sturdivant [2013, chap. 7]) and fitthem when analyzing matched case control studies with 1:1 matching, 1:k2imatching, ork1i:k2imatching, whereidenotes theith matched group fori=1,2,..,n, wherenis the total numberof a model appropriate for all of these matching schemes or for any mix of theschemes because the matchingk1i:k2ican vary from group to uses the trueconditional likelihood, not an approximation.

7 Biostatisticians and epidemiologists sometimes refer tothe matched groups as strata , but we will stick to the more generic term group .Economists and other social scientists typically call the model fit byclogita fixed-effects logitmodel for panel data (see, for example, Chamberlain [1980]). The data used to fit a fixed-effectslogit model look exactly like the data biostatisticians and epidemiologists callk1i:k2imatchedcase control data. In terms of how the data are arranged,k1i:k2imatching means that in theithgroup, the dependent variable is 1 a total ofk1itimes and 0 a total ofk2itimes. There are a total ofTi=k1i+k2iobservations for theith group.

8 This data arrangement is what economists and othersocial scientists call panel data , longitudinal data , or cross-sectional time-series data .So no matter what terminology you use, the computation and the use of theclogitcommand isthe same. The following example shows how your data should be arranged to 1 Suppose that we have grouped data with the variableidcontaining a unique identifier for eachgroup. Our outcome variable,y, contains 0s and 1s. If we were biostatisticians,y=1 would indicatea case,y=0 would be a control, andidwould be an identifier variable that indicates the groups ofmatched case control we were economists,y=1 might indicate that a person was unemployed at any time duringa year andy=0, that a person was employed all year, andidwould be an identifier variable we list the first few observations of this dataset, it looks like.

9 Use list y x1 x2 id in 1/11y x1 x2 0 4 1 4 1 6 1 8 0 1 0 7 1 10 0 1 1 7 1 7 1 9 1019 Pretending that we are biostatisticians, we describe our data as follows. The first group (id=1014)consists of four matched persons: 1 case (y=1) and three controls (y=0), that is, 1:3 second group has 1:2 matching, and the third 2 Conditional (fixed-effects) logistic regression 5 Pretending that we are economists, we describe our data as follows. The first group consists of4 observations (one per year) for person 1014. This person had a period of unemployment during 1year of 4.

10 The second person had a period of unemployment during 1 year of 3, and the third had aperiod of 2 years of independent variables arex1andx2. To fit the Conditional (fixed-effects) logistic model, wetype. clogit y x1 x2, group(id)note: multiple positive outcomes within groups 0: log likelihood = 1: log likelihood = 2: log likelihood = (fixed-effects) logistic regressionNumber of obs = 369LR chi2(2) = > chi2 = likelihood = Pseudo R2 = Std. Err. z P>|z| [95% Conf. Interval] .2875215 .0898312 .0449555 .1540281 Technical noteThe message note: multiple positive outcomes within groups encountered at the top of theclogitoutput for the previous example merely informs us that we havek1i:k2imatching withk1i>1for at least one group.


Related search queries