Rstudio ordered logit model

R programming language resources Forums Data manipulation Rstudio ordered logit model

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #907
    Marie
    Member

    Hi,
    I am working on R studio and want to apply an ordered logit/probit model.
    My commands are
    install.packages(“rms”)
    library(rms)
    G1.1<- read.csv(“C:/Users/XXX.csv”)
    attach(G1.1)
    Define variables
    Y <- cbind(Y)
    X <- cbind(X1, X2, …XXX)
    Xvar <- c(“X1”, “X2”, … “XXX”)
    Descriptive statistics
    summary(Y)
    summary(X)
    table(Y)
    table(Y)/sum(table(Y))
    Ordered logit model coefficients
    ddist<- datadist(Xvar)
    options(datadist=’ddist’)

    ologit<- lrm(Y ~ X, data=G1.1)
    print(ologit)

    It is working up to the last 2 commands (ologit<- lrm(Y ~ X, data=G1.1)
    print(ologit)) , for which I always obtain as the output :

    ologit<- lrm(Y ~ X, data=G1.1) singular information matrix in lrm.fit (rank= 25 ). Offending variable(s):
    X6 X8 Error in lrm(Y ~ X, data = G1.1) : Unable to fit model using “lrm.fit”
    print(ologit) Error in print(ologit) : object ‘ologit’ not found

    I dont understand why.
    I will be very glad to get your help about this. Thank you in advance.

    Marie

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Scroll to top
Privacy Policy