R Tutorial with Bayesian Statistics Using OpenBUGS by Yau Chi
Author:Yau, Chi
Language: eng
Format: epub
Tags: COM077000
Publisher: Chi Yau
Published: 2013-09-17T04:00:00+00:00
Solution
We apply the function lm to a formula that describes the dependent variable eruptions by the independent variable waiting, and save the new linear regression model in a variable eruption.lm.
> attach(faithful) > eruption.lm = + lm(eruptions ~ waiting)
Then we create a data frame containing the waiting time parameter.
> newdata = data.frame(waiting=80)
We now apply the function predict by setting the predictor variable in the argument newdata. We also set the interval type as "predict", and use the default 0.95 confidence level.
> predict(eruption.lm, newdata, + interval="predict") fit lwr upr 1 4.1762 3.1961 5.1564 > detach(faithful) # clean up
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7441)
Supercharging Productivity with Trello by Brittany Joiner(6699)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6468)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6427)
Inkscape by Example by István Szép(6321)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(6015)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(5022)
Design Made Easy with Inkscape by Christopher Rogers(4655)
Customizing Microsoft Teams by Gopi Kondameda(4193)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3943)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3806)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3782)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3662)
Pandas Cookbook by Theodore Petrou(3638)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3437)
TCP IP by Todd Lammle(2995)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2926)
Exploring Microsoft Excel's Hidden Treasures by David Ringstrom(2909)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2887)
