Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help: Initial value's problem after updating

    Hello everyone,
    I estimated a GSEM framework two months ago. It took me a while to get the model to converge and I got all my final results. These results form part of my Ph.D thesis. Today, after a while I opened the Stata. When it opened, it asked for new updates and I accepted the request. Then I tried to run my codes for the GSEM again to check some results. But the model does not converge?!. I cannot get my previous results since it does not converge.
    I even tried to run older codes from 6 months ago when I also could get convergence. However, what I can get now is the message of "initial values not feasible".
    Please let me know what I should do to get my previous results.
    It is hard to get convergence and I have lost what I had before. Please help me and let me know what I can do.

    Best regards,
    Hossein

  • #2
    Try specifying the -from()- option with your earlier results as the starting values. (See -help maximize- for details.)

    By the way, it is the norm in this community to use our real first and last names as our username, to promote collegiality and professionalism. Unfortunately, the Forum software does not permit you to edit your username in your profile. So please click on CONTACT US in the lower right corner of this page, and ask the system administrator to change your user name. Your cooperation is appreciated.

    Comment


    • #3
      Dear Schechter,
      I sent a request to CONTACT US to change my user name as you suggested.

      Following your suggestion, I have tried to construct a vector of the initial values for the coefficients. However, the methods proposed in the "help maximize" does not give me the proper way of defining the initial vector since it does not specify which coefficient is related to which equation.

      The GSEM model that I am estimating has three equations. Some of the explanatory variables appear in all of three equations. I ran a simple version of the model and I looked at the estimated vector of coefficients. It seems that I should somehow define the name of each dependent variable (or equation) in the initial vector such as the one that i got from the Stata in the attached file. (any_credit, bus_credi~c, and reve~5_miss are the three dependent variables).

      Should I define the name of the dependent variables in the initial vector? if yes, how?
      Would you please let me know how I should construct either such an initial vector with the coefficients of all equations specified in it, or how I should construct the option from() in a proper way in the original command.
      I hope by constructing that vector I can get my original results again.

      I really appreciate your help.
      Hossein
      Attached Files

      Comment


      • #4
        Hello everyone,
        Following professor Clyde Schechter's suggestion, I have been struggling with introducing the estimated coefficients that I have as initial values in “from()” option of gsem.

        I ran a simple model and extracted its estimated coefficients. I introduced the estimated coefficients in a new vector, AA, and I used "from()" option to run the model again.( More information in the attached file)
        But the model did not run and I got the following error messages:

        initial vector: extra parameter c1 found
        specify skip option if necessary


        I even dropped the coefficients of intercept from vector AA and it did not work again.

        Please let me know how I should construct the initial vector of coefficients such that I can properly define the coefficients of each explanatory variable and latent variable in each equation for from()" option.

        Thanks for your help.

        Hossein
        Attached Files

        Comment


        • #5
          First try the suggestion that Stata gave you: specify the skip option (it's actually a sub-option within -from()-.

          In future postings, please do not post attachments of Word documents. Some of the high-frequency responders here do not use Microsoft Office. And even among those that do, some are reluctant to download an Office documents from strangers, as they can contain active malware. The helpful way to show Stata output and code is to paste it directly here, surrounded by code delimiters. Please see FAQ #12 for instructions about using code delimiters.

          Comment


          • #6
            I tried using the "skip" option, but the model still does not converge.

            The main problem is that I do not know how to specify initial values for the coefficients in a vector as it is specified in a vector like b2 when we use
            Code:
            matrix b2=e(b)
            after estimating a gsem.

            For example I have estimated a simple gsem framework with two equations such as:

            Code:
            gsem  (any_credit <- L@1  lnrevenue corporate multiowner   exclusion_selc1  ,probit)  (bus_credit_selc <- L lnrevenue corporate multiowner credit_score intell_property  tang_asset , probit ) ,   intpoints(2)  startvalues(iv)  intmethod(ghermite) latent(L) var(L@1) from(AA, skip)
            and I have used the following command to extract its estimated coefficients:

            Code:
            Code:
            matrix b2=e(b)
            that gives me the following vector after using command
            Code:
            matrix list b2
            .:

            Code:
            b2[1,15]
                  any_credit:   any_credit:   any_credit:   any_credit:   any_credit:   any_credit:  bus_credi~c:
                   lnrevenue     corporate    multiowner  exclusion~c1             L         _cons     lnrevenue
            y1     .08952659     .34347262     .03402287     .03420072             1      .0857412     .01949632
            
                 bus_credi~c:  bus_credi~c:  bus_credi~c:  bus_credi~c:  bus_credi~c:  bus_credi~c:  bus_credi~c:
                   corporate    multiowner  credit_score  intell_pro~y    tang_asset             L         _cons
            y1     .36598826     .10326346    -.12356629     .10978783     .02413985     .04998298     .03133954
            
                      var(L):
                       _cons
            y1             1
            Now that I have the estimated initial values for this model, I do not know how I should put them in a vector such as AA and use it in the "from(AA)" option to function similar to using the above vector b2 in the "from(b2)" option.

            For example, using the above estimated coefficients to build a new vector like AA as below:

            Code:
            matrix AA=[.08952659,.34347262, .03402287 ,.03420072 ,1,.0857412 ,.01949632,.36598826,.10326346,-.12356629, .10978783,.02413985,.04998298 ,.03133954,1]
            Then if I use the "from(AA)" option , it does not function like using "from(b2)" as option. When I use "from(AA)" option, I get the messages like:

            initial vector: extra parameter c1 found
            specify skip option if necessary


            There should a way that I can specify AA such that "from(AA)" functions the same as using from(b2).

            I need to know how stata defines the element in vector b2 above. If I know that then I can build the vector AA in the same way.

            Please let me know how I should construct the initial vector of coefficients such that I can properly define the coefficients of each explanatory variable, latent variable, and the variance of latent variables in each equation.

            Is there anyone who knows the way that the vector e(b) is defined after the estimation of a gsem command?

            Thanks for your help and your time.

            Best regards,
            Hossein


            Comment


            • #7

              I have been trying to follow the instructions for using delimiters for posting my materials. I could see whatever I wrote through preview perfectly, but when I post it, it does not show up and I get a message such as "unapproved". I am attaching what I have been trying to post.
              Please let me know what might be the problem that I cannot post my messages when I am using the delimiters.

              Thank you.
              Attached Files

              Comment


              • #8
                Dear Hossein,
                In your example the matrices AA and b2 have the same elements but are not identical. As you show them, each element in b2 has a column name and a column equation name, which are used to determine what value should be used as initial value in your maximization problem. In AA, they are just a list of numbers, which if you look carefully has the standard names of "c1 c2 c3..." for columns.
                For establishing initial values, Column labels matters, unless you include (or at least you can do that in other maximization commands such as -ml-) a "copy" option in the maximization. For example from(AA,copy).
                HTH
                Fernando

                Comment


                • #9
                  Dear Fernando,
                  I tried your suggestion by using
                  Code:
                  from(AA,copy)
                  , but it still does not work and gives the following message:

                  invalid from() option;
                  option copy not allowed

                  I need to know how I can add to the columns the names of equations and variables in those equations as it has been specified for b2.

                  Is there anyone who know how I can add the names of equations and their variables as column labels to construct a vector AA like vector b2 that is based on
                  Code:
                  matrix b2=e(b)
                  ?

                  Thanks for any help and your time.

                  Hossein

                  Comment


                  • #10
                    Look into this
                    https://www.stata.com/manuals13/pmatrixrownames.pdf

                    Comment


                    • #11
                      Thanks Fenando. The instructions in the above file was helpful for the example.
                      But I have not yet tried it with my original model to see if I would be able to get back its convergence and my final results that I had before I accept the updating request.

                      Hossein

                      Comment

                      Working...
                      X