Hi again,

More reading later, and I have the following model with the log likelihood function specified:
male.lme2 <- lme(BoxCoxXY ~ ordered(AgeFactor) + IntakeDay,
                                    data=Male.Group,
                                    random= ~1|RespondentID)

male.nlme <- nlme(IntakeAmt ~ log(1/sqrt(2*pi*(Scale^2))) +
                                                (-(A*BoxCoxXY-(B*AgeFactor + C*IntakeDay))^2)/(2*Scale)+(Lambda.Value-1)*log(IntakeAmt),
                                    data=Male.Group,
                                    fixed = A - B + C ~ 1,
                                    random = A ~ 1|RespondentID,
                                    start=fixef(male.lme2)
                                    )

The nlme syntax gives me the error:
"Error in nlme.formula(IntakeAmt ~ log(1/sqrt(2 * pi * (Scale^2))) + (-(A * :
            starting values for the fixed component are not the correct length"

Reading on the internet made me understand that this is because there needs to be 3 fixed component start parameters, as confirmed by the model below not giving that error:
male.nlme <- nlme(IntakeAmt ~ log(1/sqrt(2*pi*(Scale^2))) +
                                                (-(A*BoxCoxXY-(B*AgeFactor + C*IntakeDay))^2)/(2*Scale)+(Lambda.Value-1)*log(IntakeAmt),
                                    data=Male.Group,
                                    fixed = A - B + C ~ 1,
                                    random = A ~ 1|RespondentID,
                                    start=c(A=1,B=1,C=1)
                                    )

The test model immediately above gives the error:
"Error in chol.default((value + t(value))/2) :
            the leading minor of order 1 is not positive definite"

Which I think is occurring because of the warning messages:
1: In Ops.ordered(B, AgeFactor) :
            '*' is not meaningful for ordered factors
2: In Ops.factor(C, IntakeDay) : * not meaningful for factors

Given that I have 3 AgeFactor and 1 IntakeDay parameters, as there are 4 and 2 factor levels respectively (lowest level omitted for each), how do I specify the nlme model and fixed effects without changing to dummy variable coding?

Sorry for all my questions on this, at least this time I get the error on step 14 of the traceback() so I feel I am coming to grips with nlme slowly.

Cheers
Michelle



UNCLASSIFIED

**********************************************************************
This email and any files transmitted with it are confide...{{dropped:12}}


