Example: confidence

Using lme4: Mixed-Effects Modeling in R

SimpleLongitudinalInteractionsTheoryGLMM Item ResponseNLMMU sing lme4 : Mixed-Effects Modeling in RDouglas BatesUniversity of Wisconsin - Madisonand R Development Core 11, 2008 SimpleLongitudinalInteractionsTheoryGLMM Item ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSim

standard deviations of the conditional distributions B jjY;j= 1;:::;q. We show these in the form of a 95% prediction interval, with the levels of the grouping factor arranged in increasing order of the conditional mean. These are sometimes called \caterpillar plots". F D A B C E-50 0 50 100 l l l l l l

Tags:

  Using, Distribution, Mixed, Conditional, Conditional distributions, Using lme4, Lme4

Information

Domain:

Source:

Link to this page:

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

Other abuse

Transcription of Using lme4: Mixed-Effects Modeling in R

1 SimpleLongitudinalInteractionsTheoryGLMM Item ResponseNLMMU sing lme4 : Mixed-Effects Modeling in RDouglas BatesUniversity of Wisconsin - Madisonand R Development Core 11, 2008 SimpleLongitudinalInteractionsTheoryGLMM Item ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data.

2 Simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data.

3 Simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data.

4 Simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMWeb sites associated with the bates/UseR2008 Materials for the Main web site for the R Comprehensive R Archive Network primary Main mirror for R-Forge, development site for many public Rpackages.

5 This is also the URL of the repository forinstalling the development versions of thelme4andMatrixpackages, if you are so development site for thelme4packageSimpleLongitudinalInteract ionsTheoryGLMMItem ResponseNLMMO utlineOrganizing and plotting data; simple, scalar random effectsModels for longitudinal dataInteractions of grouping factors and other covariatesEvaluating the log-likelihoodGeneralized Linear mixed ModelsItem Response Models as GLMMsNonlinear mixed ModelsSimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMO rganizing data in R Standard rectangular data sets (columns are variables, rowsare observations) are stored inRasdata frames.

6 The columns can benumericvariables ( measurements orcounts) orfactorvariables (categorical data) ororderedfactorvariables. These types are called theclassof the variable. Thestrfunction provides a concise description of thestructure of a data set (or any other class of object in R). Thesummaryfunction summarizes each variable according to itsclass. Both are highly recommended for routine use. Entering just the name of the data frame causes it to beprinted. For large data frames use theheadandtailfunctions to view the first few or last few ResponseNLMMR packages Packages incorporate functions, data and documentation.

7 You can produce packages for private or in-house use or youcan contribute your package to the Comprehensive R ArchiveNetwork (CRAN), We will be Using thelme4package from CRAN. Install it fromthePackagesmenu item or with> (" lme4 ") You only need to install a package once. If a new versionbecomes available you can update (see the menu item). To use a package in an R session you attach it Using > require( lme4 )or> library( lme4 )(This usage causes widespread confusion of the terms package and library .)SimpleLongitudinalInteractionsTheoryGL MMItem ResponseNLMMA ccessing documentation To be added to CRAN, a package must pass a series of qualitycontrol checks.

8 In particular, all functions and data sets mustbe documented. Examples and tests can also be included. Thedatafunction provides names and brief descriptions ofthe data sets in a package.> data(package = " lme4 ")Data sets in package lme4 :Dyestuff Yield of dyestuff by batchDyestuff2 Yield of dyestuff by batchPastes Paste strength by batch and caskPenicillin Variation in penicillin testingcake Breakage angle of chocolate cakescbpp Contagious bovine pleuropneumoniasleepstudy Reaction times in a sleep deprivation study Use?

9 Followed by the name of a function or data set to viewits documentation. If the documentation contains an examplesection, you can execute it with ResponseNLMML attice graphics One of the strengths of R is its graphics capabilities. There are several styles of graphics in R. The style inDeepayan Sarkar slatticepackage is well-suited to the type ofdata we will be discussing. I will not show every piece of code used to produce the datagraphics. The code is available in the script files for the slides(and sometimes in the example sections of the data set sdocumentation).

10 Deepayan s book,Lattice: Multivariate Data Visualizationwith R(Springer, 2008) provides in-depth documentation andexplanations of lattice graphics. I also recommend Phil Spector s book,Data Manipulationwith R(Springer, 2008).SimpleLongitudinalInteractionsTheo ryGLMMItem ResponseNLMMThe Dyestuff data set TheDyestuff,PenicillinandPastesdata sets all comefrom the classic bookStatistical Methods in Research andProduction, edited by Davies and first published in 1947. TheDyestuffdata are a balanced one-way classification oftheYieldof dyestuff from samples produced from sixBatchesof an intermediate product.


Related search queries