Hi all this is the data and I have generated codes although I don't know if they are correct. I am looking for a conversation and details to see if I am on the right path.
Error in data.frame(Treatment = c("See Ad", "Not See Ad"), Naive = c(0.5, :
object 'buyRateNoSeeAd' not found
Hi, it is because byyRateNoSeeAd doesn't exist anywhere. It helps if you post the error alongside your reproducible code. Can you also make the post titles more informative (describing the issue). You could the greeting within the post if you wanted to.
would you comment on my part two of the project?
It runs on my end but I am still not sure that is the correct code
#2. calculate the weights. Put results in "result2".
# Length of the vector "result2" should be the same as the number of rows in data.
wghtmodel<-glm( formula= see.ad ~ buy * subscribe, family="binomial", data=data)
wght_df <- data.frame(wghtscr = predict(wghtmodel, type = "response"),
subscribe = wghtmodel$model$subscribe)
result2 <- wght_df