当前位置:网站首页>How to create a linear model prediction interval in R and visualize it
How to create a linear model prediction interval in R and visualize it
2022-06-24 18:38:00 【Mrrunsen】
Linear regression model can For two things :
(1) Quantify the relationship between one or more predictors and response variables .
(2) Use models to predict future values .
About (2), When we use regression models to predict future values , We usually predict The exact value as well as An interval containing a series of possible values Interested in . This interval is called Prediction interval .
for example , Suppose we use Learning time As a predictive variable , Test results As a response variable to fit a simple linear regression model . Using this model , We can predict a learning 6 Hours of students will receive 91 The test results of .
however , Due to the uncertainty of this forecast , We might create a prediction interval , It means learning 6 Hours of students have 95% The opportunity to get 85 To 97 Between the exam results . This range of values is called 95% The prediction interval , It is usually better for us than It's more useful just to know the exact predicted value .
How to be in R Create forecast interval in
To show how R Create forecast interval in , We're going to use the built-in mtcars Data sets , It contains information about several different car features :
First , We will fit a simple linear regression model , Use disp As a predictive variable , mpg As a response variable .
#fit simple linear regression model
model <- lm边栏推荐
- On software requirement analysis
- How does the video platform import the old database into the new database?
- Number of occurrences of numbers in the array (medium difficulty)
- 110. balanced binary tree
- JS string method
- Differences between get and post request modes
- [quick news] the jeecgboot low code platform was successfully selected into the 2021 scientific innovation China · open source innovation list
- congratulate! The first dragon lizard community annual outstanding contribution award is announced. Check it now
- [golang] leetcode intermediate - jumping game & different paths
- Selection (032) - what is the output of the following code?
猜你喜欢

It is often blocked by R & D and operation? You need to master the 8 steps before realizing the requirements

Four security issues of low code and no code development

Leetcode weekly buckle 281

He "painted" what a smart city should look like with his oars

JS event details
![717.1-bit and 2-bit characters [sliding window]](/img/61/449566d2a8efbd403ae0361f839683.jpg)
717.1-bit and 2-bit characters [sliding window]

BOM(Browser Object Model)

微服务系统设计——接口文档管理设计

解决执行MapReduce程序控制台没有日志信息WARN Please initialize the log4j system properly

Software testing methods: a short guide to quality assurance (QA) models
随机推荐
JDBC writes Chinese garbled code to the database
Five advantages and disadvantages of Bi
Digital transformation informatization data planning and technology planning
Recommend 14 commonly used test development tools
Selection (032) - what is the output of the following code?
(Video + graphics) introduction to machine learning series - Chapter 11 support vector machines
Can the money invested in financial products be withdrawn at any time?
Creating a new MySQL user in Amazon RDS environment - creating a new MySQL user in Amazon RDS environment
Sudoku (easy to understand)
Recommend a distributed JVM monitoring tool, which is very practical!
On software requirement analysis
Flutter dart regular regexp matches non printing characters \cl\cj\cm\ck
Online sequence flow chart making tool
如何在 R 中执行幂回归
JS picture display and hiding cases
What if the database table structure changes? Smartbi products support one click synchronization
How about China Power Investment Xianrong futures? Is it safe to open futures accounts?
How MySQL works - Chapter 14
[can you really use es] Introduction to es Basics (I)
How can an enterprise successfully complete cloud migration?