File Exchange > Stats >    Linear Mixed Effects Model (LMM)

Author:
OriginLab Technical Support
Date Added:
2/13/2020
Last Update:
6/12/2025
Downloads (90 Days):
524
Total Ratings:
11
File Size:
464 KB
Average Rating:
File Name:
Linear_Mix...el.opx
File Version:
1.34
Minimum Versions:
License:
Free
Type:
App
Summary:

Fit a linear model with fixed effects and random effects.

Screen Shot and Video:
Description:

Purpose

This App can be used to fit a linear model for data collected in groups. A mixed effects model consists of fixed effects and random effects. Fixed effects are conventional linear regression. Random effects have linear coefficients that vary with respect to one or more grouping variables.

Installation

Download the file "lmm.opx", and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps gallery window.

Operation

  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.

    Note: You can specify one or two subject variables (grouping variables). If two subject variables are specified, the 1st subject variable is considered to be nested within the 2nd subject variable.

  3. In the Settings tab, 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. Modify Accuracy option if fitting fails to reach required accuracy.
  4. In the Quantities tab, select quantities to output in the report sheet.
  5. In Plots tab, specify whether to create Fitted Plot and Residual Plot.
  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 LinearMixedEffects 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).

Updates:

v1.34:7/30/2025 Change minimum required version.
v1.32:06/11/2025 Localization
v1.29:05/29/2025 Update hierarchical report generation code
v1.28:05/28/2025 Localization
v1.25 05/13/2025 Update templates and localization
v1.23 3/23/2023 Update dll dependency
v1.22 11/23/2022 Supported large datasets.
v1.21: Better support missing values.
v1.1: Fix wrong random effects parameters issue with unsorted category.

Reviews and Comments:
09/05/2025sohelSubject: Issue with Adding Random Effects (Replicate) in Linear Mixed Effects Model: lmm in Origin 2025b

Dear OriginLab Customer Care Team,
I am writing to report an issue I am experiencing with the "Linear Mixed Effects Model: lmm" tool in Origin 2025b while attempting to fit a linear mixed-effects model to my dataset. Despite following the expected workflow, I am unable to include "Replicate" as a random effect in the "Settings" tab, and I would appreciate your guidance or support to resolve this.

Scenario Description
I am analyzing a dataset with height measurements collected across five stages (S0, S1, S2, S3, S4) over two years (2023 and 2024), with three biological replicates per stage per year. The data is organized in a long format with the following columns: Replicate, Year, Stage, and Height. My goal is to model Height as the dependent variable, with Year and Stage as categorical fixed effects, and Replicate as a random effect to account for variability between biological replicates.
Steps Taken

1. Input Tab Configuration:

- Set Height as the Dependent Variable ([Book1]Sheet1!"Height").
- Added Year and Stage as Categorical Independent Variables ([Book1]Sheet1!.2:3).
- Set Replicate as the 1st Subject Variable ([Book1]Sheet1!"Replicate").
- Left the 2nd Subject Variable empty.
- Configured Reference Factor Levels: Year as 2023 and Stage as S0.


2. Settings Tab Configuration:

- Selected Custom Model as the Model Type.
- Specified Year Stage

09/04/2025yukiOriginlabHi Sohel,
This app is available in OriginPro 2025b and later versions. Could you please kindly check that you are using a compatible version?

09/04/2025sohelHi, I am trying to install "Linear Mixed Effects Model", but I am unable to install it. What is the reason for this?

Any guidance, please?


Thanks

06/06/2025Jiasx19790916it is so useful for the researcher.

03/13/2023lfb1212no

01/29/2023OriginLabHi, Strelok163

You can contact us by submitting a support ticket. https://www.originlab.com/restricted/support/newticket.aspx?c=3

01/28/2023Strelok163Hello. I can't create a new topic on the forum. Where can I ask a question? (you need to attach an image)

12/09/2022OriginLabHi,
We don't support GLMM so far, but we plan to make a new app to support this in the future. (ID: APPS-1169).
OriginLab Technical Support

12/09/2022kinesicoHi there,

I've been trying to run GLMM using the app available, but I cannot! It does not work! Would you mind helping me (us). Recording a video tutorial would be great!

Thank you in advance.

Best.

--
RAFC

05/24/2022yukiOriginlabHi borosemil, I am sorry that we don't support GLMM so far, but we plan to make a new app to support this in the future. (ID: APPS-1169).
OriginLab Technical Support

12