nobs: Extract the number of observations from smn.lmm and smsn.lmm...

View source: R/mainfunctions.R

nobsR Documentation

Extract the number of observations from smn.lmm and smsn.lmm fitted models

Description

Extract the total number of observations from a model fit (considering all repeated measurements from all subjects or clusters).

Usage

## S3 method for class 'SMN'
nobs(object, ...)
## S3 method for class 'SMSN'
nobs(object, ...)

Arguments

object

An object inheriting from class SMN or SMSN

...

Additional arguments.

Value

A single integer, expected to be equal to nrow(data).

See Also

smn.lmm, smsn.lmm, criteria

Examples

fm1 = smn.lmm(distance ~ age+Sex, data=nlme::Orthodont, groupVar="Subject")
nobs(fm1)

fernandalschumacher/lmmsmsn documentation built on Jan. 21, 2025, 1:24 a.m.