Announcement

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

  • Generalized additive model & significance of coefficients (p-value)

    Dear Stata friends,

    I am playing around with generalized additive models.
    I get, for example, the output as shown in the picture in Appendix.
    How do I get to see the p-value of the "debt" coefficient?

    Edit: I have added the picture in my original post:



    Thanks,

    Willem
    Last edited by Willem Vanlaer; 25 Jun 2015, 08:55.

  • #2
    as it says in the FAQ, please don't post photos as they are generally not readable - yours is not readable (at least by me) - please see section 12 of the FAQ

    also, afaik, there is no built-in Stata program for GAM - what are you using and where does it come from?

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      as it says in the FAQ, please don't post photos as they are generally not readable - yours is not readable (at least by me) - please see section 12 of the FAQ

      also, afaik, there is no built-in Stata program for GAM - what are you using and where does it come from?

      Hey,

      Thank you for the heads up. I have altered the OP.
      I am using gamfit, which e.g. can be found here and here.

      Willem

      Comment


      • #4
        Nobody here online who can help me with this?

        Comment


        • #5
          How do I get to see the p-value of the "debt" coefficient?
          Please elaborate what the problem is. I "see" a "P>Gain" entry in your table. Do you want something different? And are there saved results left behind after running gamfit which you could access to "see" or calculate what you want?

          Comment


          • #6
            Originally posted by Stephen Jenkins View Post
            Please elaborate what the problem is. I "see" a "P>Gain" entry in your table. Do you want something different? And are there saved results left behind after running gamfit which you could access to "see" or calculate what you want?

            Hey Stephen,

            Thank you for your reply.

            As I understand it, the "P>Gain" refers to wether or not there is any nonlinearity in the results.


            So this does not give me the information I am looking for (I think).

            Gamfit creates the following new variables:


            Do you think I can calculate what I need on them and if so, how?

            Thanks in advance!

            Willem


            Comment


            • #7
              But what precisely is the information you are looking for? (I don't think you actually stated this precisely; if you have, apologies.) What happens if you type ereturn list after running the program?

              Comment


              • #8
                I think most of the point with generalized additive models is that there isn't a single coefficient for each predictor. The dependence is modelled via a more flexible fit using several parameters, at least implicitly.

                Tastes vary, but in Stata fractional polynomials offer one well-supported basis for fits more flexible than common or garden regression. See also methods using splines such as

                SJ-7-1 st0120 . Multivar. modeling with cubic reg. splines: A prin. approach
                (help mvrs, uvrs, splinegen if installed) P. Royston and W. Sauerbrei
                Q1/07 SJ 7(1):45--70
                discusses how to limit instability and provide sensible
                regression models when using spline functions in a
                multivariable setting
                Last edited by Nick Cox; 26 Jun 2015, 05:54.

                Comment


                • #9
                  Originally posted by Stephen Jenkins View Post
                  But what precisely is the information you are looking for? (I don't think you actually stated this precisely; if you have, apologies.) What happens if you type ereturn list after running the program?

                  My apologies if I am still not being clear enough.

                  I would like to know:
                  - the test statistic for the coefficient of "debt"
                  - the observed significance level for this test statistic

                  ereturn list gives the following results:


                  I don't think this gives me the necessary information, does it?

                  ereturn display should give me what I need, but I get the following error message:
                  "last estimates not found"

                  Any ideas on how to fix this?


                  Comment


                  • #10
                    I'm getting out of my depth -- I know little about GAMs. Still, it sounds like Nick Cox gave you the answer. I.e. what you're seeking doesn't exist because "there isn't a single coefficient for each predictor".

                    Comment


                    • #11
                      Originally posted by Nick Cox View Post
                      I think most of the point with generalized additive models is that there isn't a single coefficient for each predictor. The dependence is modelled via a more flexible fit using several parameters, at least implicitly.

                      Tastes vary, but in Stata fractional polynomials offer one well-supported basis for fits more flexible than common or garden regressio. See also methods using splines such as

                      SJ-7-1 st0120 . Multivar. modeling with cubic reg. splines: A prin. approach
                      (help mvrs, uvrs, splinegen if installed) P. Royston and W. Sauerbrei
                      Q1/07 SJ 7(1):45--70
                      discusses how to limit instability and provide sensible
                      regression models when using spline functions in a
                      multivariable setting
                      Nick, thank you for your answer.
                      Let's say I would like to continue working with these generalized additive models, how can I test the "goodness of fit" (i.e. to what extent the estimated function captures the variation in my data)?


                      Originally posted by Stephen Jenkins
                      I'm getting out of my depth -- I know little about GAMs. Still, it sounds like Nick Cox gave you the answer. I.e. what you're seeking doesn't exist because "there isn't a single coefficient for each predictor".
                      Ok, thank you. Do you have any idea on the follow-up question I have regarding goodness of fit?

                      Comment


                      • #12
                        You could assess goodness-of-fit in any of the usual ways e.g. calculating a R-square following suggestions such as those here: http://www.stata.com/support/faqs/st...red/index.html Naturally any measure that is not directly or indirectly optimised by the fit is at best descriptive and at worst irrelevant.

                        Comment


                        • #13
                          Originally posted by Nick Cox View Post
                          You could assess goodness-of-fit in any of the usual ways e.g. calculating a R-square following suggestions such as those here: http://www.stata.com/support/faqs/st...red/index.html Naturally any measure that is not directly or indirectly optimised by the fit is at best descriptive and at worst irrelevant.

                          Thanks for the link. Will also use nonparametric measures, such as Spearman and Kendall's Tau.

                          Comment


                          • #14
                            Hello,
                            Regarding General Additive Models (GAM), is it possible to check for linearity in panel data with repeated measurements using GAM ? I also heard about General Additive Mixed Models (GAMMs), is it possible to realize GAMM in STATA?
                            I would be grateful for any info!!

                            Comment

                            Working...
                            X