aov and lme are not the same functions. aov is a wrapper for lm, the general linear model function. For balanced designs and one or two random levels, aov can cope with a random term by fitting linear models to different error strata (according to the help files). Significance testing is done using appropriate F statistics.
lme, on the other hand, fits a genuine mixed effects model using maximum likelihood (or REML) to obtain estimates of the parameters of the model. They are not required to give the same estimates.
It is also possible that your formulae are miss-specified, but I can't tell from the information you have supplied in the question. I don't see where there are two levels in the model. You have a 2x2 factorial with two replicates (the tanks) at each treatment level. The "tank effect" is simply the residual error -- unless you are taking several measurements from each tank.
I simulated some data based on the OP's problem: a 2x2 factorial with 2 replicates at each level (the tank) and 9 measurements from each tank. There are 3 ways to analyse these data
- Use aov and the formula given by the OP
- Use lme (resp lmer) and the formula given by the OP
- Take the mean survivorship within each tank and use oav() on the means.
All three methods lead to the same conclusions. The first and the third produce numerically identical F statistics (as they should, given the problem is balanced).
aov and lme give different output. To see the coefficients for pH and temp you need to do coef() on the output of the aov() function. I got identical estimates. The p-values are slightly different, as one would expect given a different model, different estimation and different test statistic.
Notice that you get 7 degrees of freedom in the aov() model. The treatments are randomized to the 8 tanks, so basically, the sample size is 8. Taking repeated measurements in each tank gives a more precise measurement of whatever is going on inside each tank -- which is good -- but in a sense, this is still an experiment in which n=8.