# generate example data
df <- data.frame(chats = c(2000, 3000, 4000, 3000), ses = c(100, 200, 150, 180),
Cont_var = c(100, 150, 100, 50))
# fit betta()
example_fit <- betta(formula = chats ~ Cont_var, ses = ses, data = df)
# generate point estimate and 95% CI for mean richness at Cont_var = 125
betta_lincom(fitted_betta = example_fit,
linear_com = c(1, 125)) # this tells betta_lincom to estimate value of beta_0 + 125*beta_1,
# where beta_0 is the intercept, and beta_1 is the (true value of the) coefficient on Cont_var
Run the code above in your browser using DataLab