Rasheed
library(dplyr)
library(ggplot2)
Esta es mi base de datos para mi analisis
vector <- cbind(fecha=(2020,2021,2022,2023,2024),
Error: inesperado ',' en "vector <- cbind(fecha=(2020,"
library(readxl)
Abetos <- read_excel("Abetos.xlsx")
View(Abetos)
Abetos$DBH_SPEI <- as.numeric(Abetos$DBH_SPEI)
Abetos$delta_time <- as.numeric(Abetos$delta_time)
modelo <- lm(DBH_SPEI~delta_time, data = Abetos)
summary(modelo)
Call:
lm(formula = DBH_SPEI ~ delta_time, data = Abetos)
Residuals:
Min 1Q Median 3Q Max
-21.895 -8.466 -3.074 4.515 146.426
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 28.8543 0.6737 42.83 <2e-16 ***
delta_time -0.2320 0.0152 -15.27 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 13.94 on 3278 degrees of freedom
(784 observations deleted due to missingness)
Multiple R-squared: 0.06637, Adjusted R-squared: 0.06609
F-statistic: 233 on 1 and 3278 DF, p-value: < 2.2e-16
ggplot(Abetos, aes(x=delta_time, y=DBH_SPEI, color =
status))+
geom_point()+
theme_classic()