Several standard accessor methods for a spdur class object.

# S3 method for spdur
logLik(object, ...)

# S3 method for spdur
nobs(object, ...)

# S3 method for spdur
coef(object, model = c("full", "duration", "risk",
  "distr"), ...)

# S3 method for spdur
vcov(object, model = c("full", "duration", "risk",
  "distr"), ...)

# S3 method for spdur
model.matrix(object, model = c("duration", "risk"), ...)

# S3 method for spdur
terms(x, model = c("duration", "risk"), ...)

Arguments

object

an object inheriting from class spdur.

not used

model

return full model, or only duration or risk equations, or distribution parameters.

x

spdur class object for terms

See also

Examples

data(model.coups) logLik(model.coups)
#> 'log Lik.' -319.8094 (df=4779)
nobs(model.coups)
#> [1] 4782
coef(model.coups)
#> duration_(Intercept) duration_polity2 risk_(Intercept) #> 4.00150499 0.20587882 6.52782381 #> risk_polity2 log(alpha) #> 0.89664330 -0.03203683
vcov(model.coups)
#> (Intercept) polity2 (Intercept) polity2 log(alpha) #> (Intercept) 0.056463652 0.0019051085 0.42976839 0.050957837 0.0186639826 #> polity2 0.001905109 0.0009223022 -0.01955782 -0.002058772 0.0009962216 #> (Intercept) 0.429768394 -0.0195578217 10.59877593 1.321533949 0.1406487374 #> polity2 0.050957837 -0.0020587718 1.32153395 0.166776892 0.0167763301 #> log(alpha) 0.018663983 0.0009962216 0.14064874 0.016776330 0.0141594308
head(model.matrix(model.coups))
#> duration polity2 #> 5007 1 0 #> 5006 1 5 #> 5570 1 8 #> 5039 1 9 #> 4751 1 -9 #> 4877 1 -4
terms(model.coups)
#> duration ~ polity2 #> attr(,"variables") #> list(duration, polity2) #> attr(,"factors") #> polity2 #> duration 0 #> polity2 1 #> attr(,"term.labels") #> [1] "polity2" #> attr(,"order") #> [1] 1 #> attr(,"intercept") #> [1] 1 #> attr(,"response") #> [1] 1 #> attr(,".Environment") #> <environment: R_GlobalEnv> #> attr(,"predvars") #> list(duration, polity2) #> attr(,"dataClasses") #> duration polity2 #> "numeric" "numeric"