lme objectlogLik1.lme.RdThis is method for logLik1() generic function.
# S3 method for class 'lme'
logLik1 (modfit, dt1, dtInit)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.
Calculates profile likelihood (with beta profiled out) for *one* subject. Data with *one* level of grouping only. correlation component in modelStruct not implemented.
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"))
#> Linear mixed-effects model fit by maximum likelihood
#> Data: armd
#> Log-likelihood: -3210.685
#> Fixed: lm3.form
#> (Intercept) visual0 time treat.fActive
#> 5.4472103 0.8997320 -0.2415519 -2.6563784
#>
#> Random effects:
#> Formula: ~time | subject
#> Structure: Diagonal
#> (Intercept) time Residual
#> StdDev: 7.170457 0.2801255 5.022971
#>
#> Variance function:
#> Structure: Power of variance covariate
#> Formula: ~time
#> Parameter estimates:
#> power
#> 0.1117254
#> Number of Observations: 867
#> Number of Groups: 234
df1 <- subset(armd, subject == "1") # Panel R20.7
logLik1(fm16.5ml, df1)
#> Error in eval(mCall$fixed): object 'lm3.form' not found