Why GLM for Poisson regression can get a standard error when degree of freedom is zero? I tried to run a Poisson Regression with only 1 observation unit, as a test to understand the glm package in R. It gets a point estimate as well as a standard error for the parameter. I was not surprised by the point estimate, but was confused about why it can get a standard error from only one observation?
And if we increase the value of y, the p-value gets smaller. I can't get my head over this as well ...
Case 1: y=1
df <- tibble(y =1, x=1)
object <- glm(y ~ 0 + x, family = "poisson", data=df)
summary(object)

# Call:
#     glm(formula = y ~ 0 + x, family = "poisson", data = df)
# 
# Deviance Residuals: 
#     [1]  0
# 
# Coefficients:
#     Estimate Std. Error z value Pr(>|z|)
# x 4.676e-11  1.000e+00       0        1
# 
# (Dispersion parameter for poisson family taken to be 1)
# 
# Null deviance:  0.0000e+00  on 1  degrees of freedom
# Residual deviance: -2.1865e-21  on 0  degrees of freedom
# AIC: 4
# 
# Number of Fisher Scoring iterations: 3

Case 2: y=10
df <- tibble(y =10, x=1)
object <- glm(y ~ 0 + x, family = "poisson", data=df)
summary(object)

# Call:
#     glm(formula = y ~ 0 + x, family = "poisson", data = df)
# 
# Deviance Residuals: 
#     [1]  0
# 
# Coefficients:
#     Estimate Std. Error z value Pr(>|z|)    
# x   2.3026     0.3162   7.281  3.3e-13 ***
#     ---
#     Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# 
# (Dispersion parameter for poisson family taken to be 1)
# 
# Null deviance: 2.8052e+01  on 1  degrees of freedom
# Residual deviance: 8.8818e-16  on 0  degrees of freedom
# AIC: 6.1571
# 
# Number of Fisher Scoring iterations: 3

And if I use OLS, then everything is as expected. I got a point estimate but no standard error.
df <- tibble(y =0, x=1)
object <- lm(y ~ 0 + x, data=df)
summary(object)

# Call:
#     lm(formula = y ~ 0 + x, data = df)
# 
# Residuals:
#     ALL 1 residuals are 0: no residual degrees of freedom!
#     
#     Coefficients:
#     Estimate Std. Error t value Pr(>|t|)
# x        0        NaN     NaN      NaN
# 
# Residual standard error: NaN on 0 degrees of freedom
# Multiple R-squared:    NaN,   Adjusted R-squared:    NaN 
# F-statistic:   NaN on 1 and 0 DF,  p-value: NA


The Poisson distribution has only one parameter, so one observation is enough to estimate it. Once you know that parameter you know both the mean and variance.
Then your second question:

And if we increase the value of y, the p-value gets smaller. I can't get my head over this as well ...

is in fact already answered at Poisson generalized linear model (glm) sample size
