Skip to content

sam::GRMDataStrategy

Module: Data Strategies

Simulate data based on General Graded Response Model. More...

#include <DataStrategy.h>

Inherits from sam::DataStrategy

Public Classes

Name
struct Parameters

Public Functions

Name
GRMDataStrategy() =default
GRMDataStrategy(const Parameters & p)
virtual void genData(Experiment * experiment) override
Generates data based on the selected DataModel.
virtual std::vector< arma::Row< float > > genNewObservationsForAllGroups(Experiment * experiment, int n_new_obs) override
Generates n_new_obs new observations for each group.

Additional inherited members

Public Types inherited from sam::DataStrategy

Name
enum DataModel

Public Functions inherited from sam::DataStrategy

Name
std::unique_ptr< DataStrategy > build(json & data_strategy_config)
DataStrategy Factory Method.
virtual ~DataStrategy() =0
Pure destructors of the DataStrategy abstract class.

Detailed Description

class sam::GRMDataStrategy;

Simulate data based on General Graded Response Model.

Note: :

  • DVs in GRM are distinguished by their participant abilities to answer tests. Therefore, we'll have ng_ number of abilities. This value is being used to, in each group, to initialize a normal distribution of \theta ~ N(abilities[i], 1).
  • β

Public Functions Documentation

function GRMDataStrategy

GRMDataStrategy() =default

function GRMDataStrategy

GRMDataStrategy(
    const Parameters & p
)

Some initialization

function genData

virtual void genData(
    Experiment * experiment
) override

Generates data based on the selected DataModel.

Parameters:

Reimplements: sam::DataStrategy::genData

Populates the experiment->groups_->measurements with data based on the parameters specified in setup.

function genNewObservationsForAllGroups

virtual std::vector< arma::Row< float > > genNewObservationsForAllGroups(
    Experiment * experiment,
    int n_new_obs
) override

Generates n_new_obs new observations for each group.

Parameters:

  • experiment The pointer to the current experiment
  • n_new_obs The number of new observations to be generated

Return: An array of new observations

Reimplements: sam::DataStrategy::genNewObservationsForAllGroups


Updated on 29 June 2021 at 16:13:47 CEST


Last update: 2021-09-18