First of all, I'm aware that I can use var.test(x, y) for inference on the ratio of two population variances, but my question is regarding inference on one population variance.
According to this source, I should use the function varTest() to conduct a one-sample test on population variance. However, I get an error code whenever I try this, as R could not find this function:
x <- rnorm(50, mean = 4, sd = 1)
varTest(x, sigma.squared = 1) # sigma.squared is our null hypothesis for population variance
Error in varTest(x, sigma.squared = 1) :
could not find function "varTest"
This is what happens if I try to use var.test() for a one sample test on population variance:
x <- rnorm(50, mean = 4, sd = 1)
var.test(x, sigma.squared = 1)
Error in var.test.default(x, sigma.squared = 1) :
argument "y" is missing, with no default
No surprise for the second error as I think var.test() is reserved only for inference on the ratio of two population variances.
Is it the case that I'm supposed to use the function varTest, but I simply don't have the package which contains that function installed?
Background Information: I'm running RStudio Version 1.3.959 on macOS Catalina Version 10.15.6 This is a video of the statistical test that I'm trying to conduct in R.