Announcement

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

  • Download collin command for stata and suitable value for vif ?

    I use command findit collin, and scroll to the last, then click


    collin from https://stats.idre.ucla.edu/stat/stata/ado/analysis
    collin. Collinearity Diagnostics / Philip B. Ender / Statistical Computing
    and Consulting / UCLA Office of Academic Computing / [email protected] /
    STATA ado and hlp files in the package / distribution-date: 20101123

    but then it appear like this
    unknown network protocol
    https://stats.idre.ucla.edu/stat/stata/ado/analysis/ either
    1) is not a valid URL, or
    2) could not be contacted, or
    3) is not a Stata download site (has no stata.toc file).


    how can i download this command, please help

    anyway, i am running the fixed model for data panel, and trying to use collin to know the vif, what should be the value for vif suitable for checking collin ?
    Last edited by Lenny Tran; 22 Feb 2019, 07:33.

  • #2
    More can be found here on this subject.
    To download, run this code:
    Code:
    net describe collin, from(https://stats.idre.ucla.edu/stat/stata/ado/analysis)
    and use:

    (click here to install)

    All the best.
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Originally posted by ericmelse View Post
      More can be found here on this subject.
      To download, run this code:
      Code:
      net describe collin, from(https://stats.idre.ucla.edu/stat/stata/ado/analysis)
      and use:

      (click here to install)

      All the best.
      when i run the code you give, it still give like this
      Click image for larger version

Name:	collin.PNG
Views:	1
Size:	8.4 KB
ID:	1485038


      im currrently using stata12

      Comment


      • #4
        My guess is that you're using an older version of Stata that doesn't support https. Please note from the FAQ

        11. What should I say about the version of Stata I use?

        The current version of Stata is 15.1. Please specify if you are using an earlier version; otherwise, the answer to your question may refer to commands or features unavailable to you. Moreover, as bug fixes and new features are issued frequently by StataCorp, make sure that you update your Stata before posting a query, as your problem may already have been solved.
        and also

        6. Why are real names preferred?

        You are asked to post on Statalist using your full real name, including given name(s) and a family name, such as "Ronald Fisher" or "Gertrude M. Cox". Giving full names is one of the ways in which we show respect for others and is a long tradition on Statalist. It is also much easier to get to know people when real names are used.

        If you overlook this on first registration, it is easy to fix. Click on “Contact us” located at the bottom right-hand corner of every page.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          My guess is that you're using an older version of Stata that doesn't support https. Please note from the FAQ



          and also


          sorry for the name
          im currently using the stata 12, so there is no way to use coliin in stata 12 , right ?

          Comment


          • #6
            You can't use your Stata to install it directly using net. But you've (we've) got a URL and there are many ways to get at that file, including browsers. Here's the file collin.ado

            Code:
            *! version 1.6    -11/23/10 add sample size
            *! version 1.5.2  - 6/17/09 stupid bug fixed
            *! version 1.5.1  - 7/16/04
            *! version 1.4    - 1/25/04
            *! version 1.1.1  - 1/31/02  
            *! version 1.1    - 2/7/01
            program define collin, rclass
              version 6.0
              syntax varlist [if] [in] [, corr rinv]
              marksample touse
              local vars `varlist'
              tempname r ri r2 x v xr vr ci cir t sscp det diag1
              mat accum `r'    = `vars' if `touse', noconst deviations
              mat `r' = corr(`r')
            
             /*
              if "`cdiag'" ~= "" {
                quietly mat accum `sscp' = `vars' if `touse', noconst
                mat `diag1' = diag(vecdiag(`sscp'))
                mat `diag1' = syminv(`diag1')
                mat `sscp' = `diag1'*`sscp'*`diag1'
                matrix symeigen `x' `v' = `sscp'
                local str1 "raw sscp (no intercept)"
              } */
              
            
              if "`corr'"~="" {
                mat `sscp' = `r'
                matrix symeigen `x' `v' = `r'
                local str1 "deviation sscp (no intercept)"
              }
              
              else {
                quietly mat accum `sscp' = `vars' if `touse'
                mat `diag1' = diag(vecdiag(`sscp'))
                local i = 1
                while `i' <= colsof(`sscp') {
                  mat `diag1'[`i',`i'] = sqrt(`diag1'[`i',`i'])
                  local i = `i'+1
                }
                mat `diag1' = syminv(`diag1')
                mat `sscp' = `diag1'*`sscp'*`diag1'
                matrix symeigen `x' `v' = `sscp'
                local str1 "scaled raw sscp (w/ intercept)"
              }
              
              mat `ri' = inv(`r')
              mat `r2' = vecdiag(`ri')
              mat `t'  = vecdiag(`ri')
              scalar `det' = det(`r')
              local m  = colsof(`v')
              local m2 = colsof(`r')
              local i = 1
              local var2 : colnames(`sscp')
              matrix colnames `v' = `var2'
              matrix rownames `v' = " "
              matrix `ci' = J(1,`m',0)
              local sum = 0
              local i = 1
              while `i' <= `m2' {
                local sum = `sum' + `t'[1,`i']
                matrix `r2'[1,`i'] = 1 - 1/`r2'[1,`i']
                local i = `i'+1
              }
              local i = 1
              while `i' <= `m' {
                matrix `ci'[1,`i'] = sqrt(`v'[1,1]/`v'[1,`i'])
                local i = `i'+1
              }
              local cn  = `ci'[1,`m']
              local mvif = `sum'/`m2'
              tokenize `var2'
              display
              display in green "  Collinearity Diagnostics"
              display  
              display in green "                        SQRT                   R-"
              display in green "  Variable      VIF     VIF    Tolerance    Squared"
              display in green _dup(52) "-"
              local i = 1
              while `i' <= `m2' {
                 display in yellow %10s "``i''" %10.2f `t'[1,`i'] /*
                        */  %8.2f (sqrt(`t'[1,`i'])) /*
                        */ "  " %8.4f (1/`t'[1,`i'])  /*
                        */ "  " %10.4f  `r2'[1,`i']  
                            
                 local i = `i'+1
              }
              display in green _dup(52) "-"
              display in green %10s "Mean VIF" %10.2f in yellow `mvif'
              display
              display in green "                           Cond"
              display in green "        Eigenval          Index"
              display in green _dup(33) "-"
              local i = 1
              while `i' <= `m' {
                 display in yellow  "    "  `i' /*
                        */ "   "  %8.4f `v'[1,`i']  /*
                        */ " " %15.4f `ci'[1,`i']        
                 local i = `i'+1
              }
              
              
              display in green _dup(33) "-"
              display in green " Condition Number" %15.4f in yellow `cn' " " %10.4f `cnr'
              display in green " Eigenvalues & Cond Index computed from " "`str1'"
              display in green " Det(correlation matrix)" %10.4f in yellow `det'
              
                    
              if "`rinv'" ~= "" {
                display
                display in green "Inverse of correlation matrix"
                mat lis `ri', noh
              }
             
              return scalar m_vif = `mvif'
              return scalar cn = `cn'
            end
            and collin.hlp

            Code:
            .-
            help for ^collin^
            .-
            
            Collinearity Diagnostics
            ------------------------
            
                ^collin^ varlist  [^if^ exp] [^in^ range] [, ^corr rinv^]
            
            
            
            Description
            -----------
            
            ^collin^ computes several collinearity diagnostic measures including
                   VIF, tolerance, eigenvalues, condition index, and R-squared.  
                   It will compute the eigenvalues and condition index on either
                   the raw SSCP with an intercept (default) or the deviation SSCP
                   without an intercept.
            
            Option
            ------
            
            ^corr^   Eigenvalues and condition index computed from correlation matrix
                     without a constant.
                    
                  By default the eigenvalues and condition index are computed on the
                  scaled raw score SSCP matrix with an intercept.
                    
            ^rinv^  display inverse of correlation matrix.
            
            Examples
            --------
            
             . ^collin read write math^
             . ^collin read write math, corr rinv^
             . ^collin read write math if gender==1^
             . ^collin read write math if e(sample)
             
            
            
            Author
            ------
            
                  Philip B. Ender
                  UCLA Department of Education
                  UCLA, Academic Technology Services
                  ender@@ucla.edu
            
            
            Also see
            --------
            
             Manual:  ^[R] regression diagnostics^
            On-line:  help for @vif@
            Stata wants to see those files in the c folder of whatever

            Code:
            adopath
            calls PLUS

            I don't know where Phil Ender's vif is. I guess it's long since superseded by an official variant.

            Comment


            • #7


              great, thanks alot, but i downloaded the ado file for collin before, and i can use the ado file in stata 12 correctly right, or i have to use the ado file collin with stata 14 ?

              Comment


              • #8
                The program should work with Stata 6 up. I don't know why you think you need Stata 14.

                Comment


                • #9
                  Originally posted by Nick Cox View Post
                  The program should work with Stata 6 up. I don't know why you think you need Stata 14.
                  if my model like this
                  xtreg y x1 x2 x3, fe
                  then i should command collin like this, right ?
                  collin x1 x2 x3


                  Thanks a lot

                  Comment


                  • #10
                    Originally posted by Lenny Tr View Post

                    if my model like this
                    xtreg y x1 x2 x3, fe
                    then i should command collin like this, right ?
                    collin x1 x2 x3


                    Thanks a lot
                    Am i right ?

                    Comment


                    • #11
                      Dear all,

                      I am struggling to install the Stata command collin. I always type findit collin and then try to install the installation package. However, Stata completely crashes when I click on the install button. I use Stata 14.0 on a MacBook Air. Does anyone have a clue how to fix this issue?

                      Looking forward to receiving any suggestions. Thanks a lot.

                      Comment


                      • #12
                        Download
                        https://stats.idre.ucla.edu/wp-conte.../12/collin.zip

                        or

                        Find "collin" and other commands:
                        https://stats.oarc.ucla.edu/stata/ado/analysis/

                        this link below for other useful commands:
                        https://stats.oarc.ucla.edu/stata/ado/

                        Comment


                        • #13
                          Just in case others run into this issue - I got this same error message when I was connected to my work's VPN. After disconnecting from the VPN, I ran
                          Code:
                          findit collin
                          and was able to click through the menu to install the package successfully.

                          Comment

                          Working...
                          X