# NOT RUN {
# load data, e.g. the in-build mtcars dataset
data("mtcars")
data_oster <- mtcars
# preview of data
head(data_oster)
# load robomit
require(robomit)
# estimate beta*
o_beta(y = "mpg", # define the dependent variable name
x = "wt", # define the main independent variable name
con = "hp + qsec", # other control variables
delta = 1, # define delta. This is usually set to 1
R2max = 0.9, # define the max R-square.
type = "lm", # define model type
data = data_oster) # define dataset
# }
Run the code above in your browser using DataLab