Error in Zero inflated model (ziP) with bam

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in Zero inflated model (ziP) with bam

Miluji Sb
Dear all,

I am trying to use 'bam' to run the following generalized additive model:

###
m <- bam(result ~ factor(city) + factor(year) + lnpopulation +
s(lnincome_pc) + ,data=full_df,na.action=na.omit,family=ziP(theta = NULL,
link = "identity",b=0))

But getting the following error:

###
Error in bam(result :
  extended families not supported by bam

The documentation for 'bam' mentions the following "This is a family object
specifying the distribution and link to use in fitting etc. See glm and
family for more details. The extended families listed in family.mgcv can
also be used."

The family.mgcv does include ziP. What am I doing wrong? Any guidance will
be appreciated. Thank you!

Sincerely,

Milu

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Error in Zero inflated model (ziP) with bam

Bert Gunter-2
Do you have the mgcv package installed (I think it's part of the standard
distro, though) /loaded? ziP is there, not in BAM.

Other than that, sorry, no clue.

Cheers,
Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Mon, Nov 6, 2017 at 9:12 AM, Miluji Sb <[hidden email]> wrote:

> Dear all,
>
> I am trying to use 'bam' to run the following generalized additive model:
>
> ###
> m <- bam(result ~ factor(city) + factor(year) + lnpopulation +
> s(lnincome_pc) + ,data=full_df,na.action=na.omit,family=ziP(theta = NULL,
> link = "identity",b=0))
>
> But getting the following error:
>
> ###
> Error in bam(result :
>   extended families not supported by bam
>
> The documentation for 'bam' mentions the following "This is a family object
> specifying the distribution and link to use in fitting etc. See glm and
> family for more details. The extended families listed in family.mgcv can
> also be used."
>
> The family.mgcv does include ziP. What am I doing wrong? Any guidance will
> be appreciated. Thank you!
>
> Sincerely,
>
> Milu
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Error in Zero inflated model (ziP) with bam

Miluji Sb
Thanks for your reply. Yes, installed (reinstalled) and loaded. I am a bit
baffled...

Sincerely,

Milu

On Mon, Nov 6, 2017 at 6:30 PM, Bert Gunter <[hidden email]> wrote:

> Do you have the mgcv package installed (I think it's part of the standard
> distro, though) /loaded? ziP is there, not in BAM.
>
> Other than that, sorry, no clue.
>
> Cheers,
> Bert
>
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
> On Mon, Nov 6, 2017 at 9:12 AM, Miluji Sb <[hidden email]> wrote:
>
>> Dear all,
>>
>> I am trying to use 'bam' to run the following generalized additive model:
>>
>> ###
>> m <- bam(result ~ factor(city) + factor(year) + lnpopulation +
>> s(lnincome_pc) + ,data=full_df,na.action=na.omit,family=ziP(theta = NULL,
>> link = "identity",b=0))
>>
>> But getting the following error:
>>
>> ###
>> Error in bam(result :
>>   extended families not supported by bam
>>
>> The documentation for 'bam' mentions the following "This is a family
>> object
>> specifying the distribution and link to use in fitting etc. See glm and
>> family for more details. The extended families listed in family.mgcv can
>> also be used."
>>
>> The family.mgcv does include ziP. What am I doing wrong? Any guidance will
>> be appreciated. Thank you!
>>
>> Sincerely,
>>
>> Milu
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.