Purpose
This App can be used to fit a generalized linear mixed model, which extends Linear Mixed Effects Model to non-normal data.
Installation
The app requires R software (minimum required version 4.3.3) and package (lme4). If R is not yet installed on your computer, please follow these steps.
- Run Origin as administrator. Download the file Generalized_Linear_Mixed_Model.opx and install it by choosing Tools->Package Manager->Tools->Install a Package.
- 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.)
- 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.
Operation
- Activate a worksheet with data and click the icon in the Apps Gallery window to open the dialog.
- 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.
- 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 Effects. Include Intercept option specifies whether to include the intercept parameter in the regression.
- In the Quantities tab, select quantities to output in the report sheet.
- In Plots tab, select plots to output in the report sheet.
- 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).
Reference
https://search.r-project.org/CRAN/refmans/lme4/html/glmer.html