nbdaPropSolveByST: Estimate the proportion of events that occured by social...

Description Usage Arguments Details Value Estimating propST corresponding to the upper and lower endpoints of a C.I. for s (single network) Estimating propST corresponding to the upper and lower endpoints of a C.I. for s (multiple networks) See Also

View source: R/oadaPropSolveByST.R

Description

Generates a table giving the predicted proportion of events that occured by social transmission (propST or expressed as a %) via each network, as predicted by the fitted model.

Usage

1
2
nbdaPropSolveByST(par = NULL, nbdadata = NULL, model = NULL,
  type = "social", exclude.innovations = T, innovations = NULL)

Arguments

par

optional numeric giving the parameter values. Not necessary if model is specified.

nbdadata

object of class nbdaData, list of objects of class nbdaData, object of class dTADAData or list of objects of class dTADAData. Not necessary if model is specified.

model

object of class oadaFit or tadaFit.

type

string determining whether the estimates are for an "asocial" or "social" model. This is taken from model if provided.

exclude.innovations

logical determining whether innovation events (the first individual to learn in each diffusion) should be excluded from the calculation- since we know the innovation events must occur by asocial learning not social transmission.

innovations

numerical giving the number of innovations across all diffusions. By default this is assumed to be one innovator per diffusion in which there were no demonstrators (see demons argument in nbdaData)

retainInt

logical, can be used to force the model to retain int_ilvs in an asocial model. This is used internally by other functions when there is an offset on the s parameters, but can usually be safely ignored by the user.

Details

The user can provide the name of a model- in which case the MLEs of that model are input as parameter values. Instead the user can input their own parameter values in which case nbdadata must also be provided. The function works for multiple diffusions. A column is also provided for P(S offset), which gives propST for transmission via network effects that have been allocated to the offset fo s parameters, see constrainedNBDAdata.

Value

A dataframe giving the predicted proportion of events that occured by social transmission via each network.

Estimating propST corresponding to the upper and lower endpoints of a C.I. for s (single network)

Ideally, one needs to optimize the other parameters in the model while fixing s to its upper and lower limits. This can be done as follows:

  1. Create a new nbdadata or dTADAData object using constrainedNBDAdata which has the upper limit of s set as an offset for s using the offsetVect argument.

  2. Fit an ASOCIAL model to the new constrained data, using oadaFit or tadaFit.

  3. Use nbdaPropSolveByST to estimate propST, noting that the relevant figure will be contained in the P(S offset) column.

  4. Repeat for the lower limit for s.

Estimating propST corresponding to the upper and lower endpoints of a C.I. for s (multiple networks)

This can be done as follows:

  1. Create a new nbdadata or dTADAData object using constrainedNBDAdata with the target s parameter constrained to s=0 using the constraintsVect argument AND an offset equal to its upper limit using the offsetVect argument.

  2. Fit a SOCIAL model to the new constrained data, using oadaFit or tadaFit.

  3. Use nbdaPropSolveByST to estimate propST, noting that the relevant figure will be contained in the P(S offset) column.

  4. Repeat for the lower limit for the target s parameter.

See Also

nbdaPropSolveByST.byevent


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