[R-sig-ME] DHGLM Double hierarchical GLMs

Patrick, Samantha Samantha.Patrick at liverpool.ac.uk
Wed May 27 16:55:29 CEST 2015


Hi

I am using the package dhglm to run a double hierarchical GLM.  I have been using the data provided with the package to experiment and I am having problems getting the summary for the model.  This code is taken from the package documentation:

### DHGLM introducing random effects in the overdispersion for crack growth data
library(dhglm)

data(data_crack_growth)

model_mu<-DHGLMMODELING(Model="mean",
                        Link="log",
                        LinPred=y~crack0+(1|specimen),
                        RandDist="inverse-gamma")

model_phi<-DHGLMMODELING(Model="dispersion", Link="log",
                         LinPred=phi~cycle+(1|specimen), RandDist="gaussian")

res_crack<-dhglmfit(RespDist="gamma",
                    DataMain=data_crack_growth,
                    MeanModel=model_mu,
                    DispersionModel=model_phi)

summary(res_crack)

##The output here is:

     Length Class  Mode
[1,] 241    -none- numeric
[2,] 241    -none- numeric

##when the instructions suggest it should contain:

FixCoef
RandCoef
iter
mtwolikelihood


##I have investigated looking at:

str(res_crack)


List of 2

 $ : num [1:241, 1] 1.2262 0.5985 -0.0856 1.1755 0.08 ...

 $ : num [1:241, 1] 0.0393 0.0447 0.0508 0.0577 0.0691 ..

class(res_crack)

[1] "list"

##However the documentation suggests it should be a dhglm object.  When I run:

summary.dhglm


object 'summary.dhglm' not found

To me this suggests my computer can not locate the summary.dhglm command.  Has anyone else had any experiences like this or success using the package?

Many Thanks

Sam


Samantha Patrick
Lecturer in Marine Biology

School of Environmental Sciences
University of Liverpool
Nicholson Building
Brownlow Street
Liverpool
L69 3GP, UK
Tel: 0151 795 4390
Skype: Sammy_Patrick
Website: http://samanthacpatrick.wix.com/home
Twitter: SamCPatrick

From: Samantha Patrick<mailto:spatrick at liverpool.ac.uk>
Sent: ýWednesdayý, ý27ý ýMayý ý2015 ý15ý:ý45
To: 'r-sig-mixed-models at r-project.org'<mailto:r-sig-mixed-models at r-project.org>

Hi

I am using the package dhglm to run a double hierarchical GLM.  I have been using the data provided with the package to experiment and I am having problems getting the summary for the model.  This code is taken from the package documentation:

### DHGLM introducing random effects in the overdispersion for crack growth data
library(dhglm)

data(data_crack_growth)

model_mu<-DHGLMMODELING(Model="mean",
                        Link="log",
                        LinPred=y~crack0+(1|specimen),
                        RandDist="inverse-gamma")

model_phi<-DHGLMMODELING(Model="dispersion", Link="log",
                         LinPred=phi~cycle+(1|specimen), RandDist="gaussian")

res_crack<-dhglmfit(RespDist="gamma",
                    DataMain=data_crack_growth,
                    MeanModel=model_mu,
                    DispersionModel=model_phi)

summary(res_crack)

##The output here is:

     Length Class  Mode
[1,] 241    -none- numeric
[2,] 241    -none- numeric

##when the instructions suggest it should contain:

FixCoef
RandCoef
iter
mtwolikelihood


##I have investigated looking at:

str(res_crack)


List of 2

 $ : num [1:241, 1] 1.2262 0.5985 -0.0856 1.1755 0.08 ...

 $ : num [1:241, 1] 0.0393 0.0447 0.0508 0.0577 0.0691 ..

class(res_crack)

[1] "list"

##However the documentation suggests it should be a dhglm object.  When I run:

summary.dhglm


object 'summary.dhglm' not found

To me this suggests my computer can not locate the summary.dhglm command.  Has anyone else had any experiences like this or success using the package?

Many Thanks

Sam


Samantha Patrick
Lecturer in Marine Biology

School of Environmental Sciences
University of Liverpool
Nicholson Building
Brownlow Street
Liverpool
L69 3GP, UK
Tel: 0151 795 4390
Skype: Sammy_Patrick
Website: http://samanthacpatrick.wix.com/home
Twitter: SamCPatrick

