# bring in data from Excel using clipboard # method is not recommended for your real research as # there's no record of how the information got to the clipboard # AND - the clipboard must contain the data you want b <- read.table(file = "clipboard", header=TRUE) b # simple data frame for 1 length for each sex d1 <- expand.grid(length = 120, male = factor(c(1, 0))) d1 # build design matrix dm <- model.matrix(~male * length, data = d1) dm # matrix multiply X and beta-hats = log-odds d1$ln.odds <- as.vector(dm %*% as.vector(b$Estimate[1:4])) # backtransform with inverse logit to get phi-hats d1$phi <- plogis(d1$ln.odds) d1 qlogis(d1$phi) plogis(d1$ln.odds)