use_seemingly_unrelated_regression: Bivariate regression for correlated observations

Description Usage Arguments Value Examples

View source: R/2a_parameter_estimation_functions.R

Description

Bivariate regression for correlated observations

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

1
2
3
4
5
6
7
8
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
)

packDAMipd documentation built on March 3, 2021, 5:07 p.m.