Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9120761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:41:47+00:00 2026-06-17T05:41:47+00:00

I have a conjoint survey data in long format. the first few rows look

  • 0

I have a conjoint survey data in long format. the first few rows look like this:

 ID alt choice size tar length brand flavor gender age yr_smoke num_smoke job
 1  1   1     no    1   1      1     1      1      2  35       10        20   1
 2  1   2     no    1   1      1     1      1      2  35       10        20   1
 3  1   3     no    1   1      1     1      1      2  35       10        20   1
 4  1   4     no    1   1      1     1      1      2  35       10        20   1
 5  1   5     no    1   1      1     1      1      2  35       10        20   1
 6  1   6     no    1   1      1     1      1      2  35       10        20   1

I used mlogit.data as:

data_mlogit_ct1_test2 <- mlogit.data(data_mlogit_ct1_test1,choice="choice",
shape="long",alt.var="alt")

The first few rows of the transformed data looks like:

   ID alt choice size tar length brand flavor gender age yr_smoke num_smoke job
   1.1  1   1  FALSE    1   1      1     1      1      2  35       10        20   1
   1.2  1   2  FALSE    1   1      1     1      1      2  35       10        20   1
   1.3  1   3  FALSE    1   1      1     1      1      2  35       10        20   1
   1.4  1   4  FALSE    1   1      1     1      1      2  35       10        20   1
   1.5  1   5  FALSE    1   1      1     1      1      2  35       10        20   1
   1.6  1   6  FALSE    1   1      1     1      1      2  35       10        20   1

Now I am trying to fit mlogit as:

 fit_mlogit_ct11 <- mlogit(choice~size+tar+length+brand+flavor, 
                           data_mlogit_ct1_test1,shape="long",chid.var="ID",
                           alt.var="alt",method="bfgs",heterosc=TRUE,tol=10)

I got this error:

Error in solve.default(crossprod(attr(x, “gradi”)[, !fixed])) :
Lapack routine dgesv: system is exactly singular

Then I did:

  fit_mlogit_ct11 <- mlogit(choice~size+tar+length+brand+flavor, data_mlogit_ct1_test2)

Now I got:

Error in solve.default(H, g[!fixed]) :
system is computationally singular: reciprocal condition number = 3.4767e-18

Can somebody please help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:41:49+00:00Added an answer on June 17, 2026 at 5:41 am

    I think the problem is because you did not define right your individual specific variables. According to the package manual, when you build your models with mlogit function you can use : | to separate the alternative specific with individual specific variables. For example:

    fit_mlogit_ct11 <- mlogit(choice~1|size+tar+length+brand+flavor, 
                               data_mlogit_ct1_test1,shape="long",chid.var="ID",
                               alt.var="alt",method="bfgs",heterosc=TRUE,tol=10)
    

    Which simply says that all your variables are individual specific and your take only the intercept for the alternative specific. But indeed as it has already mentioned above your data look odd since they look the same, since you have only individual specific variables. This leads eventually to singularity (your variables correlate with each other with 1).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
have Intel Core i7 laptop with 8 GB ram. This is my first time
Have not done this before ( except in java , look how Steve McLeod
Have a look at this snippet: #include <string> #include <iostream> #include <vector> using namespace
Have a look at the menu link Produkter on http://marckmann.se/ I would like to
Have a look at this code: #include <iostream> using namespace std; int main() {
Have a look to this code snippet:- -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength:
Have a text box which get data for price. If someone enter something like
Have a look at this JSFiddle: http://jsfiddle.net/kZ3Af/25/ I have the base navigation pinned down
have written this little class, which generates a UUID every time an object of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.