| star_CI | R Documentation | 
For a linear regression model within the STAR framework, compute (asymptotic) confidence intervals for a regression coefficient of interest. Confidence intervals are computed by inverting the likelihood ratio test and profiling the log-likelihood.
star_CI(
  y,
  X,
  j,
  level = 0.95,
  include_plot = TRUE,
  transformation = "np",
  y_max = Inf,
  sd_init = 10,
  tol = 10^-10,
  max_iters = 1000
)
y | 
 
  | 
X | 
 
  | 
j | 
 the scalar column index for the desired confidence interval  | 
level | 
 confidence level; default is 0.95  | 
include_plot | 
 logical; if TRUE, include a plot of the profile likelihood  | 
transformation | 
 transformation to use for the latent data; must be one of 
  | 
y_max | 
 a fixed and known upper bound for all observations; default is   | 
sd_init | 
 add random noise for initialization scaled by   | 
tol | 
 tolerance for stopping the EM algorithm; default is 10^-10;  | 
max_iters | 
 maximum number of EM iterations before stopping; default is 1000  | 
the upper and lower endpoints of the confidence interval
The design matrix X should include an intercept.
# Simulate data with count-valued response y:
sim_dat = simulate_nb_lm(n = 100, p = 2)
y = sim_dat$y; X = sim_dat$X
# Select a transformation:
transformation = 'np'
# Confidence interval for the intercept:
ci_beta_0 = star_CI(y = y, X = X,
                   j = 1,
                   transformation = transformation)
ci_beta_0
# Confidence interval for the slope:
ci_beta_1 = star_CI(y = y, X = X,
                   j = 2,
                   transformation = transformation)
ci_beta_1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.