Created
June 22, 2022 13:16
-
-
Save DATAUNIRIO/fb6b18cc330877ca8ee031e69c5eed5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| salario <- rnorm(200,4000,15) | |
| salario <- round(salario,2) | |
| anos_de_empresa<- salario/1000 + rnorm(200,0,5) | |
| anos_de_empresa<- anos_de_empresa + 10 | |
| anos_de_empresa<- round(anos_de_empresa) | |
| plot(anos_de_empresa,salario) | |
| min(anos_de_empresa) | |
| modelo <- lm(salario ~ anos_de_empresa) | |
| bptest(modelo) | |
| bptest(modelo) | |
| #The test statistic is 4.0861 and the corresponding p-value is 0.1296. Since the p-value is not less than 0.05, we fail to reject the null hypothesis. We do not have sufficient evidence to say that heteroscedasticity is present in the regression model. | |
| dados <- data.frame(salario,anos_de_empresa) | |
| dados_aula_regressao <-dados | |
| write.csv(dados_aula_regressao, file = "dados_aula_regressao.csv",row.names = FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment