[R-sig-ME] Fwd: Fwd: Re: [R-sig-eco] cozigam

Ben Bolker bbolker at gmail.com
Wed Jun 13 13:41:18 CEST 2012



  [oops, cc'd to r-sig-mixed by mistake.  Sorry.  Re-posting to
r-sig-ecology.]

-------- Original Message --------
Subject: Fwd: Re: [R-sig-eco] cozigam
Date: Wed, 13 Jun 2012 07:40:08 -0400
From: Ben Bolker <bbolker at gmail.com>
To: r-sig-mixed-models at r-project.org <r-sig-mixed-models at r-project.org>,
 Mahnaz Rabbaniha <rab.mahnaz at gmail.com>

[cc'ing back to r-ecology]


-------- Original Message --------
Subject: 	Re: [R-sig-eco] cozigam
Date: 	Wed, 13 Jun 2012 14:38:49 +0430
From: 	Mahnaz Rabbaniha <rab.mahnaz at gmail.com>
To: 	Ben Bolker <bbolker at gmail.com>

hi

thanks for your answer

for finding the relation  i have try glm,gam and gam with smooth
variable, but in all conditions the results shown unacceptable answer (
for example: R-sq.(adj) =    0.1    ,   Deviance explained = 18.9%)

in base of contacts previous whit r - group and in base of zero in
data,i decided to use cozigam,My awareness is low about it but i try
different code in Liu,2010 .

after the received mis mentioned above, i omitted depth and this code used:

   res <- cozigam(Clupeidae~s(temperature,salinity), constraint =
"proportional", family = gaussian)

 result:

[snip]

> summary(res)
Family: gaussian
Parametric coefficients:
            Estimate       Std. Error   t value Pr(>|t|)
(Intercept)   -20.665505  13.904231    -1.486   0.1401
alpha          -0.486186   0.207679    -2.341   0.0210 *
delta1          0.010161   0.004781     2.125   0.0358 *

Approximate significance of smooth terms:

  Edf       Est.rank    F p-value

s(temperature,salinity)                 20.81       29 8.77      <2e-16 ***
---

Scale est. = 270.56    n = 132

what do you think? is it adequate for analyses ? do you have any suggest


   BMB> This is really too vague a question. You should do the usual
things that are done with the results of any analysis: figure out what
the parameters mean (e.g. by reading the JRSS COZIGAM paper:
http://www.jstatsoft.org/v35/i11/paper ), look at the parameter
estimates, their confidence intervals, predictions and see if they
make sense, residuals and see if there are obvious violations of
the statistical models (systematic patterns, variation in heterogeneity,
etc.)

On Wed, Jun 13, 2012 at 1:03 PM, Ben Bolker <bbolker at gmail.com
<mailto:bbolker at gmail.com>> wrote:

    Mahnaz Rabbaniha <rab.mahnaz at ...> writes:

    > i try to find regression between clupeidae,with
    temperature,salinity and
    > depth. the response variable is inclued many zero ( 86 from 133
    observed)
    >
    > therefore i used this code :
    >
    >  res <- cozigam(Clupeidae~s(temperature,salinity)+s(depth),
    constraint =
    > "proportional", family = gaussian)
    >
    > the result:
    > iteration = 2    norm = 1.001743
    > iteration = 3    norm = 0.3377464
    > iteration = 4    norm = 9.172232e-05
    >
    > ==========================================
    > estimated alpha = -0.5337883 ( 0.1789113 )
    > estimated delta = -0.0009891505 ( NaN )
    > ==========================================
    >
    > Warning message:
    >
    > In sqrt(V.theta[2, 2]) : NaNs produced
    >
    > what is exactly meaning?


     You're probably not getting answers to your repeated posts
    because you're not providing a reproducible example
    ( http://tinyurl.com/reproducible-000 ) and not giving very much
    detail about your problem.
     I strongly suspect that your model is too complex for your data:
    a general rule of thumb is that you need about 10 observations
    per parameter estimated. It's a bit hard to count in this case
    for two reasons -- zeroes are relatively uninformative (so each
    zero counts for less than one 'effective' observation), and it's
    a little hard to count parameters for penalized smooth terms --
    but I think you can't really expect to fit a two-way smooth term
    on temperature and salinity *and* a smooth term on depth ... the
    example in the COZIGAM JRSS paper (referenced in the help)
    fits a model of about the same complexity to 274 data points with
    84 zero catches -- somewhere between 3 and 4 times as much data
    as you have.
     Most narrowly, the program is trying to estimate the standard
    error of the parameter by inverting the matrix of second derivatives,
    and failing because the surface is too flat, or too strongly
    correlated, or some similar problem.

    _______________________________________________
    R-sig-ecology mailing list
    R-sig-ecology at r-project.org <mailto:R-sig-ecology at r-project.org>
    https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-mixed-models mailing list