add_noise_to_model: Add Noise to a Model

add_noise_to_modelR Documentation

Add Noise to a Model

Description

This function adds adjustable noise to a model while maintaining a specified level of randomness.

Usage

add_noise_to_model(model, random, nl)

Arguments

model

A numeric vector representing the original model.

random

A numeric vector representing random noise to be added.

nl

A numeric value specifying the noise level as a percentage.

Details

This function combines a model and random noise while allowing control over the degree of randomness in the resulting data. The 'nl' parameter defines the noise level as a percentage, where a higher value adds more randomness to the model.

The function scales the model and random noise vectors based on the specified noise level, ensuring that the original model remains a significant component. It then merges these scaled vectors to create the final data with the desired noise level.

Value

A numeric vector representing the model with added noise.


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.