当前位置:网站首页>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边栏推荐
- Four security issues of low code and no code development
- 国家出手了!对知网启动网络安全审查
- [NLP] 3 papers on how Stanford team builds a better chat AI
- Eight recommended microservice testing tools
- C language - structure II
- 解决执行MapReduce程序控制台没有日志信息WARN Please initialize the log4j system properly
- Selection (030) - what is the output of the following code?
- What are the grades of financial products?
- Common MySQL commands of installation free version
- Sudoku (easy to understand)
猜你喜欢

SAP license: what is ERP supply chain

Get max value of a bit column - get max value of a bit column

Regression testing strategy for comprehensive quality assurance system

Network security database penetration of secondary vocational group in 2022
[golang] leetcode intermediate - jumping game & different paths

微服务系统设计——数据模型与系统架构设计

Why are more and more people studying for doctors? Isn't it more and more difficult to graduate a doctor?

Ten software development indicators for project managers
Ultimate Guide: comprehensive analysis of log analysis architecture of Enterprise Cloud native PAAS platform

Recommend a distributed JVM monitoring tool, which is very practical!
随机推荐
Implementation of pure three-layer container network based on BGP
What are the reasons for the abnormal playback of the online channel of the channel accessed by easycvr national standard protocol?
Eight recommended microservice testing tools
Wechat applet development - Implementation of rotation chart
congratulate! The first dragon lizard community annual outstanding contribution award is announced. Check it now
Exception: Gradle task assembleDebug failed with exit code 1
Rapidssl getting started SSL certificate
Business based precipitation component = & gt; manage-table
云服务器类型怎么选,要考虑什么?
Easygbs video platform TCP active mode streaming exception repair
"2022" plans to change jobs and raise salary. It is necessary to ask interview questions and answers - browser
Three years of bug free, tips for improving code quality
如何在 R 中创建线性模型预测区间 并可视化
Leetcode topic [array] -216- combined sum III
Do you know CMDB?
Digital trend analysis of B2B e-commerce market mode and trading capacity in electronic components industry
(Video + graphics) introduction to machine learning series - Chapter 11 support vector machines
Get max value of a bit column - get max value of a bit column
Vite+web3:报错出现ReferenceError: process is not defined
Data modeling technology of Business Intelligence BI