Read theGDP by county dataset

library(readxl)
Data_GDP_Pengangguran_Inflasi <- read_excel("~/Data_GDP_Pengangguran_Inflasi.xlsx", 
range = "D3:G22")

Membuat Model Regresi

model<- lm(Data_GDP_Pengangguran_Inflasi)
summary(model)
## 
## Call:
## lm(formula = Data_GDP_Pengangguran_Inflasi)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.08655 -0.35664  0.08166  0.44659  0.66872 
## 
## Coefficients:
##                          Estimate Std. Error  t value Pr(>|t|)    
## (Intercept)            1983.68415    0.94371 2102.010   <2e-16 ***
## `Tingkat Pengangguran`    0.20607    0.07446    2.768   0.0144 *  
## Inflasi                  -0.11469    0.12033   -0.953   0.3556    
## GDP                       1.64521    0.03966   41.483   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5739 on 15 degrees of freedom
## Multiple R-squared:  0.9916, Adjusted R-squared:  0.9899 
## F-statistic: 591.1 on 3 and 15 DF,  p-value: 8.64e-16

Create sample data

<- c(15, 17, 19, 20, 22, 23.5, 25) TestScore<- c(680, 670, 660, 630, 660, 635) model01<- lm(TestScore~STR)

STR <- c(5)
TestScore <- c(680, 670, 660, 630, 660, 635)

data <- data.frame(STR, TestScore)
model01 <- lm(TestScore ~ STR, data = data)
summary(model01)
## 
## Call:
## lm(formula = TestScore ~ STR, data = data)
## 
## Residuals:
##       1       2       3       4       5       6 
##  24.167  14.167   4.167 -25.833   4.167 -20.833 
## 
## Coefficients: (1 not defined because of singularities)
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  655.833      8.002   81.96 5.12e-09 ***
## STR               NA         NA      NA       NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 19.6 on 5 degrees of freedom