nlme

nlme is a skill for Claude Code, Codex from LeoLin990405/r-analytics-skill. It costs 24 tokens per session (1,120 once invoked), scanned A, original, MIT.

An R package for fitting mixed-effects models, which combine overall patterns with differences between groups. It supports linear and nonlinear models and several correlation patterns.

In plain words
What is it for?
Use it for nested groups, repeated measurements, random intercepts or slopes, and time-based or spatial correlations.
Why use it?
It helps model data where observations are grouped or repeated and therefore are not fully independent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for nested groups, repeated measurements, random intercepts or slopes, and time-based or spatial correlations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/nlme
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LeoLin990405/r-analytics-skill --skill nlme
Clone the repo
git clone --depth 1 https://github.com/LeoLin990405/r-analytics-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nlme

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/nlme/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/nlme)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/nlme"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/nlme/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nlme

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/nlme"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/nlme.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,120 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.01120
Opus 5 $0.00012 $0.00560
Sonnet 5 $0.00005 $0.00224
Haiku 4.5 $0.00002 $0.00112

Measured 5d ago against content hash f84b9789e85a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

nlme scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sub-skills/r-ml/r-ml-frameworks/nlme/SKILL.md · 211 lines

How it starts

The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.

nlme

Linear and nonlinear mixed-effects models.

Linear Mixed Models

library(nlme)

# Random intercept
model <- lme(y ~ x, random = ~ 1 | group, data = df)

# Random intercept and slope
model <- lme(y ~ x, random = ~ 1 + x | group, data = df)

# Nested random effects
model <- lme(y ~ x, random = ~ 1 | group1/group2, data = df)

Model Specification

# Using formula
model <- lme(
  fixed = y ~ x1 + x2,
  random = ~ 1 | group,
  data = df
)

# Using pdMat classes
model <- lme(
  y ~ x,
  random = pdDiag(~ 1 + x | group),  # Diagonal covariance
  data = df
)

# Compound symmetry
model <- lme(
  y ~ x,
  random = pdCompSymm(~ 1 | group),
  data = df
)

Correlation Structures

# AR(1) correlation
model <- lme(y ~ x, random = ~ 1 | group,
  correlation = corAR1(form = ~ time | group),
  data = df
)

# Compound symmetry
model <- lme(y ~ x, random = ~ 1 | group,
  correlation = corCompSymm(form = ~ 1 | group),
  data = df
)

# Exponential spatial correlation
model <- lme(y ~ x, random = ~ 1 | group,
  correlation = corExp(form = ~ lat + lon | group),
  data = df
)

# General correlation
model <- lme(y ~ x, random = ~ 1 | group,
  correlation = corSymm(form = ~ 1 | group),
  data = df
)

Variance Functions

# Heteroscedasticity by group
model <- lme(y ~ x, random = ~ 1 | group,
  weights = varIdent(form = ~ 1 | group),
  data = df
)

# Variance proportional to fitted values
model <- lme(y ~ x, random = ~ 1 | group,
  weights = varPower(),
  data = df
)

# Exponential variance
model <- lme(y ~ x, random = ~ 1 | group,
  weights = varExp(form = ~ x),
  data = df
)

# Combined variance function
model <- lme(y ~ x, random = ~ 1 | group,
  weights = varComb(varIdent(form = ~ 1 | group), varPower()),
  data = df
)

Model Summary

# Summary
summary(model)

# Fixed effects
fixef(model)
fixed.effects(model)

# Random effects
ranef(model)
random.effects(model)

# Variance components
VarCorr(model)

# Confidence intervals
intervals(model)

Read the full file on GitHub · 211 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 211 lines · 24 tokens per session scan A f84b9789e85a

Subscribe to this mod's changes

nlme is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 1,120 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

bio-applied-cancer-transcriptomics

Classify tumor RNA-seq into subtypes (melanoma Tirosh/Harbst on TCGA-SKCM): log1p/z-score, PCA/t-SNE, hierarchical clustering, random forest, Kaplan-Meier survival. Use when subtyping cBioPortal expression data.

Pavel-Kravchenko/Bioinformatics · 67 tokens

bio-applied-deep-learning-for-biology

Train PyTorch CNN/LSTM/Transformer/VAE on DNA/protein sequences: one-hot encoding, motif filters, saliency. Use when classifying sequences, predicting TF binding sites, denoising scRNA-seq, or choosing DL vs ML.

Pavel-Kravchenko/Bioinformatics · 61 tokens

bio-applied-gene-regulatory-networks

Infer TF-target regulatory networks via correlation, ARACNE mutual information, and GENIE3 random-forest importance; find feed-forward loops; validate against TRRUST. Use when building a GRN or asked about GENIE3, ARACNE, or regulons.

Pavel-Kravchenko/Bioinformatics · 65 tokens

biopython-databases

Fetch sequences from NCBI Entrez/UniProt/PDB/Ensembl REST APIs via BioPython SeqIO; read/write FASTA/GenBank/FASTQ. Use when downloading by accession/gene name, batch-fetching records, or converting sequence file formats.

Pavel-Kravchenko/Bioinformatics · 62 tokens

ai-science-diffusion-generative-models

Code DDPM/DDIM diffusion samplers, linear/cosine noise schedules, and DDRM inverse-problem solving (denoising, inpainting, super-resolution) in NumPy/PyTorch. Use for forward/reverse diffusion, score matching, or DDIM sampling.

Pavel-Kravchenko/Bioinformatics · 67 tokens

ai-science-enformer-regulatory

Predict CAGE/DNase/ATAC/ChIP-seq tracks from raw DNA with Enformer/Borzoi, run in-silico mutagenesis (ISM), and score noncoding variant effects. Use when predicting enhancer/promoter activity from sequence, running ISM, scoring a noncoding SNP, or prioritizing GWAS/eQTL variants.

Pavel-Kravchenko/Bioinformatics · 81 tokens