I am trying to estimate 95% confidence intervals using autoplot from ggfortify, however I am not able to achieve it. If I use the forecast package and forecast ahead 3 weeks with 95% CI it works fine. See below:
wt <- structure(list(DOC = c(3, 10, 17, 24, 31, 38, 45, 52, 59, 66,
73, 80, 87, 94, 101), AvgWeight = c(1, 1.66666666666667, 2.06666666666667,
2.275, 3.83333333333333, 6.2, 7.4, 8.5, 10.25, 11.1, 13.625,
15.2, 16.375, 17.8, 21.5), PondName = structure(c(1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "Pond01", class = "factor"),
SampleDate = structure(c(1182585600, 1183190400, 1183795200,
1184400000, 1185004800, 1185609600, 1186214400, 1186819200,
1187424000, 1188028800, 1188633600, 1189238400, 1189843200,
1190448000, 1191052800), class = c("POSIXct", "POSIXt"))), .Names = c("DOC",
"AvgWeight", "PondName", "SampleDate"), row.names = c(NA, 15L
), class = "data.frame")
wt$SampleDate <- as.Date(wt$SampleDate)
wt
DOC AvgWeight PondName SampleDate
1 3 1.000000 Pond01 2007-06-23
2 10 1.666667 Pond01 2007-06-30
3 17 2.066667 Pond01 2007-07-07
4 24 2.275000 Pond01 2007-07-14
5 31 3.833333 Pond01 2007-07-21
6 38 6.200000 Pond01 2007-07-28
7 45 7.400000 Pond01 2007-08-04
8 52 8.500000 Pond01 2007-08-11
9 59 10.250000 Pond01 2007-08-18
10 66 11.100000 Pond01 2007-08-25
11 73 13.625000 Pond01 2007-09-01
12 80 15.200000 Pond01 2007-09-08
13 87 16.375000 Pond01 2007-09-15
14 94 17.800000 Pond01 2007-09-22
15 101 21.500000 Pond01 2007-09-29
library(forecast)
library(ggfortify)
library(ggplot2)
library(xts)
pond <- as.xts(wt$AvgWeight,order.by=seq(as.Date("2007-06-23"), by=7, len=15))
pond
d.arima <- auto.arima(pond)
d.arima;fitted(d.arima)
d.forecast <- forecast(d.arima, level = c(95), h = 3)
d.forecast
> d.forecast
Point Forecast Lo 95 Hi 95
106 25.2 23.14483 27.25517
113 28.9 24.30450 33.49550
120 32.6 24.91026 40.28974
I get the correct 95% confidence intervals when I plot a forecast package object (d.forecast in this case)
autoplot(d.forecast,ts.colour='dodgerblue',predict.colour='green',
predict.linetype='dashed',ts.size=1.5,conf.int.fill='azure3') +
xlab('DOC') + ylab('AvgWeight-grs') + theme_bw()
But if I do:
ggfortify::autoplot(d.arima,predict=predict(d.arima,n.ahead=3),conf.int=TRUE,predict.alpha =
0.05,fitted.colour="green",
predict.colour='red',predict.linetype='solid')
It defaults to 80% confidence intervals. I tried to set the level of confidence inside predict() but it gets ignored. I also tried the level inside autoplot() and also did not work. Questions: How can I accomplish different levels of confidence using autoplot from ggfortify? Is it correct to use predict.alpha here or it is intended for the alpha color of the predicted point estimate?
Also, is it possible to connect the fitted green line to the predicted red line?
I'm surprised you're not getting an error and are seeing the plots you're showing. Unfortunately I cannot reproduce your plots
When I load ggfortify after forecast, I couldn't find a way to use forecasts autoplot. That's because ggfortify does not actually export autoplot; instead it overwrites the autoplot method from forecast. So ggfortify::autoplot(...) shouldn't work, and should throw the error
Error: 'autoplot' is not an exported object from 'namespace:ggfortify'
There is also no predict argument of autoplot.forecast or autoplot.ts, so I'm not sure where that comes from.
Is there a reason why you want to use forecast and ggfortify? Why not stick with forecasts autoplot for plotting? Here is an example based on your sample data and d.arima
autoplot(forecast(d.arima)) + theme_minimal()
The light and dark areas correspond to the 95% and 80% CIs, respectively.
Tested using forecast_8.10 and ggfortify_0.4.7.
Related
In R markdown through R Studio (R v. 4.0.3), I'm looking for a better solution to combining similarly structured dataframes while keeping all rows and matching entries on a key. Piping full_join() into a filter into a bind_rows() directly wasn't working, possibly because of the error message:
Error: Can't combine ..1$term_code 'character> and ..2$term_code '<integer.
I have 23 dataframes (let's call these "semester data") of data I'm looking to combine into a single dataframe (intended to be a single dataset of individuals outcomes from semester-to-semester).
Each semester dataframe is roughly 3000-4000 observations (individuals) with 45-47 variables of relevant data. A simplified example of a semester (or term) dataframe is shown below.
Simplified example of a "semester" dataframe:
id
ACT_math
course_code
section_code
term_code
grade
term_GPA
0001
23
101
001
FA12
3.45
3.8
0002
28
201
003
FA12
3.2
3.4
Individuals will show up in multiple semester dataframes as they progress through the program (taking course 101 in the fall and course 102 in the spring).
I want to use the dplyr full_join() to match these individuals on an ID key.
Using the suffix argument, I hope to keep track of which semester and course a set of data (grade, term_GPA, etc) for an individual comes from.
There's some data (ACT score, gender, state residency, etc) that is the stable for an individual across semester dataframes. Ideally I could take the first input and drop the rest, but if I had to clean this afterwards, that's fine.
I started by defining an object programatic_database using the first semester of data SP11. To cut down on the duplication of stable data for an individual, I selected the relevant columns that I wanted to join.
programmatic_database <- programmatic_database %>%
full_join(select(fa12, id, course_code, section_code, grade, term_gpa), by = "id", copy = TRUE, suffix = c(".sp11", ".fa12"), keep = FALSE, name = "id")
However, every semester new students join the program. I would like to add these entries to the bottom of the growing programmatic_database.
I'm also looking to use rbind() or bind_rows() to add these individuals to the bottom of the programmatic_database, along with their relevant data.
After full_join(), I'm filtering out the entries that have already been added horizontally to the dataframe, then piping the remaining entries into bind_rows()
programmatic_database <- fa12[!which(fa12$id %in% programmatic_database),] %>% dplyr::bind_rows(programmatic_database, fa12)
Concatenated example of what my code is producing after several iterations:
id
ACT_math
course_code
section_code
section_code.db
section_code.db.db
term_code
grade.sp11
grade.fa12
grade.sp13
grade.sp15
term_GPA.sp11
term_GPA.fa12
term_GPA.sp15
0001
23
102
001
001
001
FA12
3.45
3.8
3.0
-
3.8
3.7
-
0002
28
201
003
003
003
FA12
3.2
3.4
3.0
-
3.8
3.7
-
1020
28
201
003
003
003
FA12
3.2
3.4
-
-
3.8
3.7
-
6783
30
101
-
-
-
SP15
-
-
-
3.8
-
-
4.0
where I have successfully added horizontally for students 0001 and 0002 for outcomes in subsequent courses in subsequent semesters. I have also managed to add vertically, like with student 6783, leaving blanks for previous semesters before they enrolled but still adding the relevant columns.
Questions:
Is there a way to pipe full_join() into a filter() into a bind_rows() without running into these errors?
rbind number of columns do not match
OR
Error: Can't combine ..1$term_code 'character> and ..2$term_code '<integer.
Is there a easy way to keep certain columns and only add the suffix ".fa12" to certain columns? As you can see, the .db is piling up.
Is there any way to automate this? Loops aren't my strong suit, but I'm sure there's a better-looking code than doing each of the 23 joins/binds by hand.
Thank you for assistance!
Current code for simplicity:
#reproducible example
fa11 <- structure(list(id = c("1001", "1002", "1003",
"1013"), act6_05_composite = c(33L, 26L, 27L, 25L), course_code = c("101",
"101", "101", "101"), term_code = c("FA11", "FA11", "FA11", "FA11"
), section_code = c(1L, 1L, 1L, 1L), grade = c(4, 0, 0, 2.5
), repeat_status_flag = c(NA, "PR", NA, NA), class_code = c(1L,
1L, 1L, 1L), cum_atmpt_credits_prior = c(16, 0, 0, 0), cum_completed_credits_prior = c(0L,
0L, 0L, 0L), cum_passed_credits_prior = c(16, 0, 0, 0), cum_gpa_prior = c(0,
0, 0, 0), cum_atmpt_credits_during = c(29, 15, 18, 15), cum_completed_credits_during = c(13L,
1L, 10L, 15L), cum_passed_credits_during = c(29, 1, 14, 15),
term_gpa = c(3.9615, 0.2333, 2.3214, 2.9666), row.names = c(NA, 4L
), class = "data.frame")
sp12 <- structure(list(id = c("1007", "1013", "1355",
"2779", "2302"), act6_05_composite = c(24L, 26L, 25L, 24L,
24L), course_code = c(101L, 102L, 101L, 101L, 101L
), term_code = c(NA_integer_, NA_integer_, NA_integer_, NA_integer_,
NA_integer_), section_code = c(1L, 1L, 1L, 1L, 1L), grade = c(2,
2.5, 2, 1.5, 3.5), repeat_status_flag = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_
), class_code = c(2L, 2L, 1L, 2L, 2L), cum_atmpt_credits_prior = c(44,
43, 12, 43, 30), cum_completed_credits_prior = c(41L, 43L,
12L, 43L, 12L), cum_passed_credits_prior = c(41, 43, 12,
43, 30), cum_gpa_prior = c(3.3125, 3.186, 3.5416, 3.1785,
3.8636), cum_atmpt_credits_during = c(56, 59, 25, 64, 43),
cum_completed_credits_during = c(53L, 56L, 25L, 56L, 25L),
cum_passed_credits_during = c(53, 59, 25, 64, 43), term_gpa = c(2.8333,
3.423, 3.1153, 2.1923, 3.6153), row.names = c(NA,
5L), class = "data.frame")
# make object from fall 2011 semester dataframe
programmatic_database <- fa11
# join the spring 2012 semester dataframe by id using select variables and attaching relevant suffix
programmatic_database <- programmatic_database %>%
full_join(select(sp12, id, course_code, section_code, grade, term_gpa), by = "id", copy = TRUE, suffix = c(".fa11", ".sp12"), keep = FALSE, name = "id")
#view results of join, force integer type on certain variables as needed (see error above)
#filter the joined entries from fall 2012 database, then bind the remaining entries to the bottom of the growing dataset
programmatic_database <- sp12[!which(sp12$id %in% programmatic_database),] %>% dplyr::bind_rows(programmatic_database, sp12)
It would be possible to use bind_rows here if you make the column types consistent between tables. For instance, you could make a function to re-type any particular columns that aren't consistent in your original data. (That might also be something you could fix upstream as you read it in.)
library(dplyr)
set_column_types <- function(df) {
df %>%
mutate(term_code = as.character(term_code),
course_code = as.character(course_code))
}
bind_rows(
fa11 %>% set_column_types(),
sp12 %>% set_column_types() %>% mutate(term_code = "SP12")
)
This will stack your data into a relatively "long" format, like below. You may want to then reshape it depending on what kind of subsequent calculations you want to do.
id act6_05_composite course_code term_code section_code grade repeat_status_flag class_code cum_atmpt_credits_prior cum_completed_credits_prior cum_passed_credits_prior cum_gpa_prior cum_atmpt_credits_during cum_completed_credits_during cum_passed_credits_during term_gpa
1 1001 33 101 FA11 1 4.0 <NA> 1 16 0 16 0.0000 29 13 29 3.9615
2 1002 26 101 FA11 1 0.0 PR 1 0 0 0 0.0000 15 1 1 0.2333
3 1003 27 101 FA11 1 0.0 <NA> 1 0 0 0 0.0000 18 10 14 2.3214
4 1013 25 101 FA11 1 2.5 <NA> 1 0 0 0 0.0000 15 15 15 2.9666
5 1007 24 101 SP12 1 2.0 <NA> 2 44 41 41 3.3125 56 53 53 2.8333
6 1013 26 102 SP12 1 2.5 <NA> 2 43 43 43 3.1860 59 56 59 3.4230
7 1355 25 101 SP12 1 2.0 <NA> 1 12 12 12 3.5416 25 25 25 3.1153
8 2779 24 101 SP12 1 1.5 <NA> 2 43 43 43 3.1785 64 56 64 2.1923
9 2302 24 101 SP12 1 3.5 <NA> 2 30 12 30 3.8636 43 25 43 3.6153
I have a simple data set with two groups and a value for each group at 4 different time points. I want to display this data set as grouped boxplots over time but ggplot2 doesn't separate the time points.
This is my data:
matrix
Replicate Line Day Treatment X A WT Marker Proportion
1 C 10 low NA HuCHuD_Pos 8.62
2 C 10 low NA HuCHuD_Pos NA
1 C 18 low NA HuCHuD_Pos 30.50
3 C 18 low NA HuCHuD_Pos NA
2 C 18 low NA HuCHuD_Pos NA
1 C 50 low NA HuCHuD_Pos 26.10
2 C 50 low NA HuCHuD_Pos 31.90
1 C 80 low NA HuCHuD_Pos 12.70
2 C 80 low NA HuCHuD_Pos 26.20
1 C 10 normal NA HuCHuD_Pos NA
2 C 10 normal NA HuCHuD_Pos 17.20
1 C 18 normal NA HuCHuD_Pos 3.96
2 C 18 normal NA HuCHuD_Pos NA
1 C 50 normal NA HuCHuD_Pos 25.60
2 C 50 normal NA HuCHuD_Pos 17.50
1 C 80 normal NA HuCHuD_Pos 19.00
NA C 80 normal NA HuCHuD_Pos NA
And this is my code:
matrix = as.data.frame(subset(data.long, Line == line_single & Marker == marker_single & Day != "30"))
pdf(paste(line_name_single, marker_name_single, ".pdf"), width=10, height=10)
plot <-
ggplot(data=matrix,aes(x=Day, y=Proportion, group=Treatment, fill=Treatment)) +
geom_boxplot(position=position_dodge(1))
print(plot)
dev.off()
What do I do wrong?
What I want
What I get
Thanks very much for your help!
Cheers,
Paula
Edit:
This is how a minimal reproducible example for your question could look like:
matrix <- structure(list(Day = c(10L, 10L, 18L, 18L, 18L, 50L, 50L, 80L, 80L, 10L, 10L, 18L, 18L, 50L, 50L, 80L, 80L),
Treatment = c("low", "low", "low", "low", "low", "low", "low", "low", "low", "normal", "normal", "normal", "normal", "normal", "normal", "normal", "normal"),
Proportion = c(8.62, NA, 30.5, NA, NA, 26.1, 31.9, 12.7, 26.2, NA, 17.2, 3.96, NA, 25.6, 17.5, 19, NA)),
class = "data.frame", row.names = c(NA, -17L))
Suggested answer using factor to 'discretisize' the variable Day:
ggplot(data=matrix,aes(x=factor(Day), y=Proportion, fill=Treatment)) +
geom_boxplot(position=position_dodge(1)) +
labs(x ="Day")
Explanation: If we pass a continuous variable to the 'x' axis for a box-plot, ggplot2 does not convert the axis to a discrete variable. Therefore, in lack of a 'grouping' variable we only get one box. But if we convert the variable to something discrete, like a factor, a string or a date, we get the desired behavior.
Also, when you use dput or one of the techniques described here it's way easier to find and test an answer than having to try and work with the data description as in the question (or at least I couldn't figure out how to load that example data)
P.S. I think it's a bit confusing to name a variable of class data.frame 'matrix' since matrix is its own data type in R... ;)
I keep trying unsuccessfully to select from an excel file a filter in which only the rows values where three consecutive row values in column'x' are below 30 units. For example, in the following table:
Name age height speed
Helen 12. 1.20 40
Alan. 14. 1.40. 75
Hector.15. 1.25. 80
Ana. 11. 1.02. 81
Sophie.16. 1.40. 50
When the difference in column speed is below 30 within consecutive rows it should give as a result:
Name age height speed
Alan. 14. 1.40. 75
Hector.15. 1.25. 80
Ana. 11. 1.02. 81
Thank you!!!
If your data is like this:
x = structure(list(Name = structure(c(4L, 1L, 3L, 2L, 5L), .Label = c("Alan",
"Ana", "Hector", "Helen", "Sophie"), class = "factor"), age = c(12,
14, 15, 11, 16), height = c(1.2, 1.4, 1.25, 1.02, 1.4), speed = c(40L,
75L, 80L, 81L, 50L)), class = "data.frame", row.names = c(NA,
-5L))
Hope I got the numbers right:
Name age height speed
1 Helen 12 1.20 40
2 Alan 14 1.40 75
3 Hector 15 1.25 80
4 Ana 11 1.02 81
5 Sophie 16 1.40 50
Then do:
x[diff(x$speed)<30,]
Name age height speed
2 Alan 14 1.40 75
3 Hector 15 1.25 80
4 Ana 11 1.02 81
next time you publish here it is useful to post some toydata information like below:
rm(list=ls())
#### Toy data ###
dfnames<-c("Name","age","height","speed")
size<-20 # number of rows
name<-LETTERS[1:size]
age<-sample(20:26,size,replace=T)
height<-sample(160:180,size,replace=T)
speed<-sample(0:60,size,replace=T)
df<-cbind.data.frame(name,age,height,speed)
Solution:
for(i in 1:nrow(df)-1){
df[i,"test"]<-(df[i+1,"speed"]-df[i,"speed"])<30
}
df[nrow(df),"test"]<-"last_row"
df<-df[df[,"test"]!=F,]
I have two dataframes as follows:
a <- structure(list(Bacteria_A = c(12, 23, 45, 32, 34, 0), Bacteria_B = c(23,
12, 33, 44, 55, 3), Bacteria_C = c(25, 10, 50, 38, 3, 34), Group = structure(c(1L,
1L, 1L, 1L, 1L, 1L), class = "factor", .Label = "soil")), class = "data.frame", row.names = c("Sample_1",
"Sample_2", "Sample_3", "Sample_4", "Sample_5", "Sample_6"))
b <- structure(list(Bacteria_A = c(14, 10, 40, 40, 37, 3), Bacteria_B = c(25,
14, 32, 23, 45, 35), Bacteria_C = c(12, 34, 45, 22, 7, 23), Group = structure(c(1L,
1L, 1L, 1L, 1L, 1L), class = "factor", .Label = "water")), class = "data.frame", row.names = c("Sample_1",
"Sample_2", "Sample_3", "Sample_4", "Sample_5", "Sample_6"))
> a
Bacteria_A Bacteria_B Bacteria_C Group
Sample_1 12 23 25 soil
Sample_2 23 12 10 soil
Sample_3 45 33 50 soil
Sample_4 32 44 38 soil
Sample_5 34 55 3 soil
Sample_6 0 3 34 soil
> b
Bacteria_A Bacteria_B Bacteria_C Group
Sample_1 14 25 12 water
Sample_2 10 14 34 water
Sample_3 40 32 45 water
Sample_4 40 23 22 water
Sample_5 37 45 7 water
Sample_6 3 35 23 water
I want to compare the difference between each group across samples between soil and water.
For exemple For Bacteria_A i want to know if there is a difference between soil and water. Same for Bacteria_B and Bacteria_c (i have 900 bacteria). I though of a t-test but not sure how to do it with two dataframes.
Forgot to mention that not all bacteria are present in both dataframes so it could happen that one bacteria is not present in one of the environements. If bacteria are found in both environements they have exactly the same name.
Teh original dataframe is 160 samples per 500 Bacteria and data is not normally distributed.
Thanks for your help.
First of all, I want to mention that there are statistical methods to do the comparison which are more adequate than a t-test. They take into account the distribution the numbers are coming from (Negative-Binomial usually). You can check our DESeq2 package for instance.
As to your technical issue I would do:
for (bac in setdiff(intersect(colnames(a), colnames(b)), "Group")){
print(t.test(a[,bac], b[,bac]))
}
Your values do not seem to be in a normal or near-normal distribution, so you should stay away from the t-test. If you are unsure which distribution you are dealing with, you could use a wilcox.test.
You can stick your two data frames together quite easily then convert them to long format before running the appropriate tests:
library(tidyr)
library(dplyr)
bind_rows(a,b) %>%
pivot_longer(c(Bacteria_A, Bacteria_B, Bacteria_C)) %>%
group_by(name) %>%
summarise(mean_soil = mean(value[Group == "soil"]),
mean_water = mean(value[Group == "water"]),
pvalue = wilcox.test(value ~ Group)$p.value)
Which gives you
#> # A tibble: 3 x 4
#> name mean_soil mean_water pvalue
#> <chr> <dbl> <dbl> <dbl>
#> 1 Bacteria_A 24.3 24 0.936
#> 2 Bacteria_B 28.3 29 0.873
#> 3 Bacteria_C 26.7 23.8 0.748
This finds the bacteria names that exist in both data frames and then does a t.test between the same names giving a list L whose names are the bacteria names. The last line uses tidy to convert L to a data frame. You can replace t.test with wilcox.test if you prefer a non-parametric test. (Of course this does not take into account the problems of performing multiple hypothesis tests but rather just does the calculations.)
Name <- intersect(names(Filter(is.numeric, a)), names(Filter(is.numeric, b)))
L <- Map(t.test, a[Name], b[Name])
library(broom)
cbind(Name, do.call("rbind", lapply(L, tidy)))
The last line gives the following data frame:
Name estimate estimate1 estimate2 statistic p.value
Bacteria_A Bacteria_A 0.3333333 24.33333 24.00000 0.03485781 0.9728799
Bacteria_B Bacteria_B -0.6666667 28.33333 29.00000 -0.07312724 0.9435532
Bacteria_C Bacteria_C 2.8333333 26.66667 23.83333 0.30754940 0.7650662
parameter conf.low conf.high method alternative
Bacteria_A 9.988603 -20.97689 21.64356 Welch Two Sample t-test two.sided
Bacteria_B 7.765869 -21.80026 20.46692 Welch Two Sample t-test two.sided
Bacteria_C 9.492873 -17.84326 23.50993 Welch Two Sample t-test two.sided
Note
LinesA <- "Bacteria_A Bacteria_B Bacteria_C Group
Sample_1 12 23 25 soil
Sample_2 23 12 10 soil
Sample_3 45 33 50 soil
Sample_4 32 44 38 soil
Sample_5 34 55 3 soil
Sample_6 0 3 34 soil"
LinesB <- "Bacteria_A Bacteria_B Bacteria_C Group
Sample_1 14 25 12 water
Sample_2 10 14 34 water
Sample_3 40 32 45 water
Sample_4 40 23 22 water
Sample_5 37 45 7 water
Sample_6 3 35 23 water"
a <- read.table(text = LinesA, as.is = TRUE)
b <- read.table(text = LinesB, as.is = TRUE)
I'm using R 3.3.3. I have this dataframe:
dat <-
structure(
list(
Response = c(42.6, 42.7, 43.2, 48.2, 42.1, 46.7, 43.5, 43.6, 42.8),
Concentration = c(48, 48, 48, 48, 48, 48, 48, 48, 48),
Day = structure(
c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L),
.Label = c("1", "2", "3"),
class = "factor"
)
),
.Names = c("Response", "Concentration", "Day"),
row.names = c("31", "32", "33", "46", "47", "48", "61", "62", "63"),
class = "data.frame")
> dat
Response Concentration Day
31 42.6 48 1
32 42.7 48 1
33 43.2 48 1
46 48.2 48 2
47 42.1 48 2
48 46.7 48 2
61 43.5 48 3
62 43.6 48 3
63 42.8 48 3
I run the code below with the 64 bit version of R:
library(varComp)
res <- varComp(fixed = as.formula("log10(Response) ~ 1"),
data = dat,
random = as.formula("~ Day"))
fixef(res, test="Satterthwaite")
This gives:
Individual fixef effect estimates:
Estimate Std. Error Lower Upper t value Scale Df Pr(>|t|)
(Intercept) 1.642376 0.008363607 NaN NaN 196.3718 1 0 NaN
Overall fixed effect contrast:
F value Scale numDF denDF Pr(>F)
Overall 38561.88 1 1 0 NaN
Warning messages:
1: In pf(Fstat, rk, F.ddf, lower.tail = FALSE) : NaNs produced
2: In qt(1 - alpha/2, t.dfs) : NaNs produced
3: In qt(1 - alpha/2, t.dfs) : NaNs produced
4: In pt(abs(tstats) * sqrt(scaleF), t.dfs, lower.tail = FALSE) :
NaNs produced
Now I run the same code with the 32 bit version of R. And this gives:
Individual fixef effect estimates:
Estimate Std. Error Lower Upper t value Scale Df Pr(>|t|)
(Intercept) 1.642376 0.008363607 1.606391 1.678362 196.3718 1 2 2.593134e-05
Overall fixed effect contrast:
F value Scale numDF denDF Pr(>F)
Overall 38561.88 1 1 2 2.593134e-05
Any explanation ?