score vector of logistic regression model

I have following logistic regression model. I have written the log likelihood function and score function. but now i am confused how to calculate the score vector.

mydata <- read.csv("")

view the first few rows of the data

mydata$rank <- factor(mydata$rank)

mylogit <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial")
loglikfn <- function(b, y, X, o=0){
mu <- exp(o+X%%b)
%X%*%b - sum(mu)

scorefn <- function(b, y, X, o=0){
mu <- exp(o+X%%b)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.