filteredNBDAdata: Filter out individuals from an nbdaData object or dTADAData...

Description Usage Arguments Details Value See Also

View source: R/filteredNBDAdata.R

Description

This function can be used to filter out individuals (or more generally lines of data). This removes them as learners only so their influence as potential transmitters of information is not removed.

Usage

1
filteredNBDAdata(nbdadata, filter, exclude)

Arguments

nbdadata

an object of class nbdaData or dTADAData

filter

a string specifying the part of the nbdaData or dTADAData object to use as a filter variable. Setting filter="id" is the best easiest way to filter specific individuals (see exclude below). Alternatively, the user could filter out individuals based on a specific ILV, e.g. filter="asocILVdata[,1]" uses the first asoc_ilv, filter="intILVdata[,2]" uses the second int_ilv and filter="multiILVdata[,1]" uses the first multi_ilv.

exclude

a vector specifying the cases to be excluded. If "id" is used as a filter the target individuals can be specified by concatenating as a string the label of the diffusion, "_", and the row number of the individual in assMatrix. e.g. if the diffusion label is "Diffusion1" and we wish to filter out individuals 5 and 11, we would specify exclude=c("Diffusion1_5","Diffusion1_11"). If we have specified a specific ILV as a filter, we provide a vector giving the values of the ILV to be excluded. e.g. if we have a sex ILV specifying males=-0.5 and females=0.5, we can use exclude=-0.5 to exclude males from the analysis.

Details

The user may wish to remove individuals from the NBDA to examine their influence on the results, or because they have good reason to consider them to be unrepresentative outliers. Removing these individuals from the diffusion when creating the nbdaData or dTADAData object has the disadvantage that it removes those individuals as potential transmitters of information thus breaking up pathways of social transmission. Using filteredNBDAdata to remove individuals retains their potential influence as transmitters of information but removes the as learners when fitting the model.

Value

An object of class nbdaData or dTADAData depending on the input data.

See Also

constrainedNBDAdata, nbdaData, dTADAData.


whoppitt/NBDA documentation built on April 25, 2021, 7:55 a.m.