linComboParam: Estimates and CIs for All Rows of a Design Matrix

Description Usage Arguments Value Examples

View source: R/linComboParam.R

Description

Estimates and CIs for All Rows of a Design Matrix

Usage

1
linComboParam(df, ind, dep, a, alpha = 0.95)

Arguments

df

, a named data frame

ind

, the index for the independent variable column

dep

, the indicies for the dependent variable columns

a

, parameter values

alpha

, confidence level

Value

a list of all the estimates and confidence intervals for the parameter values as set by the design matrix created by the independent and dependent variables; a pairs plot; a series of scatter plots for all of the dependent variables against the dependent variable, and a plot of the estimates and their confidence interval for every row of the design matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
clerical<-data.frame(Hours=c(128.5, 113.6, 146.6, 124.3, 100.4, 119.2, 109.5, 128.5, 131.2, 112.2),
Mail=c(7781,7004,7267,2129,4878,3999,11777,5764,7392,8100),
Gifts=c(100,110,61,102,45,144,123,78,172,126),
Charge=c(886,962,1342,1153,803,1127,627,748,876,685),
Returns=c(235,388,398,457,577,345,326,161,219,287),
Checks=c(644,589,1081,891,537,563,402,495,823,555)
)

lm1<-stats::lm(Hours~Mail+Gifts+Charge+Returns+Checks, data=clerical)
design<-stats::model.matrix(lm1)
a1<-matrix(c(0,1,-1,0,0,0), nrow=6)

coeff<-lm1$coefficients
l1<-coeff[2]-coeff[3]

linComboParam(clerical, 1, c(2,3,4,5,6), a1 )

s-huebler/regsisF20 documentation built on Oct. 15, 2020, 10:42 p.m.