File Exchange > Data Analysis >    Generalized Linear Mixed Model

OriginLab Technical Support
Date Added:
Last Update:
Downloads (90 Days):
Total Ratings:
File Size:
491 KB
Average Rating:
File Name:
File Version:
Minimum Versions:

Fit a generalized linear model with fixed effects and random effects.

Screen Shot and Video:


This App can be used to fit a generalized linear mixed model, which extends Linear Mixed Effects Model to non-normal data. 


The app requires R software (minimum required version 3.4.1) and package (lme4). If R is not yet installed on your computer, please follow these steps.

  1. Run Origin as administrator. Download the file Generalized_Linear_Mixed_Model.opx and install it by choosing Tools->Package Manager->Tools->Install a Package.
  2. After App installation, a pop-up dialog will ask if you agree to download and install R software before it proceeds. (If automatic downloading fails, you can install the App again or download R from here.)
  3. For the first time you launch the App, it downloads dependent R packages. Wait a few minutes until it is completed.

Note: If packages download fails, a pop-up dialog will ask you to copy 2 lines of commands from Results Log and run them in R to complete downloading packages. 
          If you reinstall or upgrade R after installing the app, it would not work properly. Please reinstall the app.


  1. Activate a worksheet with data and click the icon in the Apps Gallery window to open the dialog.
  2. In the Input tab, select a column as Dependent Variable. Select one or multiple columns for Continuous and Categorical Independent Variables. If Categorical data is chosen, Reference Factor Level for each column can be specified. Select 1 or 2 subject variables for grouping variables.
  3. In the Settings tab, choose a Family Function for response distribution. For fixed effects, Model Type provides two options: Main Effects and Custom Model. If Custom Model is chosen, you can add any main effects and interaction terms to the model in the opened dialog. You can also modify the model by clicking the button on the right of Model box. You need to select models for both Fixed Effects and Random EffectsInclude Intercept option specifies whether to include the intercept parameter in the regression.
  4. In the Quantities tab, select quantities to output in the report sheet.
  5. In Plots tab, select plots to output in the report sheet.
  6. Click OK button.

Sample OPJU File
This app provides a sample OPJU file.  Right click the App icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file Generalized Linear Mixed Model Sample.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).



Reviews and Comments:

Be the first to review this File Exchange submission.