forked from ucdavis-sta141c-2021-winter/blblm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTA 141C Final Project by, Jeffrey Ugochukwu.html
354 lines (319 loc) · 49.7 KB
/
STA 141C Final Project by, Jeffrey Ugochukwu.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html>
<!-- saved from url=(0094)file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="pandoc">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>STA 141C Final Project by, Jeffrey Ugochukwu</title>
<script src="data:application/javascript;base64,Ly8gUGFuZG9jIDIuOSBhZGRzIGF0dHJpYnV0ZXMgb24gYm90aCBoZWFkZXIgYW5kIGRpdi4gV2UgcmVtb3ZlIHRoZSBmb3JtZXIgKHRvCi8vIGJlIGNvbXBhdGlibGUgd2l0aCB0aGUgYmVoYXZpb3Igb2YgUGFuZG9jIDwgMi44KS4KZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignRE9NQ29udGVudExvYWRlZCcsIGZ1bmN0aW9uKGUpIHsKICB2YXIgaHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCJkaXYuc2VjdGlvbltjbGFzcyo9J2xldmVsJ10gPiA6Zmlyc3QtY2hpbGQiKTsKICB2YXIgaSwgaCwgYTsKICBmb3IgKGkgPSAwOyBpIDwgaHMubGVuZ3RoOyBpKyspIHsKICAgIGggPSBoc1tpXTsKICAgIGlmICghL15oWzEtNl0kL2kudGVzdChoLnRhZ05hbWUpKSBjb250aW51ZTsgIC8vIGl0IHNob3VsZCBiZSBhIGhlYWRlciBoMS1oNgogICAgYSA9IGguYXR0cmlidXRlczsKICAgIHdoaWxlIChhLmxlbmd0aCA+IDApIGgucmVtb3ZlQXR0cmlidXRlKGFbMF0ubmFtZSk7CiAgfQp9KTsK"></script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">
code {
white-space: pre;
}
.sourceCode {
overflow: visible;
}
</style>
<style type="text/css" data-origin="pandoc">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
var sheets = document.styleSheets;
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
for (var j = 0; j < rules.length; j++) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
}
}
})();
</script>
<link rel="stylesheet" href="data:text/css,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0Aa%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%0A" type="text/css">
<script type="text/javascript" src="./STA 141C Final Project by, Jeffrey Ugochukwu_files/MathJax.js.download"></script><style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 2px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 2px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: 1em}
.MathJax_MenuRadioCheck.RTL {right: 1em; left: auto}
.MathJax_MenuLabel {padding: 2px 2em 4px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #CCCCCC; margin: 4px 1px 0px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: Highlight; color: HighlightText}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style><style type="text/css">.MathJax_Preview .MJXf-math {color: inherit!important}
</style><style type="text/css">.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1em; bottom: 1.5em; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><style type="text/css">.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > * {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style></head>
<body><div id="MathJax_Message" style="display: none;"></div>
<h1 class="title toc-ignore">STA 141C Final Project by, Jeffrey Ugochukwu</h1>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(blblm)</span>
<span id="cb1-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(furrr)</span>
<span id="cb1-3"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> Loading required package: future</span></span>
<span id="cb1-4"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(bench)</span></code></pre></div>
<p>Hello, so I will go through the basic documentation for the features in the <code>blblm</code> package. To explain the basics of the exported features, we shall start with the main <code>blblm()</code> function call.</p>
<p>To explain what this function is supposed to do, this essentially builds the linear regression model within various datasets. To go more into the source code regarding the <code>blblm()</code> function, the first thing that was necessary to do was to use <code>set.seed()</code> where it basically sets a generation of random numbers to have more consistent results when building the linear regression model. The <code>data_list</code> variable splits the data into two parts and the <code>estimates</code> variable maps the split data and the actual linear regression model function (<code>lm()</code>) to directly apply the parallelization. The if and else statements give the user a choice to set up how many CPU cores are necessary to apply the parallelization. The base case is about if there was the case that parallelization isn’t applied (<code>parallel = FALSE</code>), then the function would only use one CPU core. Otherwise, it would use more than one.</p>
<p>Another thing to mention is that this is updated from the original function for the package that’s written below. The thing about the original is that it purely only ran on one CPU core since it didn’t really give users the choice to actually decide if they would like implement more than one CPU core since there wasn’t a setting to use parallelization, the updated version does the opposite of this by adding the <code>parallel = TRUE</code> parameter in the <code>blblm()</code> function.</p>
<p>This would be a benchmark comparing how using the <code>blblm()</code></p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">set.seed</span>(<span class="dv">100</span>)</span>
<span id="cb2-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-2" aria-hidden="true" tabindex="-1"></a>bench<span class="sc">::</span><span class="fu">mark</span>(<span class="fu">blblm</span>(mpg <span class="sc">~</span> wt <span class="sc">*</span> hp, <span class="at">data =</span> mtcars, <span class="at">m =</span> <span class="dv">3</span>, <span class="at">B =</span> <span class="dv">100</span>, <span class="at">parallel =</span> <span class="cn">TRUE</span>), <span class="fu">blblm</span>(mpg <span class="sc">~</span> wt <span class="sc">*</span> hp, <span class="at">data =</span> mtcars, <span class="at">m =</span> <span class="dv">3</span>, <span class="at">B =</span> <span class="dv">100</span>, <span class="at">parallel =</span> <span class="cn">FALSE</span>), <span class="at">check =</span> <span class="cn">FALSE</span>)</span>
<span id="cb2-3"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-4"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-5"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-6"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-7"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-8"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-9"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-10"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-11"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-11" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-12"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-13"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-14"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-14" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-15"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-15" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-16"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-16" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-17"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-17" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-18"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-18" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-19"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-19" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-20"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-20" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-21"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-21" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-22"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-22" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-23"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-23" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-24"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-24" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-25"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-25" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-26"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-26" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-27"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-27" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-28"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-28" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-29"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-29" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-30"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-30" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-31"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-31" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-32"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-32" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-33"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-33" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-34"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-34" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-35"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-35" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-36"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-36" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-37"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-37" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-38"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-38" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-39"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-39" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-40"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-40" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-41"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-41" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-42"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-42" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-43"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-43" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-44"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-44" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-45"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-45" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb2-46"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-46" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb2-47"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-47" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb2-48"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-48" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb2-49"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-49" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb2-50"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-50" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb2-51"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-51" aria-hidden="true" tabindex="-1"></a><span class="co">#> # A tibble: 2 x 6</span></span>
<span id="cb2-52"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-52" aria-hidden="true" tabindex="-1"></a><span class="co">#> expression min</span></span>
<span id="cb2-53"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-53" aria-hidden="true" tabindex="-1"></a><span class="co">#> <bch:expr> <bch:tm></span></span>
<span id="cb2-54"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-54" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1 blblm(mpg ~ wt * hp, data = mtcars, m = 3, B = 100, parallel = TRUE) 2.28s</span></span>
<span id="cb2-55"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-55" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2 blblm(mpg ~ wt * hp, data = mtcars, m = 3, B = 100, parallel = FALSE) 523.44ms</span></span>
<span id="cb2-56"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-56" aria-hidden="true" tabindex="-1"></a><span class="co">#> # ... with 4 more variables: median <bch:tm>, itr/sec <dbl>,</span></span>
<span id="cb2-57"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb2-57" aria-hidden="true" tabindex="-1"></a><span class="co">#> # mem_alloc <bch:byt>, gc/sec <dbl></span></span></code></pre></div>
<p>As we can see, setting parallel to FALSE will give a faster processing speed for producing the actual model. It makes sense why because setting parallel to FALSE only would require the computer to use one CPU unit, but it’s still a great thing that we gave the user the choice to pick since this could use more of the computers CPU cores to process a large scale of data.</p>
<p>This shows an example of how the <code>blblm()</code> function properly works.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-1" aria-hidden="true" tabindex="-1"></a>fit <span class="ot">=</span> <span class="fu">blblm</span>(mpg <span class="sc">~</span> wt <span class="sc">*</span> hp, <span class="at">data =</span> mtcars, <span class="at">m =</span> <span class="dv">3</span>, <span class="at">B =</span> <span class="dv">100</span>, <span class="at">parallel =</span> <span class="cn">TRUE</span>)</span>
<span id="cb3-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> Warning: UNRELIABLE VALUE: Future ('<none>') unexpectedly generated random</span></span>
<span id="cb3-3"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers without specifying argument 'seed'. There is a risk that those random</span></span>
<span id="cb3-4"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are not statistically sound and the overall results might be invalid.</span></span>
<span id="cb3-5"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random</span></span>
<span id="cb3-6"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use</span></span>
<span id="cb3-7"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="co">#> 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".</span></span>
<span id="cb3-8"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-8" aria-hidden="true" tabindex="-1"></a>fit</span>
<span id="cb3-9"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="co">#> blblm model: mpg ~ wt * hp</span></span></code></pre></div>
<p>This would show how the model is fitted through using blblm as a parallelized linear regression model.</p>
<p>Now we’re going to explain about the <code>print.blblm()</code> function. The point of this function is to basically print the results gained from the parallelized version of the linear regression model once it has been built.</p>
<p>This is an example of the <code>sigma.blblm()</code> function which gives the parallelized version of the standard deviation for the regression model (you can also use the standard <code>sigma()</code> function).</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sigma</span>(fit)</span>
<span id="cb4-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] 1.520515</span></span></code></pre></div>
<p>As you can see, this gives the standard deviation of our regression model using the multiple levels of processing from allowing the user to use the optimal amount of cores that exist within their computer.</p>
<p>This is an example of the <code>coef.blblm()</code> function that calculates the coeficients of the regression model, but utilizing more of the CPU cores given through parallelization (can also use <code>coef()</code> function).</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">coef</span>(fit)</span>
<span id="cb5-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> (Intercept) wt hp wt:hp </span></span>
<span id="cb5-3"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> 55.62962178 -10.63789098 -0.17923302 0.04865653</span></span></code></pre></div>
<p>As we can see, the function gives us more precise values of the coefficients of the regression model through the use of CPU cores processing higher levels of data at once.</p>
<p>This is an example of the <code>confint.blblm()</code> function that calculates the confidence interval of giving the range for the true value within the linear regression model (can also use <code>confint()</code>).</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">confint</span>(fit)</span>
<span id="cb6-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2.5% 97.5%</span></span>
<span id="cb6-3"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> wt -13.90125550 -7.27033854</span></span>
<span id="cb6-4"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> hp -0.25750686 -0.10418725</span></span>
<span id="cb6-5"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> wt:hp 0.02481545 0.07390766</span></span></code></pre></div>
<p>As we can see, the function was successfully able to compute the confidence interval values through a higher processing speed.</p>
<p>The final function that will be showcased is the <code>predict.blblm()</code> function which predicts the closest value that could represent the true value of the predictor variable within our regression model. There will be a jump in performance due to the greater accessibility to the amount of CPU cores your computer has (can also use <code>predict()</code>).</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">predict</span>(fit, <span class="fu">data.frame</span>(<span class="at">wt =</span> <span class="fu">c</span>(<span class="fl">2.5</span>, <span class="dv">3</span>), <span class="at">hp =</span> <span class="fu">c</span>(<span class="dv">150</span>, <span class="dv">170</span>)), <span class="at">confidence =</span> <span class="cn">TRUE</span>)</span>
<span id="cb7-2"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> fit lwr upr</span></span>
<span id="cb7-3"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1 20.39614 18.88520 21.63640</span></span>
<span id="cb7-4"><a href="file:///C:/Users/Admin/AppData/Local/Temp/RtmpcJTKte/preview-5b8052487804.dir/my-vignette.html#cb7-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2 18.06116 16.76075 19.15105</span></span></code></pre></div>
<p>As we can see, the model was able to predict the value that was closer to the true value of our predictor variable. Overall, this package has proven itself to be very beneficial in allowing your local computer to have an easier time conducting statistical computation of values, while still using the optimal amount of processing power to work with an form of data no matter the size.</p>
<!-- code folding -->
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body></html>