x<- c(3, 5, 10, 30, 50, 101) y <- c(-3.5, -4.6, -5.7, -6, -6.5, -7.2) relation <- lm(y~log(x)) print(summary(relation)) mycepheid<- data.frame(x = 19) result <- predict(relation,mycepheid) print(result) plot(log(x),y,col = "blue",main = "Period &Absolute magnitude Cepheid Regression", abline(lm(y~log(x))),cex = 1.3,pch = 16,xlab = "Log (Period) in days",ylab = "Absolute magnitude")
To embed this project on your website, copy the following code and paste it into your website's HTML: