This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

GroupedData object

Table-like collection of data and metadata


The groupedData object is a table-like object that supports all the methods and properties of table and has two additional properties to identify the independent variable and an optional grouping variable. It also has additional methods that let you create doses from data set containing dosing data and convert a groupedData object to a table.

Constructor Summary

groupedDataCreate a groupedData object.

Method Summary

The groupedData object supports all methods of table and provides the following additional methods.

createDoses(groupedData)Create dose objects from groupedData object
groupedData2table (groupedData)Convert groupedData object to table


The groupedData object supports all properties of table and provides the following additional properties.

GroupVariableNameA character vector indicating the name of grouping variable that indicates the groups in the data. To indicate there are no groups (or just one group), set the property to the empty character vector ''.
IndependentVariableNameA character vector indicating the name of the independent variable in the data such as time. To indicate there is no independent variable, set the property to the empty character vector ''.


collapse all

This example uses data collected on 59 preterm infants given phenobarbital during the first 16 days after birth. Each infant received an initial dose followed by one or more sustaining doses by intravenous bolus administration. A total of between 1 and 6 concentration measurements were obtained from each infant at times other than dose times, for a total of 155 measurements. Infant weights and APGAR scores (a measure of newborn health) were also recorded. Data is described in [1], a study funded by the NIH/NIBIB grant P41-EB01975.

Load the sample dataset.

load pheno.mat ds

Create a groupedData object from the data set ds.

grpData = groupedData(ds);

Display the properties.

ans = 

                Description: 'This dataset was generated using sbionmimport.

       VariableDescriptions: {}
              VariableUnits: {}
             DimensionNames: {'Observations'  'Variables'}
                   UserData: []
                   RowNames: {}
              VariableNames: {'ID'  'Time'  'Dose'  'Response'}
          GroupVariableName: 'ID'
    IndependentVariableName: 'Time'

GroupVariableName and IndpendentVariableName have been automatically assigned to 'ID' and 'Time' respectively.


[1] Grasela Jr, T.H., Donn, S.M. (1985) Neonatal population pharmacokinetics of phenobarbital derived from routine clinical data. Dev Pharmacol Ther. 8(6), 374–83.

Introduced in R2014a

Was this topic helpful?