use_seemingly_unrelated_regression {packDAMipd} | R Documentation |
Bivariate regression for correlated observations
Description
Bivariate regression for correlated observations
Usage
use_seemingly_unrelated_regression(
param1_to_be_estimated,
param2_to_be_estimated,
dataset,
indep_var,
covariates1,
covariates2,
interaction1,
interaction2
)
Arguments
param1_to_be_estimated |
parameter of interest |
param2_to_be_estimated |
parameter of interest |
dataset |
data set to be provided |
indep_var |
the independent variable (column name in data file) |
covariates1 |
list of covariates - for equation 1 |
covariates2 |
list of covariates - for equation 2 |
interaction1 |
boolean value to indicate interaction - for equation 1 |
interaction2 |
boolean value to indicate interaction - for equation 2 false by default |
Value
the results of the regression analysis
Examples
datafile <- system.file("extdata", "sureg_data.csv", package = "packDAMipd")
dataset <- read.csv(datafile, stringsAsFactors = TRUE)
results_sureg <- use_seemingly_unrelated_regression("read", "math",
dataset = dataset,
indep_var = "female", covariates1 = c("as.numeric(ses)", "socst"),
covariates2 = c("as.numeric(ses)", "science"), interaction1 = FALSE,
interaction2 = FALSE
)
[Package packDAMipd version 1.1.0 Index]