From: Samantha Patrick<mailto:spatrick at liverpool.ac.uk>
Sent: ýWednesdayý, ý27ý ýMayý ý2015 ý13ý:ý03
To: 'r-sig-mixed-models at r-project.org'<mailto:r-sig-mixed-models at r-project.org>

Hi

I am using the package dhglm to run a double hierarchical GLM.  I have been using the data provided with the package to experiment and I am having problems getting the summary for the model.  This code is taken from the package documentation:

### DHGLM introducing random effects in the overdispersion for crack growth data
library(dhglm)

data(data_crack_growth)

model_mu<-DHGLMMODELING(Model="mean",
                        Link="log",
                        LinPred=y~crack0+(1|specimen),
                        RandDist="inverse-gamma")

model_phi<-DHGLMMODELING(Model="dispersion", Link="log",
                         LinPred=phi~cycle+(1|specimen), RandDist="gaussian")

res_crack<-dhglmfit(RespDist="gamma",
                    DataMain=data_crack_growth,
                    MeanModel=model_mu,
                    DispersionModel=model_phi)

summary(res_crack)

##The output here is:

     Length Class  Mode
[1,] 241    -none- numeric
[2,] 241    -none- numeric

##when the instructions suggest it should contain:

FixCoef
RandCoef
iter
mtwolikelihood


##I have investigated looking at:

str(res_crack)


List of 2

 $ : num [1:241, 1] 1.2262 0.5985 -0.0856 1.1755 0.08 ...

 $ : num [1:241, 1] 0.0393 0.0447 0.0508 0.0577 0.0691 ..

class(res_crack)

[1] "list"

##However the documentation suggests it should be a dhglm object.  When I run:

summary.dhglm


object 'summary.dhglm' not found

To me this suggests my computer can not locate the summary.dhglm command.  Has anyone else had any experiences like this or success using the package?

Many Thanks

Sam


Samantha Patrick
Lecturer in Marine Biology

School of Environmental Sciences
University of Liverpool
Nicholson Building
Brownlow Street
Liverpool
L69 3GP
UK

Tel: 0151 7954390
Skype: sammy_patrick
Website: http://samanthacpatrick.wix.com/home
Twitter: SamCPatrick



From: Patrick, Samantha
Sent: 27 May 2015 12:04
To: r-sig-mixed-models at r-project.org
Subject: DHGLM Double hierarchical GLMs

Hi

I am using the package dhglm to run a double hierarchical GLM.  I have been using the data provided with the package to experiment and I am having problems getting the summary for the model.  This code is taken from the package documentation:

### DHGLM introducing random effects in the overdispersion for crack growth data
library(dhglm)

data(data_crack_growth)

model_mu<-DHGLMMODELING(Model="mean",
                        Link="log",
                        LinPred=y~crack0+(1|specimen),
                        RandDist="inverse-gamma")

model_phi<-DHGLMMODELING(Model="dispersion", Link="log",
                         LinPred=phi~cycle+(1|specimen), RandDist="gaussian")

res_crack<-dhglmfit(RespDist="gamma",
                    DataMain=data_crack_growth,
                    MeanModel=model_mu,
                    DispersionModel=model_phi)

summary(res_crack)

##The output here is:

     Length Class  Mode
[1,] 241    -none- numeric
[2,] 241    -none- numeric

##when the instructions suggest it should contain:

FixCoef
RandCoef
iter
mtwolikelihood


##I have investigated looking at:

str(res_crack)


List of 2

 $ : num [1:241, 1] 1.2262 0.5985 -0.0856 1.1755 0.08 ...

 $ : num [1:241, 1] 0.0393 0.0447 0.0508 0.0577 0.0691 ..

class(res_crack)

[1] "list"

##However the documentation suggests it should be a dhglm object.  When I run:

summary.dhglm


object 'summary.dhglm' not found

To me this suggests my computer can not locate the summary.dhglm command.  Has anyone else had any experiences like this or success using the package?

Many Thanks

Sam


Samantha Patrick
Lecturer in Marine Biology

School of Environmental Sciences
University of Liverpool
Nicholson Building
Brownlow Street
Liverpool
L69 3GP
UK

Tel: 0151 7954390
Skype: sammy_patrick
Website: http://samanthacpatrick.wix.com/home
Twitter: SamCPatrick




	[[alternative HTML version deleted]]



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