Description Usage Arguments Value Examples
Estimate and CI for Linear Combination of Parameters
1 | linCombo(Y, X, a, l, alpha = 0.95)
|
Y, |
a vector of outputs |
X |
, a design matrix |
a |
, parameter values |
l |
, a number (estimate of output given parameters) |
alpha |
, confidence level |
, a confidence interval and pairs figure
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]
linCombo(clerical$Hours, design, a1, l1 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.