getStandardErrors: Calculate numerical standard errors of estimated coefficients

Description Usage Arguments Value

View source: R/bsd_package.R

Description

getStandardErrors uses optimHess to numerically compute the hessian at the value of the estimated MLE, which can be obtained using EM.run. The function inverts the hessian and takes the square root of diagonal entries to yield standard errors for each coefficient estimate.

Usage

1
2
  getStandardErrors(betas, t.pat, num.patients,
    PATIENTDATA, patients.design, s1.seq, s2.seq)

Arguments

betas

A vector of numbers \mathbfβ = (\mathbfβ^λ, \mathbfβ^ν, \mathbfβ^μ)

t.pat

A number, the observation interval length

num.patients

An integer, number of unique patients

PATIENTDATA

A matrix in the form returned by MakePatientData containing the set of observation intervals

patients.design

A design matrix in the same form as returned by PatientDesignExample

s1.seq

A vector of complex arguments evenly spaced along the unit circle

s2.seq

A vector of complex arguments evenly spaced along the unit circle

Value

A vector the length of the coefficient vector, giving standard errors for each estimated coefficient


jasonxu90/bdsem documentation built on May 18, 2019, 5:54 p.m.