glm(1)

πŸ’– glm(1) β€” General Linear Model πŸ’–

okay bestie, welcome to the man page for glm, from section 1 of the CMTK manual (The Computational Morphometry Toolkit, if we're being formal πŸ’…). buckle up, this one is about statistics on pixels and it's honestly kind of iconic.


✨ NAME ✨

glm β€” General Linear Model. it's giving "big math, tiny acronym". 🧚


🌸 SYNOPSIS 🌸

glm [options] ctlfile imgfile_pattern [ctlfile imgfile_pattern ...]

no cap, you hand it a control file (or several) plus a filename pattern for your images, and off it goes. πŸ¦‹


🌈 DESCRIPTION 🌈

so basically glm does statistical modeling of pixel intensities across multiple images, using a General Linear Model. main character energy for literally every voxel. πŸ”₯

the independent variables of the model live inside one or more control files. each control file is a plain text file, and each independent variable gets its own column, separated by whitespace. cute and simple.

the first line of the control file is where you declare the variable names β€” like, the labels that identify each variable. every line after that contains one value per independent variable. periodt.

example, bestie:

ID  age  sex
01  20   0
02  30   1

now here's the spicy part: each control file name gets followed by a file name pattern. inside that pattern, a single '%s' place holder gets swapped out for the value in the first column of each control file row. that resulting string is the path of the image that gets read and associated with the model variables listed on that particular control file line. slay. πŸ’«

using the control file from the example above, the pattern 'images/subject%s.nii' would expand to the image file names 'images/subject01.nii' and 'images/subject02.nii'. literally just vibes and substitution. πŸŽ€

and yes, you can use multiple control files, each one paired with a different image file pattern. go off. πŸ‘‘


πŸ’… OPTIONS πŸ’…

🫢 Global Toolkit Options (these are shared by all CMTK tools)

these are the community options, everyone gets them:

  • --help β€” writes the list of basic command line options to standard output.
  • --help-all β€” writes the complete list of basic and advanced command line options to standard output. the deluxe version.
  • --wiki β€” writes the list of command line options to standard output in MediaWiki markup. for your wiki girlies.
  • --man β€” writes man page source in 'nroff' markup to standard output.
  • --version β€” writes the toolkit version to standard output.
  • --echo β€” writes the current command line to standard output.
  • --verbose-level <integer> β€” sets the verbosity level.
  • --verbose, -v β€” increments the verbosity level by 1. ⚠️ deprecated; supported for backward compatibility.
  • --threads <integer> β€” sets the maximum number of parallel threads (for POSIX threads and OpenMP). parallel besties. 🧡

πŸ“ Input Settings

  • --crop <string>, -c <string> β€” to save space/time, crop images: x0,y0,z0,x1,y1,z2

🌟 Model Settings

  • --normalize, -n β€” normalize model parameters w.r.t. data variances.
  • --exp, -e β€” use the exponential model rather than the linear model. not me switching up the whole model πŸ”€

πŸŽ€ Selection of Independent Variables

  • --exclude-constant, -x β€” excludes the automatic constant parameter from the model.
  • --ignore-parameter <string>, -i <string> β€” ignore the parameter with the given NUMBER (0..n-1). can be repeated.
  • --select-parameter <string>, -s <string> β€” select the parameter with the given NAME for the model. can be repeated.

πŸ‘‘ Output Settings

  • --output-pattern <string>, -O <string> β€” filename pattern for output.

here's the rundown, exactly as the tool lays it out:

%s is replaced with image type ('fstat', 'tstat', or 'param')
%d is replaced with independent variable number (0 for entire model)
%s is replaced with independent variable name ('model' for entire model)

(yes, both of those are %s. that's genuinely what the doc says, bestie, i'm not even touching it πŸ’€)

[Default: model_%s_%02d_%s.nii ]


πŸ¦‹ AUTHORS πŸ¦‹

Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko. the whole squad. 🫢


πŸ“œ LICENSE πŸ“œ

http://www.fsf.org/licensing/licenses/gpl.html


πŸ™ˆ BUGS πŸ™ˆ

report bugs at http://nitrc.org/projects/cmtk/ β€” they wanna hear from you, fr fr.


πŸ’œ ACKNOWLEDGMENTS πŸ’œ

CMTK is developed with support from the NIAAA under Grant AA021697, National Consortium on Alcohol and Neurodevelopment in Adolescence (N-CANDA): Data Integration Component. from April 2009 through September 2011, CMTK development and maintenance was supported by the NIBIB under Grant EB008381. shoutout to the funders, they ate. ✨


and that's the whole page, bestie πŸŽ€ this was CMTK 3.3.1p2, dated Jun 24 2026 β€” go forth and model linearly, you absolute legend πŸ‘‘πŸ’–

πŸ“¦ where this page comes from