attribute_sim_ind {npdsim} | R Documentation |
Simulate the Attributes with the Assumption of Independent Attributes
Description
Simulate the attributes for each product with the assumption that the attributes of shapes are independent of the attributes of levels. We mean by independence the fact that each attribute is related to one of the following: shape, level or nothing.
Usage
attribute_sim_ind(
product_shapes_and_levels,
attributes_number,
shape_attributes_number,
level_attributes_number
)
Arguments
product_shapes_and_levels |
A numeric dateframe of three columns: product_id, assigned_shape and assigned_level |
attributes_number |
The number of attributes |
shape_attributes_number |
The number of attributes assigned to shape |
level_attributes_number |
The number of attributes assigned to level |
Value
A numeric dateframe of the following columns: product_id, assigned_shape, assigned_level and attributes (as columns)
Examples
attribute_sim_ind(product_shapes_and_levels=
data.frame(product_id=1:4,assigned_shape=c(1,1,2,2),
assigned_level=c(5,3,3,3)),
attributes_number=15,
shape_attributes_number=7,
level_attributes_number=4)
[Package npdsim version 1.0.0 Index]