logLik1.lme: Calculates contribution of one subject to the log-likelihood...

Description Usage Arguments Details Value Author(s) Examples

Description

This is method for logLik1() generic function.

Usage

1
2
  ## S3 method for class 'lme'
 logLik1(modfit, dt1, dtInit)

Arguments

modfit

an lme object representing model fitted using maximum likelihood.

dt1

a data frame with data for one subject, for whom the log-likelihood function is to be evaluated

dtInit

an optional auxiliary data frame.

Details

Calculates profile likelihood (with beta profiled out) for *one* subject. Data with *one* level of grouping only. correlation component in modelStruct not implemented.

Value

numeric scalar value representing contribution of a given subject to the overall log-likelihood returned by logLik() function applied to lme object defined by modfit argument.

Author(s)

Andrzej Galecki and Tomasz Burzykowski

Examples

1
2
3
4
5
6
7
8
9
require(nlme)
lm3.form <- visual ~ visual0 + time + treat.f
(fm16.5ml <-                                # M16.5
   lme(lm3.form,
   random = list(subject = pdDiag(~time)),
   weights = varPower(form = ~time),
   data = armd, method = "ML"))
 df1 <- subset(armd, subject == "1")       # Panel R20.7
 logLik1(fm16.5ml, df1)

nlmeU documentation built on May 2, 2019, 3:38 p.m.