content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
################### R code Binomial distribution # Suppose there are 10 multiple choice questions. Each question has 5 choices, # and only one of these is correct. What is the probability getting two or fewer correct answers, # if you guess each answer at random. pbinom(2, size=10, prob=0.2) # This is the cumulative distribution function. # What is the probability of getting seven or more correct? 1-pbinom(6, size=10, prob=0.2) # What is the probability of getting exactly two answers correct? dbinom(2, size=10, prob=0.2) # This is the probability density function. # Calculate the probability of getting two or fewer answers correct with the probability denisty function. dbinom(0,10,0.2) +dbinom(1,10,0.2)+dbinom(2,10,0.2) # or sum(dbinom(0:2,10,0.2)) # Calculate P(5< X <10) for X ~ Binomial(30, 0.5) sum(dbinom(6:9, 30, 0.5)) # Inverse cumulative distribution function qbinom(0.5,size=15, prob=0.2) # There is at least a 50% chance of getting 3 or fewer successes in 15 trials with success probability 0.2. # Check pbinom(3, size=15, prob=0.2) pbinom(2, size=15, prob=0.2)
/Rcode_binomial.R
no_license
huebner/Rlabs
R
false
false
1,097
r
################### R code Binomial distribution # Suppose there are 10 multiple choice questions. Each question has 5 choices, # and only one of these is correct. What is the probability getting two or fewer correct answers, # if you guess each answer at random. pbinom(2, size=10, prob=0.2) # This is the cumulative distribution function. # What is the probability of getting seven or more correct? 1-pbinom(6, size=10, prob=0.2) # What is the probability of getting exactly two answers correct? dbinom(2, size=10, prob=0.2) # This is the probability density function. # Calculate the probability of getting two or fewer answers correct with the probability denisty function. dbinom(0,10,0.2) +dbinom(1,10,0.2)+dbinom(2,10,0.2) # or sum(dbinom(0:2,10,0.2)) # Calculate P(5< X <10) for X ~ Binomial(30, 0.5) sum(dbinom(6:9, 30, 0.5)) # Inverse cumulative distribution function qbinom(0.5,size=15, prob=0.2) # There is at least a 50% chance of getting 3 or fewer successes in 15 trials with success probability 0.2. # Check pbinom(3, size=15, prob=0.2) pbinom(2, size=15, prob=0.2)
# This R script is created as a Shiny application to use raw agricultural commodities data, # available by Quandl, and create plots and statistics. # The code is available under MIT license, as stipulated in https://github.com/iliastsergoulas/agri_prices/blob/master/LICENSE. # Author: Ilias Tsergoulas, Website: www.agristats.eu library(shiny) library(shinythemes) library(shinydashboard) library(corrplot) library(Quandl) library(forecast) library(dygraphs) library(lubridate) printMoney <- function(x){ # A function to show number as currency format(x, digits=10, nsmall=2, decimal.mark=",", big.mark=".") } percent <- function(x, digits = 2, format = "f", ...) { # A function to show number as percentage paste0(formatC(100 * x, format = format, digits = digits, ...), "%") } specify_decimal <- function(x, k) format(round(x, k), nsmall=k) # A function to show number with k decimal places Quandl.api_key("KCo4sXzWEzSAb81ff3VP") # Setting API key to have unlimited access to databases data_codes<-c("COM/WLD_SUGAR_EU", "COM/WLD_SUGAR_WLD", "COM/WLD_SUGAR_US", # Setting wanted Quandl database codes "COM/COFFEE_BRZL", "COM/COFFEE_CLMB", "COM/WLD_COFFEE_ARABIC", "COM/WLD_RICE_05", "COM/WLD_RICE_25", "COM/WLD_RICE_05_VNM", "COM/BEEF_S", "COM/BEEF_C", "COM/WLD_BEEF", "COM/WLD_BANANA_EU", "COM/WLD_BANANA_US", "COM/PBANSOP_USD", "COM/WLD_COCOA", "COM/WLD_COTTON_A_INDX", "COM/OATS", "COM/MILK", "COM/EGGS", "COM/BUTTER", "COM/WLD_TOBAC_US","COM/WLD_ORANGE", "COM/WLD_WHEAT_CANADI", "COM/WLD_WHEAT_US_HRW", "COM/WLD_WHEAT_US_SRW", "COM/PWHEAMT_USD", "COM/WOOL", "COM/WOOL_60_62", "COM/WOOL_60", "COM/WOOL_58", "COM/WOOL_62", "COM/CORN_MEAL", "COM/CORN_FEED", "COM/WLD_MAIZE", "COM/PMAIZMT_USD", "COM/WLD_LAMB", "COM/WLD_CHICKEN", "COM/PSHRI_USD", "COM/WLD_SHRIMP_MEX", "COM/WLD_SUNFLOWER_OIL", "COM/WLD_GRNUT_OIL", "COM/WLD_COCONUT_OIL", "COM/WLD_RAPESEED_OIL", "COM/WLD_PALM_OIL", "COM/WLD_SOYBEAN_OIL", "COM/POLVOIL_USD", "COM/WLD_TEA_KOLKATA", "COM/WLD_TEA_MOMBASA", "COM/WLD_TEA_COLOMBO", "COM/WLD_TEA_AVG", "COM/WLD_IBEVERAGES", "COM/WLD_IGRAINS", "COM/WLD_IFOOD", "COM/WLD_IFERTILIZERS", "COM/WLD_IAGRICULTURE", "COM/WLD_IENERGY") # Setting Quandl codes respective description data_descr<-c("Sugar Price, EU, cents/kg", "Sugar Price, world, cents/kg", "Sugar Price, US, cents/kg", "Coffee, Brazilian, Comp.", "Coffee, Colombian, NY lb.", "Coffee Price, Arabica, cents/kg", "Rice, Thai 5% ,($/mt)", "Rice, Thai 25% ,($/mt)", "Rice, Viet Namese 5%,($/mt)", "Beef - Select 1", "Beef - Choice 1", "Beef,($/kg)", "Banana, Europe,($/kg)", "Banana, US,($/kg)", "Bananas, Central American and Ecuador, $/mt", "Cocoa,($/kg)","Cotton, A Index,($/kg)", "Oats, No. 2 milling, Mnpls; $ per bu", "Milk, Nonfat dry, Chicago", "Eggs, large white, Chicago dozen", "Butter, AA Chicago, lb","Tobacco, US import u.v.,($/mt)", "Orange,($/kg)", "Wheat, Canadian,($/mt)", "Wheat, US HRW,($/mt)", "Wheat, US SRW,($/mt)", "Wheat, No.1 Hard Red Winter ($/mt)", "Wool, 64s", "Wool, 60-62s", "Wool, 60s", "Wool, 58s", "Wool, 62s", "Corn gluten meal, Midwest, ton", "Corn gluten feed, Midwest, ton", "Maize,($/mt)", "Maize (corn), U.S. No.2 Yellow, FOB Gulf of Mexico, U.S. price, US$ per metric ton", "Meat, sheep,($/kg)", "Meat, chicken,($/kg)", "Shrimp, shell-on headless, 26-30 count/pound, Mexican origin, $/kg", "Shirmps, Mexican,($/kg)", "Sunflower oil,($/mt)", "Groundnut oil,($/mt)", "Coconut oil,($/mt)", "Rapeseed oil,($/mt)", "Palm oil,($/mt)", "Soybean oil,($/mt)", "Olive Oil, extra virgin less than 1% free fatty acid,($/mt)", "Tea, Kolkata,($/kg)", "Tea, Mombasa,($/kg)", "Tea, Colombo,($/kg)", "Tea, avg 3 auctions,($/kg)", "Beverages Index", "Grains Index", "Food Index", "Fertilizers Index", "Agriculture Index", "Energy Index") data_product<-c("Ζάχαρη","Ζάχαρη","Ζάχαρη", "Καφές","Καφές","Καφές", "Ρύζι","Ρύζι","Ρύζι", "Βοδινό", "Βοδινό", "Βοδινό", "Μπανάνες", "Μπανάνες", "Μπανάνες", "Κακάο", "Βαμβάκι", "Βρώμη","Γάλα", "Αυγά", "Βούτυρο", "Καπνός", "Πορτοκάλια", "Σιτάρι", "Σιτάρι", "Σιτάρι", "Σιτάρι", "Μαλλί", "Μαλλί", "Μαλλί", "Μαλλί", "Μαλλί", "Καλαμπόκι", "Καλαμπόκι", "Καλαμπόκι", "Καλαμπόκι", "Κρέας", "Κρέας", "Γαρίδες", "Γαρίδες", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Τσάι", "Τσάι", "Τσάι", "Τσάι", "Δείκτες", "Δείκτες", "Δείκτες", "Δείκτες", "Δείκτες", "Δείκτες") data_quandl<-data.frame(data_descr, data_codes, data_product) # Binding codes and description to dataframe header <- dashboardHeader(title = "Τιμές αγροτικών προϊόντων ", titleWidth=1000) # Header of dashboard sidebar <- dashboardSidebar(sidebarMenu( selectInput('commodity', 'Προϊόν', choices = unique(data_quandl$data_product)), selectInput('period', 'Ορίζοντας πρόβλεψης (μήνες)', choices = c("6", "12", "18", "24", "30", "36"), selected='12')), tags$footer(tags$p("Η παρούσα εφαρμογή βασίζεται σε δεδομένα του ιστοτόπου Quandl."))) frow1 <- fluidRow( # Creating row title = "Συνολικά", status="success", collapsible = TRUE, mainPanel(dygraphOutput("view"), width='98%') ) frow2 <- fluidRow( # Creating row status="success", collapsible = TRUE, mainPanel(uiOutput("plots"), width='98%') ) body <- dashboardBody(frow1, frow2) # Binding rows to body of dashboard ui <- dashboardPage(header, sidebar, body, skin="yellow") # Binding elements of dashboard server <- function(input, output) { mydata <- reactive({ # Adding reactive data information data_filtered<-as.data.frame(data_quandl[which(data_quandl$data_product==input$commodity),]) mydata<-data.frame(Date= character(0), Value= character(0), Description=character(0)) for (i in 1:nrow(data_filtered)){ # Getting prices data based on Quandl code temp<-Quandl(as.character(data_filtered[i,2]), collapse = "monthly") temp$Description<-as.character(data_filtered[i,1]) colnames(temp)<-c("Date", "Value", "Description") mydata<-rbind(mydata, temp) } mydata }) mydata_multiple<- reactive({ # Reshaping mydata dataframe for multiple view unique_descriptions<-unique(mydata()$Description) mydata_multiple<-reshape(mydata(), direction = "wide", idvar = "Date", timevar = "Description") #colnames(mydata_multiple)<-c("Date", unique_descriptions[1], unique_descriptions[2], unique_descriptions[3]) mydata_multiple<-xts(mydata_multiple, order.by=as.POSIXct(mydata_multiple$Date)) mydata_multiple<-mydata_multiple[,-c(1)] }) output$view <- renderDygraph({ # Creating chart #combined <- cbind(mydata_multiple(), actual=mydata_multiple()) dygraph(mydata_multiple(), main="Αντιπαραβολή τιμών αγροτικών προϊόντων", group = "commodities")%>% dyAxis("y", label = "Τιμή προϊόντος")%>% dyRangeSelector(height = 20) }) mylength<-reactive({ # Getting number of datasets mylength<-length(unique(mydata()$Description)) }) output$plots <- renderUI({ # Calling createplots() function and plotting dygraphs createPlots() plot_output_list <- lapply(1:mylength(), function(i) { plotname <- paste("plot", i, sep="") dygraphOutput(plotname) }) # Convert the list to a tagList - this is necessary for the list of items # to display properly. do.call(tagList, plot_output_list) }) createPlots <- reactive ({ # Creating dygraph plots for all available datasets # Calling renderPlot for each one. for (i in 1:mylength()) { # With local each item gets its own number. local({ my_i <- i plotname=paste("plot", my_i, sep="") # Setting flexible names mydata_product <- unique(mydata()$Description)[my_i] # Getting unique descriptions mydata_ts<-mydata()[which(mydata()$Description==mydata_product),] mydata_ts<-xts(mydata_ts, order.by=as.POSIXct(mydata_ts$Date)) mydata_predicted <- forecast(as.numeric(mydata_ts$Value), h=as.numeric(input$period)) # Creating forecast mydata_predicted <- data.frame(Date = seq(mdy('11/30/2017'), by = 'months', length.out = as.numeric(input$period)), Forecast = mydata_predicted$mean,Hi_95 = mydata_predicted$upper[,2], Lo_95 = mydata_predicted$lower[,2]) mydata_xts <- xts(mydata_predicted, order.by = as.POSIXct(mydata_predicted$Date)) mydata_predicted <- merge(mydata_ts, mydata_xts) # Merging xts object with forecast mydata_predicted <- mydata_predicted[,c("Value", "Forecast", "Hi_95", "Lo_95")] output[[plotname]] <- renderDygraph({ # Rendering dygraphs dygraph(mydata_predicted, main=mydata_ts[1,3], group = "commodities")%>% dyAxis("y", label = "Τιμή προϊόντος")%>% dyRangeSelector(height = 20) }) }) } }) } shinyApp(ui, server)
/gr/app.R
permissive
iliastsergoulas/agri_prices
R
false
false
10,332
r
# This R script is created as a Shiny application to use raw agricultural commodities data, # available by Quandl, and create plots and statistics. # The code is available under MIT license, as stipulated in https://github.com/iliastsergoulas/agri_prices/blob/master/LICENSE. # Author: Ilias Tsergoulas, Website: www.agristats.eu library(shiny) library(shinythemes) library(shinydashboard) library(corrplot) library(Quandl) library(forecast) library(dygraphs) library(lubridate) printMoney <- function(x){ # A function to show number as currency format(x, digits=10, nsmall=2, decimal.mark=",", big.mark=".") } percent <- function(x, digits = 2, format = "f", ...) { # A function to show number as percentage paste0(formatC(100 * x, format = format, digits = digits, ...), "%") } specify_decimal <- function(x, k) format(round(x, k), nsmall=k) # A function to show number with k decimal places Quandl.api_key("KCo4sXzWEzSAb81ff3VP") # Setting API key to have unlimited access to databases data_codes<-c("COM/WLD_SUGAR_EU", "COM/WLD_SUGAR_WLD", "COM/WLD_SUGAR_US", # Setting wanted Quandl database codes "COM/COFFEE_BRZL", "COM/COFFEE_CLMB", "COM/WLD_COFFEE_ARABIC", "COM/WLD_RICE_05", "COM/WLD_RICE_25", "COM/WLD_RICE_05_VNM", "COM/BEEF_S", "COM/BEEF_C", "COM/WLD_BEEF", "COM/WLD_BANANA_EU", "COM/WLD_BANANA_US", "COM/PBANSOP_USD", "COM/WLD_COCOA", "COM/WLD_COTTON_A_INDX", "COM/OATS", "COM/MILK", "COM/EGGS", "COM/BUTTER", "COM/WLD_TOBAC_US","COM/WLD_ORANGE", "COM/WLD_WHEAT_CANADI", "COM/WLD_WHEAT_US_HRW", "COM/WLD_WHEAT_US_SRW", "COM/PWHEAMT_USD", "COM/WOOL", "COM/WOOL_60_62", "COM/WOOL_60", "COM/WOOL_58", "COM/WOOL_62", "COM/CORN_MEAL", "COM/CORN_FEED", "COM/WLD_MAIZE", "COM/PMAIZMT_USD", "COM/WLD_LAMB", "COM/WLD_CHICKEN", "COM/PSHRI_USD", "COM/WLD_SHRIMP_MEX", "COM/WLD_SUNFLOWER_OIL", "COM/WLD_GRNUT_OIL", "COM/WLD_COCONUT_OIL", "COM/WLD_RAPESEED_OIL", "COM/WLD_PALM_OIL", "COM/WLD_SOYBEAN_OIL", "COM/POLVOIL_USD", "COM/WLD_TEA_KOLKATA", "COM/WLD_TEA_MOMBASA", "COM/WLD_TEA_COLOMBO", "COM/WLD_TEA_AVG", "COM/WLD_IBEVERAGES", "COM/WLD_IGRAINS", "COM/WLD_IFOOD", "COM/WLD_IFERTILIZERS", "COM/WLD_IAGRICULTURE", "COM/WLD_IENERGY") # Setting Quandl codes respective description data_descr<-c("Sugar Price, EU, cents/kg", "Sugar Price, world, cents/kg", "Sugar Price, US, cents/kg", "Coffee, Brazilian, Comp.", "Coffee, Colombian, NY lb.", "Coffee Price, Arabica, cents/kg", "Rice, Thai 5% ,($/mt)", "Rice, Thai 25% ,($/mt)", "Rice, Viet Namese 5%,($/mt)", "Beef - Select 1", "Beef - Choice 1", "Beef,($/kg)", "Banana, Europe,($/kg)", "Banana, US,($/kg)", "Bananas, Central American and Ecuador, $/mt", "Cocoa,($/kg)","Cotton, A Index,($/kg)", "Oats, No. 2 milling, Mnpls; $ per bu", "Milk, Nonfat dry, Chicago", "Eggs, large white, Chicago dozen", "Butter, AA Chicago, lb","Tobacco, US import u.v.,($/mt)", "Orange,($/kg)", "Wheat, Canadian,($/mt)", "Wheat, US HRW,($/mt)", "Wheat, US SRW,($/mt)", "Wheat, No.1 Hard Red Winter ($/mt)", "Wool, 64s", "Wool, 60-62s", "Wool, 60s", "Wool, 58s", "Wool, 62s", "Corn gluten meal, Midwest, ton", "Corn gluten feed, Midwest, ton", "Maize,($/mt)", "Maize (corn), U.S. No.2 Yellow, FOB Gulf of Mexico, U.S. price, US$ per metric ton", "Meat, sheep,($/kg)", "Meat, chicken,($/kg)", "Shrimp, shell-on headless, 26-30 count/pound, Mexican origin, $/kg", "Shirmps, Mexican,($/kg)", "Sunflower oil,($/mt)", "Groundnut oil,($/mt)", "Coconut oil,($/mt)", "Rapeseed oil,($/mt)", "Palm oil,($/mt)", "Soybean oil,($/mt)", "Olive Oil, extra virgin less than 1% free fatty acid,($/mt)", "Tea, Kolkata,($/kg)", "Tea, Mombasa,($/kg)", "Tea, Colombo,($/kg)", "Tea, avg 3 auctions,($/kg)", "Beverages Index", "Grains Index", "Food Index", "Fertilizers Index", "Agriculture Index", "Energy Index") data_product<-c("Ζάχαρη","Ζάχαρη","Ζάχαρη", "Καφές","Καφές","Καφές", "Ρύζι","Ρύζι","Ρύζι", "Βοδινό", "Βοδινό", "Βοδινό", "Μπανάνες", "Μπανάνες", "Μπανάνες", "Κακάο", "Βαμβάκι", "Βρώμη","Γάλα", "Αυγά", "Βούτυρο", "Καπνός", "Πορτοκάλια", "Σιτάρι", "Σιτάρι", "Σιτάρι", "Σιτάρι", "Μαλλί", "Μαλλί", "Μαλλί", "Μαλλί", "Μαλλί", "Καλαμπόκι", "Καλαμπόκι", "Καλαμπόκι", "Καλαμπόκι", "Κρέας", "Κρέας", "Γαρίδες", "Γαρίδες", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Έλαια", "Τσάι", "Τσάι", "Τσάι", "Τσάι", "Δείκτες", "Δείκτες", "Δείκτες", "Δείκτες", "Δείκτες", "Δείκτες") data_quandl<-data.frame(data_descr, data_codes, data_product) # Binding codes and description to dataframe header <- dashboardHeader(title = "Τιμές αγροτικών προϊόντων ", titleWidth=1000) # Header of dashboard sidebar <- dashboardSidebar(sidebarMenu( selectInput('commodity', 'Προϊόν', choices = unique(data_quandl$data_product)), selectInput('period', 'Ορίζοντας πρόβλεψης (μήνες)', choices = c("6", "12", "18", "24", "30", "36"), selected='12')), tags$footer(tags$p("Η παρούσα εφαρμογή βασίζεται σε δεδομένα του ιστοτόπου Quandl."))) frow1 <- fluidRow( # Creating row title = "Συνολικά", status="success", collapsible = TRUE, mainPanel(dygraphOutput("view"), width='98%') ) frow2 <- fluidRow( # Creating row status="success", collapsible = TRUE, mainPanel(uiOutput("plots"), width='98%') ) body <- dashboardBody(frow1, frow2) # Binding rows to body of dashboard ui <- dashboardPage(header, sidebar, body, skin="yellow") # Binding elements of dashboard server <- function(input, output) { mydata <- reactive({ # Adding reactive data information data_filtered<-as.data.frame(data_quandl[which(data_quandl$data_product==input$commodity),]) mydata<-data.frame(Date= character(0), Value= character(0), Description=character(0)) for (i in 1:nrow(data_filtered)){ # Getting prices data based on Quandl code temp<-Quandl(as.character(data_filtered[i,2]), collapse = "monthly") temp$Description<-as.character(data_filtered[i,1]) colnames(temp)<-c("Date", "Value", "Description") mydata<-rbind(mydata, temp) } mydata }) mydata_multiple<- reactive({ # Reshaping mydata dataframe for multiple view unique_descriptions<-unique(mydata()$Description) mydata_multiple<-reshape(mydata(), direction = "wide", idvar = "Date", timevar = "Description") #colnames(mydata_multiple)<-c("Date", unique_descriptions[1], unique_descriptions[2], unique_descriptions[3]) mydata_multiple<-xts(mydata_multiple, order.by=as.POSIXct(mydata_multiple$Date)) mydata_multiple<-mydata_multiple[,-c(1)] }) output$view <- renderDygraph({ # Creating chart #combined <- cbind(mydata_multiple(), actual=mydata_multiple()) dygraph(mydata_multiple(), main="Αντιπαραβολή τιμών αγροτικών προϊόντων", group = "commodities")%>% dyAxis("y", label = "Τιμή προϊόντος")%>% dyRangeSelector(height = 20) }) mylength<-reactive({ # Getting number of datasets mylength<-length(unique(mydata()$Description)) }) output$plots <- renderUI({ # Calling createplots() function and plotting dygraphs createPlots() plot_output_list <- lapply(1:mylength(), function(i) { plotname <- paste("plot", i, sep="") dygraphOutput(plotname) }) # Convert the list to a tagList - this is necessary for the list of items # to display properly. do.call(tagList, plot_output_list) }) createPlots <- reactive ({ # Creating dygraph plots for all available datasets # Calling renderPlot for each one. for (i in 1:mylength()) { # With local each item gets its own number. local({ my_i <- i plotname=paste("plot", my_i, sep="") # Setting flexible names mydata_product <- unique(mydata()$Description)[my_i] # Getting unique descriptions mydata_ts<-mydata()[which(mydata()$Description==mydata_product),] mydata_ts<-xts(mydata_ts, order.by=as.POSIXct(mydata_ts$Date)) mydata_predicted <- forecast(as.numeric(mydata_ts$Value), h=as.numeric(input$period)) # Creating forecast mydata_predicted <- data.frame(Date = seq(mdy('11/30/2017'), by = 'months', length.out = as.numeric(input$period)), Forecast = mydata_predicted$mean,Hi_95 = mydata_predicted$upper[,2], Lo_95 = mydata_predicted$lower[,2]) mydata_xts <- xts(mydata_predicted, order.by = as.POSIXct(mydata_predicted$Date)) mydata_predicted <- merge(mydata_ts, mydata_xts) # Merging xts object with forecast mydata_predicted <- mydata_predicted[,c("Value", "Forecast", "Hi_95", "Lo_95")] output[[plotname]] <- renderDygraph({ # Rendering dygraphs dygraph(mydata_predicted, main=mydata_ts[1,3], group = "commodities")%>% dyAxis("y", label = "Τιμή προϊόντος")%>% dyRangeSelector(height = 20) }) }) } }) } shinyApp(ui, server)
#' Rename multiple columns #' #' @description #' Rename multiple columns with the same transformation #' #' @param .data A data.table or data.frame #' @param .fn Function to transform the names with. #' @param .cols Columns to rename. Defaults to all columns. `tidyselect` compatible. #' @param ... Other parameters to pass to the function #' #' @export #' @md #' #' @examples #' example_dt <- data.table::data.table( #' x = 1, #' y = 2, #' double_x = 2, #' double_y = 4) #' #' example_dt %>% #' rename_with.(~ sub("x", "stuff", .x)) #' #' example_dt %>% #' rename_with.(~ sub("x", "stuff", .x), .cols = c(x, double_x)) rename_with. <- function(.data, .fn, .cols = everything.(), ...) { UseMethod("rename_with.") } #' @export rename_with..data.frame <- function(.data, .fn, .cols = everything.(), ...) { .data <- as_tidytable(.data) .cols <- enexpr(.cols) .cols <- as.character(vec_selector(.data, !!.cols)) .data <- shallow(.data) .fn <- as_function(.fn) if (length(.cols) > 0) { new_names <- .fn(.cols, ...) setnames(.data, .cols, new_names) .data } else { .data } } #' @export #' @rdname rename_with. dt_rename_with <- rename_with.
/R/rename_with.R
permissive
lionel-/tidytable
R
false
false
1,190
r
#' Rename multiple columns #' #' @description #' Rename multiple columns with the same transformation #' #' @param .data A data.table or data.frame #' @param .fn Function to transform the names with. #' @param .cols Columns to rename. Defaults to all columns. `tidyselect` compatible. #' @param ... Other parameters to pass to the function #' #' @export #' @md #' #' @examples #' example_dt <- data.table::data.table( #' x = 1, #' y = 2, #' double_x = 2, #' double_y = 4) #' #' example_dt %>% #' rename_with.(~ sub("x", "stuff", .x)) #' #' example_dt %>% #' rename_with.(~ sub("x", "stuff", .x), .cols = c(x, double_x)) rename_with. <- function(.data, .fn, .cols = everything.(), ...) { UseMethod("rename_with.") } #' @export rename_with..data.frame <- function(.data, .fn, .cols = everything.(), ...) { .data <- as_tidytable(.data) .cols <- enexpr(.cols) .cols <- as.character(vec_selector(.data, !!.cols)) .data <- shallow(.data) .fn <- as_function(.fn) if (length(.cols) > 0) { new_names <- .fn(.cols, ...) setnames(.data, .cols, new_names) .data } else { .data } } #' @export #' @rdname rename_with. dt_rename_with <- rename_with.
# The MIT License # # Copyright (c) 2017 Piero Dalle Pezze # # Permission is hereby granted, free of charge, # to any person obtaining a copy of this software and # associated documentation files (the "Software"), to # deal in the Software without restriction, including # without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom # the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice # shall be included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # plot raw time course data source('../utilities/plots.R') source('../utilities/statistics.R') ########## # DATA SET ########## location <- file.path('..', '..', 'data') file <- 'mitophagy_summary_intensity_mean_ch2' suffix <- '.csv' # Load my data data <- read.csv(file.path(location, paste0(file, suffix))) ################### # PLOT TIME COURSES ################### # Plot all time courses. x axis is expanded. Plots have different timings plots <- plot_combined_tc(data, expand.xaxis=TRUE) plot.arrange <- do.call(grid.arrange, c(plots$plots, ncol=5, bottom=paste0(file, suffix))) ggsave(paste0(file, '_all.png'), plot=plot.arrange, width=13, height=13, dpi=300) ########################## # PLOT SPLINE TIME COURSES ########################## # we also plot the splines of these time courses # spar: smoothing parameter, typically (but not necessarily) in (0,1] # spars <- c(0.3, 0.4, 0.5, 0.6) # 0.4 is the best trade-off spars <- c(0.4) for(spar in spars) { data.spline <- spline.data.frame(data, spar) write.table(data.spline, file=file.path(location, paste0(file, '_spline', suffix)), sep=",", row.names=FALSE) # Plot all time course splines. x axis is expanded. Plots have different timings plots <- plot_combined_tc(data.spline, expand.xaxis=TRUE) plot.arrange <- do.call(grid.arrange, c(plots$plots, ncol=5, bottom=paste0(file, '_spline', suffix))) ggsave(paste0(file, '_spline_all.png'), plot=plot.arrange, width=13, height=13, dpi=300) }
/scripts/2_mitophagy_time_courses_plots/mitophagy_time_courses_plots.R
permissive
pdp10/atg13.mitophagy
R
false
false
2,630
r
# The MIT License # # Copyright (c) 2017 Piero Dalle Pezze # # Permission is hereby granted, free of charge, # to any person obtaining a copy of this software and # associated documentation files (the "Software"), to # deal in the Software without restriction, including # without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom # the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice # shall be included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # plot raw time course data source('../utilities/plots.R') source('../utilities/statistics.R') ########## # DATA SET ########## location <- file.path('..', '..', 'data') file <- 'mitophagy_summary_intensity_mean_ch2' suffix <- '.csv' # Load my data data <- read.csv(file.path(location, paste0(file, suffix))) ################### # PLOT TIME COURSES ################### # Plot all time courses. x axis is expanded. Plots have different timings plots <- plot_combined_tc(data, expand.xaxis=TRUE) plot.arrange <- do.call(grid.arrange, c(plots$plots, ncol=5, bottom=paste0(file, suffix))) ggsave(paste0(file, '_all.png'), plot=plot.arrange, width=13, height=13, dpi=300) ########################## # PLOT SPLINE TIME COURSES ########################## # we also plot the splines of these time courses # spar: smoothing parameter, typically (but not necessarily) in (0,1] # spars <- c(0.3, 0.4, 0.5, 0.6) # 0.4 is the best trade-off spars <- c(0.4) for(spar in spars) { data.spline <- spline.data.frame(data, spar) write.table(data.spline, file=file.path(location, paste0(file, '_spline', suffix)), sep=",", row.names=FALSE) # Plot all time course splines. x axis is expanded. Plots have different timings plots <- plot_combined_tc(data.spline, expand.xaxis=TRUE) plot.arrange <- do.call(grid.arrange, c(plots$plots, ncol=5, bottom=paste0(file, '_spline', suffix))) ggsave(paste0(file, '_spline_all.png'), plot=plot.arrange, width=13, height=13, dpi=300) }
source("rankhospital.R") # # Rank All States for the best hospital based on # outcome and specified ranking number. If no # ranking number is passed in use the best value # rankall <- function(outcome, num = "best") { ## Read outcome data repository <- hospitalRepository() statedata <- repository$getAll() if (is.null(statedata)) { stop("Data Load is NULL") } ## Get the outcome which checks the state and outcome are valid if (repository$validOutcome(outcome) <= 0) { stop("invalid outcome") } ## For each state, find the hospital of the given rank stateList <- unique(statedata$State) bestStateHospitals <- data.frame(hospital = character(), state = character(), rank = numeric(), stringsAsFactors = FALSE) i <- 1 for (state in stateList) { data <- repository$getOutcome(state, outcome) result <- rankhospitalState(data, state, outcome, num) hospital <- NA rank <- NA if (!is.null(result) && !is.na(result)) { hospital <- result$Hospital.Name rank <- result[1,2] } bestStateHospitals[i,] <- list(hospital, state, rank) i <- i + 1 } ## Return a data frame with the hospital names and the ## (abbreviated) state name ## Sort the data by State bestStateHospitals[order(bestStateHospitals$state),1:2] }
/rankall.R
no_license
MarkSpoto/ProgrammingAssignment3
R
false
false
1,312
r
source("rankhospital.R") # # Rank All States for the best hospital based on # outcome and specified ranking number. If no # ranking number is passed in use the best value # rankall <- function(outcome, num = "best") { ## Read outcome data repository <- hospitalRepository() statedata <- repository$getAll() if (is.null(statedata)) { stop("Data Load is NULL") } ## Get the outcome which checks the state and outcome are valid if (repository$validOutcome(outcome) <= 0) { stop("invalid outcome") } ## For each state, find the hospital of the given rank stateList <- unique(statedata$State) bestStateHospitals <- data.frame(hospital = character(), state = character(), rank = numeric(), stringsAsFactors = FALSE) i <- 1 for (state in stateList) { data <- repository$getOutcome(state, outcome) result <- rankhospitalState(data, state, outcome, num) hospital <- NA rank <- NA if (!is.null(result) && !is.na(result)) { hospital <- result$Hospital.Name rank <- result[1,2] } bestStateHospitals[i,] <- list(hospital, state, rank) i <- i + 1 } ## Return a data frame with the hospital names and the ## (abbreviated) state name ## Sort the data by State bestStateHospitals[order(bestStateHospitals$state),1:2] }
library(ape) testtree <- read.tree("10417_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="10417_0_unrooted.txt")
/codeml_files/newick_trees_processed_and_cleaned/10417_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
137
r
library(ape) testtree <- read.tree("10417_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="10417_0_unrooted.txt")
arrests<-USArrests df_final<-merge(x=census,y=arrests,by.x="stateName",by.y="row.names") df_final
/mergeArrests.R
no_license
fall2018-wallace/assignment7_siddharth
R
false
false
102
r
arrests<-USArrests df_final<-merge(x=census,y=arrests,by.x="stateName",by.y="row.names") df_final
## Clean and ANNOTATED/FUNCTIONS for yeast borf comps library(data.table) library(tidyverse) library(stringr) library(halpme) library(GenomicRanges) library(stringdist) library(Biostrings) options(stringsAsFactors = F) source("scripts/helper_functions.R") alt_orgs = c('human', 'human', 'yeast', 'yeast') alt_versions = c("cds", "pc", "2sample", "3sample") for(i in 1:length(alt_orgs)){ org = alt_orgs[i] version = alt_versions[i] org_version = ifelse(version=="", org, paste(org, version, sep="_")) org_version_assembly_data = ifelse(org == "human", org, org_version) if(!file.exists(paste0("data/",org_version, "/ALLDATA_upto_lcs.rdata"))){ load(paste0("data/", org, "/processed_ensembl.Rdata")) #### read in Trinity assembly fasta #### trinity = halpme::read_fasta2df(paste0("data/", org_version_assembly_data, "/Trinity.fasta")) trinity$transcript_id = strv_split(trinity$seq_id, "[ ]", 1) trinity$gene_id = strv_split(trinity$transcript_id, "_i", 1) trinity$seq_len = nchar(trinity$seq) #trinity$seq = NULL # keep seq for LCS stuff later # kallisto read counts make_kallisto_summary(org_version = org_version) kallisto = fread(paste0("data/", org_version_assembly_data, "/kallisto/kallisto_est_counts.tsv"),data.table = F, fill=T, sep='\t') kallisto$total_counts = rowSums(kallisto[,-1]) combined_data = trinity[,-which(colnames(trinity) =='seq')] combined_data$counts= kallisto$total_counts[match(combined_data$transcript_id, kallisto$target_id)] combined_data$reads_per_kb = (combined_data$counts / combined_data$seq_len) * 1000 write.table(combined_data, file=paste0("data/", org_version, "/trinity_with_kallisto.txt"), sep='\t', quote=F, row.names = F) # blast cdna --> trinity e2t = fread(paste0("data/",org_version, "/blast_results/cdna2trinity_blast.txt"), data.table=F) colnames(e2t) = c("query", "subject", "p_ident", "length", "mismatch", "gapopen", "qstart", "qend", "sstart", "send", "evalue", "bitscore") # check blastx run on protein ids??? ensembl_peps$protein_id = strv_split(ensembl_peps$seq_id, "[ ]", 1) ensembl_peps$first_aa = ifelse(str_sub(ensembl_peps$seq, 1,1) == "M", "M", "non-M") ########################### e2t = arrange(e2t, evalue) # filter for 1e-30 e2t = e2t[e2t$evalue < 1e-30,] e2t$trinity_gene = strv_split(e2t$subject, "_i",1) e2t$read_counts = combined_data$counts[match(e2t$subject, combined_data$transcript_id)] e2t$reads_per_kb = combined_data$reads_per_kb[match(e2t$subject, combined_data$transcript_id)] max_rpk = aggregate(reads_per_kb ~ gene_id, combined_data, max) e2t$gene_rpk = max_rpk$reads_per_kb[match(e2t$trinity_gene, max_rpk$gene_id)] e2t$match_strand = ifelse(((e2t$qend - e2t$qstart > 0) & (e2t$send - e2t$sstart > 0)) | ((e2t$qend - e2t$qstart < 0) & (e2t$send - e2t$sstart < 0)), "+", "-") e2t$query_gene = gsub("_mRNA", "", e2t$query) rm(max_rpk) # filter by read counts (min 100 reads per 1000 nt of assembled 'transcript' or an average of 10x coverage for 100bp reads) e2t.filtered = arrange(e2t, evalue) e2t.filtered = e2t.filtered[e2t.filtered$reads_per_kb >= 100 | e2t.filtered$read_counts >=10,] e2t.filtered = e2t.filtered[!duplicated(paste0(e2t.filtered$query, e2t.filtered$subject)),] # split into trinity genes (not isoforms) with a single blast hit and those with multiple hits no_dups = which(!duplicated(paste0(e2t.filtered$query, e2t.filtered$trinity_gene))) one_match_trinity_genes = table(e2t.filtered$trinity_gene[no_dups]) %>% as.data.frame() %>% filter(Freq==1) e2t_single_gene_match = e2t.filtered[e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1,] e2t_multi_gene_match = e2t.filtered[!(e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1),] rm(e2t.filtered, no_dups, one_match_trinity_genes) # POSITIVE STRAND matches ONLY # filter by read counts (min 100 reads per 1000 nt of assembled 'transcript' or an average of 10x coverage for 100bp reads) e2t.filtered = arrange(e2t, evalue) e2t.filtered = e2t.filtered[e2t.filtered$reads_per_kb >= 100 | e2t.filtered$read_counts >=10,] e2t.filtered = e2t.filtered[e2t.filtered$match_strand == "+",] e2t.filtered = e2t.filtered[!duplicated(paste0(e2t.filtered$query, e2t.filtered$subject)),] # split into trinity genes (not isoforms) with a single blast hit and those with multiple hits no_dups = which(!duplicated(paste0(e2t.filtered$query, e2t.filtered$trinity_gene))) one_match_trinity_genes = table(e2t.filtered$trinity_gene[no_dups]) %>% as.data.frame() %>% filter(Freq==1) e2t_single_gene_match_pos = e2t.filtered[e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1,] e2t_multi_gene_match_pos = e2t.filtered[!(e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1),] # write trinity ids to file so we don't blast transcripts that aren't expressed write.table(unique(c(e2t_multi_gene_match$subject, e2t_multi_gene_match_pos$subject)), file=paste0("data/", org_version, "/blastx_filter_trinity_ids.txt"), quote=F, row.names = F, col.names = F, sep='\n') # blastx to match to best blastx = fread(paste0("data/",org_version, "/blast_results/blastx_trinity2pep.txt"), data.table = F, fill=T) colnames(blastx) = c("query", "subject", "p_ident", "length", "mismatch", "gapopen", "qstart", "qend", "sstart", "send", "evalue", "bitscore","sframe", "qframe") ## combine multi blastx hits to single line blastx = combine_blastx_lines(blastx) blastx$transcript_id = ensembl_peps$transcript[match(blastx$subject, ensembl_peps$protein_id)] blastx$ensembl_pep_len = ensembl_peps$length[match(blastx$transcript_id, ensembl_peps$transcript)] blastx$subject_match_length = abs(blastx$send - blastx$sstart) +1 blastx$subject_first_aa = ensembl_peps$first_aa[match(blastx$transcript_id, ensembl_peps$transcript)] blastx$subject_coverage = blastx$subject_match_length / blastx$ensembl_pep_len blastx = arrange(blastx, query, evalue, desc(subject_coverage), desc(p_ident*length)) blastx$match_strand = ifelse(blastx$qframe < 0, "-","+") e2t_multi_gene_match = e2t_multi_gene_match[,c(1:18)] e2t_multi_gene_match = left_join(e2t_multi_gene_match, blastx, suffix = c('', '.blastx'), by=c('subject'='query', 'query'='transcript_id')) # filter by subject coverage FIRST, then evalue etc... e2t_multi_gene_match = arrange(e2t_multi_gene_match, subject, desc(subject_coverage), evalue.blastx, desc(p_ident.blastx*length.blastx), evalue, desc(bitscore)) multi_match_best_hit = e2t_multi_gene_match[!duplicated(e2t_multi_gene_match$subject),] multi_match_best_hit$match_type = "multi" e2t_single_gene_match$match_type = "single" e2t_best_matches = rbind(e2t_single_gene_match[,c(1,2)], multi_match_best_hit[,c(1,2)]) e2t_multi_gene_match_pos = e2t_multi_gene_match_pos[,c(1:18)] e2t_multi_gene_match_pos = left_join(e2t_multi_gene_match_pos, blastx, suffix = c('', '.blastx'), by=c('subject'='query', 'query'='transcript_id')) e2t_multi_gene_match_pos = arrange(e2t_multi_gene_match_pos, subject, desc(subject_coverage),evalue.blastx, desc(p_ident.blastx*length.blastx), evalue, desc(bitscore)) multi_match_best_hit_pos = e2t_multi_gene_match_pos[!duplicated(e2t_multi_gene_match_pos$subject),] multi_match_best_hit_pos$match_type = "multi" e2t_single_gene_match_pos$match_type = "single" e2t_best_matches_pos = rbind(e2t_single_gene_match_pos[,c(1,2)], multi_match_best_hit_pos[,c(1,2)]) e2t_best_matches_do_pos = rbind(e2t_best_matches, e2t_best_matches_pos) %>% distinct() e2t_best_matches_do_neg = e2t_best_matches save(e2t_best_matches_do_pos, e2t_best_matches_do_neg, trinity, ensembl_peps,longest_common_substring, file=paste0("data/", org_version, "/upto_lcs.rdata")) save.image(paste0("data/",org_version, "/ALLDATA_upto_lcs.rdata")) } } ##################################################################### # then run lcs in parts
/scripts/altdata_process_upto_lcs.R
no_license
signalbash/borf_analysis
R
false
false
8,267
r
## Clean and ANNOTATED/FUNCTIONS for yeast borf comps library(data.table) library(tidyverse) library(stringr) library(halpme) library(GenomicRanges) library(stringdist) library(Biostrings) options(stringsAsFactors = F) source("scripts/helper_functions.R") alt_orgs = c('human', 'human', 'yeast', 'yeast') alt_versions = c("cds", "pc", "2sample", "3sample") for(i in 1:length(alt_orgs)){ org = alt_orgs[i] version = alt_versions[i] org_version = ifelse(version=="", org, paste(org, version, sep="_")) org_version_assembly_data = ifelse(org == "human", org, org_version) if(!file.exists(paste0("data/",org_version, "/ALLDATA_upto_lcs.rdata"))){ load(paste0("data/", org, "/processed_ensembl.Rdata")) #### read in Trinity assembly fasta #### trinity = halpme::read_fasta2df(paste0("data/", org_version_assembly_data, "/Trinity.fasta")) trinity$transcript_id = strv_split(trinity$seq_id, "[ ]", 1) trinity$gene_id = strv_split(trinity$transcript_id, "_i", 1) trinity$seq_len = nchar(trinity$seq) #trinity$seq = NULL # keep seq for LCS stuff later # kallisto read counts make_kallisto_summary(org_version = org_version) kallisto = fread(paste0("data/", org_version_assembly_data, "/kallisto/kallisto_est_counts.tsv"),data.table = F, fill=T, sep='\t') kallisto$total_counts = rowSums(kallisto[,-1]) combined_data = trinity[,-which(colnames(trinity) =='seq')] combined_data$counts= kallisto$total_counts[match(combined_data$transcript_id, kallisto$target_id)] combined_data$reads_per_kb = (combined_data$counts / combined_data$seq_len) * 1000 write.table(combined_data, file=paste0("data/", org_version, "/trinity_with_kallisto.txt"), sep='\t', quote=F, row.names = F) # blast cdna --> trinity e2t = fread(paste0("data/",org_version, "/blast_results/cdna2trinity_blast.txt"), data.table=F) colnames(e2t) = c("query", "subject", "p_ident", "length", "mismatch", "gapopen", "qstart", "qend", "sstart", "send", "evalue", "bitscore") # check blastx run on protein ids??? ensembl_peps$protein_id = strv_split(ensembl_peps$seq_id, "[ ]", 1) ensembl_peps$first_aa = ifelse(str_sub(ensembl_peps$seq, 1,1) == "M", "M", "non-M") ########################### e2t = arrange(e2t, evalue) # filter for 1e-30 e2t = e2t[e2t$evalue < 1e-30,] e2t$trinity_gene = strv_split(e2t$subject, "_i",1) e2t$read_counts = combined_data$counts[match(e2t$subject, combined_data$transcript_id)] e2t$reads_per_kb = combined_data$reads_per_kb[match(e2t$subject, combined_data$transcript_id)] max_rpk = aggregate(reads_per_kb ~ gene_id, combined_data, max) e2t$gene_rpk = max_rpk$reads_per_kb[match(e2t$trinity_gene, max_rpk$gene_id)] e2t$match_strand = ifelse(((e2t$qend - e2t$qstart > 0) & (e2t$send - e2t$sstart > 0)) | ((e2t$qend - e2t$qstart < 0) & (e2t$send - e2t$sstart < 0)), "+", "-") e2t$query_gene = gsub("_mRNA", "", e2t$query) rm(max_rpk) # filter by read counts (min 100 reads per 1000 nt of assembled 'transcript' or an average of 10x coverage for 100bp reads) e2t.filtered = arrange(e2t, evalue) e2t.filtered = e2t.filtered[e2t.filtered$reads_per_kb >= 100 | e2t.filtered$read_counts >=10,] e2t.filtered = e2t.filtered[!duplicated(paste0(e2t.filtered$query, e2t.filtered$subject)),] # split into trinity genes (not isoforms) with a single blast hit and those with multiple hits no_dups = which(!duplicated(paste0(e2t.filtered$query, e2t.filtered$trinity_gene))) one_match_trinity_genes = table(e2t.filtered$trinity_gene[no_dups]) %>% as.data.frame() %>% filter(Freq==1) e2t_single_gene_match = e2t.filtered[e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1,] e2t_multi_gene_match = e2t.filtered[!(e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1),] rm(e2t.filtered, no_dups, one_match_trinity_genes) # POSITIVE STRAND matches ONLY # filter by read counts (min 100 reads per 1000 nt of assembled 'transcript' or an average of 10x coverage for 100bp reads) e2t.filtered = arrange(e2t, evalue) e2t.filtered = e2t.filtered[e2t.filtered$reads_per_kb >= 100 | e2t.filtered$read_counts >=10,] e2t.filtered = e2t.filtered[e2t.filtered$match_strand == "+",] e2t.filtered = e2t.filtered[!duplicated(paste0(e2t.filtered$query, e2t.filtered$subject)),] # split into trinity genes (not isoforms) with a single blast hit and those with multiple hits no_dups = which(!duplicated(paste0(e2t.filtered$query, e2t.filtered$trinity_gene))) one_match_trinity_genes = table(e2t.filtered$trinity_gene[no_dups]) %>% as.data.frame() %>% filter(Freq==1) e2t_single_gene_match_pos = e2t.filtered[e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1,] e2t_multi_gene_match_pos = e2t.filtered[!(e2t.filtered$trinity_gene %in% one_match_trinity_genes$Var1),] # write trinity ids to file so we don't blast transcripts that aren't expressed write.table(unique(c(e2t_multi_gene_match$subject, e2t_multi_gene_match_pos$subject)), file=paste0("data/", org_version, "/blastx_filter_trinity_ids.txt"), quote=F, row.names = F, col.names = F, sep='\n') # blastx to match to best blastx = fread(paste0("data/",org_version, "/blast_results/blastx_trinity2pep.txt"), data.table = F, fill=T) colnames(blastx) = c("query", "subject", "p_ident", "length", "mismatch", "gapopen", "qstart", "qend", "sstart", "send", "evalue", "bitscore","sframe", "qframe") ## combine multi blastx hits to single line blastx = combine_blastx_lines(blastx) blastx$transcript_id = ensembl_peps$transcript[match(blastx$subject, ensembl_peps$protein_id)] blastx$ensembl_pep_len = ensembl_peps$length[match(blastx$transcript_id, ensembl_peps$transcript)] blastx$subject_match_length = abs(blastx$send - blastx$sstart) +1 blastx$subject_first_aa = ensembl_peps$first_aa[match(blastx$transcript_id, ensembl_peps$transcript)] blastx$subject_coverage = blastx$subject_match_length / blastx$ensembl_pep_len blastx = arrange(blastx, query, evalue, desc(subject_coverage), desc(p_ident*length)) blastx$match_strand = ifelse(blastx$qframe < 0, "-","+") e2t_multi_gene_match = e2t_multi_gene_match[,c(1:18)] e2t_multi_gene_match = left_join(e2t_multi_gene_match, blastx, suffix = c('', '.blastx'), by=c('subject'='query', 'query'='transcript_id')) # filter by subject coverage FIRST, then evalue etc... e2t_multi_gene_match = arrange(e2t_multi_gene_match, subject, desc(subject_coverage), evalue.blastx, desc(p_ident.blastx*length.blastx), evalue, desc(bitscore)) multi_match_best_hit = e2t_multi_gene_match[!duplicated(e2t_multi_gene_match$subject),] multi_match_best_hit$match_type = "multi" e2t_single_gene_match$match_type = "single" e2t_best_matches = rbind(e2t_single_gene_match[,c(1,2)], multi_match_best_hit[,c(1,2)]) e2t_multi_gene_match_pos = e2t_multi_gene_match_pos[,c(1:18)] e2t_multi_gene_match_pos = left_join(e2t_multi_gene_match_pos, blastx, suffix = c('', '.blastx'), by=c('subject'='query', 'query'='transcript_id')) e2t_multi_gene_match_pos = arrange(e2t_multi_gene_match_pos, subject, desc(subject_coverage),evalue.blastx, desc(p_ident.blastx*length.blastx), evalue, desc(bitscore)) multi_match_best_hit_pos = e2t_multi_gene_match_pos[!duplicated(e2t_multi_gene_match_pos$subject),] multi_match_best_hit_pos$match_type = "multi" e2t_single_gene_match_pos$match_type = "single" e2t_best_matches_pos = rbind(e2t_single_gene_match_pos[,c(1,2)], multi_match_best_hit_pos[,c(1,2)]) e2t_best_matches_do_pos = rbind(e2t_best_matches, e2t_best_matches_pos) %>% distinct() e2t_best_matches_do_neg = e2t_best_matches save(e2t_best_matches_do_pos, e2t_best_matches_do_neg, trinity, ensembl_peps,longest_common_substring, file=paste0("data/", org_version, "/upto_lcs.rdata")) save.image(paste0("data/",org_version, "/ALLDATA_upto_lcs.rdata")) } } ##################################################################### # then run lcs in parts
setwd("~/Code/HappiTweet") library(ggplot2) library(reshape) library(scales) library(tableplot) library(plyr) library(xtable) mode <- function(x) { d <- density(x, from=1, to=9 , adjust = 0.805) d$x[which.max(d$y)] } # Open csv with state for each point anew_scores <- read.csv("data/scores_with_state_and_county_hedonometer.csv", header = TRUE, colClasses=c(NA,'NULL',NA)) split_by_state <- split(anew_scores, anew_scores$state) split_by_state[['district of columbia']] <- NULL # vector with mean by each state scores_mean <- sapply(split_by_state, function(x) round(mean(x$anew_score), digits=2)) scores_sd <- sapply(split_by_state, function(x) round(sd(x$anew_score), digits=2)) scores_median <- sapply(split_by_state, function(x) round(median(x$anew_score), digits=2)) scores_mode <- sapply(split_by_state, function(x) round(mode(x$anew_score), digits=2)) gallup <- read.csv("data/rescale_gallup.csv", header = TRUE, colClasses=c(NA,NA,'NULL')) colnames(gallup)[2] <- "gallup_score" # gallup <- sapply(split(gallup_df, gallup_df$state), function(x) x$gallup_score) gallup$gallup_ranking = rank(-gallup$gallup_score, ties.method= "first") # add geo_happy paper ranking geo_happy <- read.csv("data/geo_happy.csv", header = TRUE) gallup$geo_happy_score = sapply(split(geo_happy, geo_happy$state), function(x) x$score)[gallup$state] gallup$geo_happy_ranking = rank(-gallup$geo_happy_score, ties.method= "first") # statistics gallup$anew_score_mean = scores_mean[gallup$state] gallup$anew_score_sd = scores_sd[gallup$state] gallup$anew_score_median = scores_median[gallup$state] gallup$anew_score_mode = scores_mode[gallup$state] gallup$anew_ranking = rank(-gallup$anew_score_mode, ties.method= "first") gallup$mean_diff = round(gallup$gallup_score - gallup$anew_score_mean, digits=2) gallup$median_diff = round(gallup$gallup_score - gallup$anew_score_median, digits=2) gallup$mode_diff = round(gallup$gallup_score - gallup$anew_score_mode, digits=2) # count tweets by state count(anew_scores, c('state'))[-8, ]$freq gallup$tweets <- count(anew_scores, c('state'))[-8, ]$freq mean(gallup$anew_score_mean) mean(gallup$anew_score_median) mean(gallup$anew_score_mode) mean(gallup$tweets) mean(gallup$mean_diff) mean(gallup$median_diff) mean(gallup$mode_diff) mean(gallup$anew_score_sd) cor(gallup$gallup_score , gallup$anew_score_mean) cor(gallup$gallup_score , gallup$anew_score_median) cor(gallup$gallup_score , gallup$anew_score_mode) cor(gallup$gallup_score , gallup$geo_happy_score) cor(gallup$anew_score_mode , gallup$geo_happy_score) # ggplot(gallup, aes(x=gallup_score, y=anew_score_mode)) + geom_point(shape=1) + geom_smooth(method=lm, se=FALSE) cor(gallup$median_diff , gallup$anew_score_sd) cor(gallup$mode_diff , gallup$anew_score_sd) cor(gallup$tweets, gallup$mean_diff) cor(gallup$tweets, gallup$median_diff) cor(gallup$tweets, gallup$mode_diff) cor(gallup$tweets, gallup$anew_score_sd) cor(gallup$tweets, gallup$anew_ranking) cor(gallup$tweets, gallup$anew_score_mode) # reorder columns gallup <- gallup[c("state", "tweets", "anew_ranking", "gallup_ranking", "gallup_score", "anew_score_mode", "mode_diff", "anew_score_median", "median_diff", "anew_score_mean", "mean_diff", "anew_score_sd")] gallup <- gallup[with(gallup, order(anew_ranking)), ] gallup table <- xtable(gallup) print(table)
/charts/table_data.R
no_license
jfloff/sigr
R
false
false
3,320
r
setwd("~/Code/HappiTweet") library(ggplot2) library(reshape) library(scales) library(tableplot) library(plyr) library(xtable) mode <- function(x) { d <- density(x, from=1, to=9 , adjust = 0.805) d$x[which.max(d$y)] } # Open csv with state for each point anew_scores <- read.csv("data/scores_with_state_and_county_hedonometer.csv", header = TRUE, colClasses=c(NA,'NULL',NA)) split_by_state <- split(anew_scores, anew_scores$state) split_by_state[['district of columbia']] <- NULL # vector with mean by each state scores_mean <- sapply(split_by_state, function(x) round(mean(x$anew_score), digits=2)) scores_sd <- sapply(split_by_state, function(x) round(sd(x$anew_score), digits=2)) scores_median <- sapply(split_by_state, function(x) round(median(x$anew_score), digits=2)) scores_mode <- sapply(split_by_state, function(x) round(mode(x$anew_score), digits=2)) gallup <- read.csv("data/rescale_gallup.csv", header = TRUE, colClasses=c(NA,NA,'NULL')) colnames(gallup)[2] <- "gallup_score" # gallup <- sapply(split(gallup_df, gallup_df$state), function(x) x$gallup_score) gallup$gallup_ranking = rank(-gallup$gallup_score, ties.method= "first") # add geo_happy paper ranking geo_happy <- read.csv("data/geo_happy.csv", header = TRUE) gallup$geo_happy_score = sapply(split(geo_happy, geo_happy$state), function(x) x$score)[gallup$state] gallup$geo_happy_ranking = rank(-gallup$geo_happy_score, ties.method= "first") # statistics gallup$anew_score_mean = scores_mean[gallup$state] gallup$anew_score_sd = scores_sd[gallup$state] gallup$anew_score_median = scores_median[gallup$state] gallup$anew_score_mode = scores_mode[gallup$state] gallup$anew_ranking = rank(-gallup$anew_score_mode, ties.method= "first") gallup$mean_diff = round(gallup$gallup_score - gallup$anew_score_mean, digits=2) gallup$median_diff = round(gallup$gallup_score - gallup$anew_score_median, digits=2) gallup$mode_diff = round(gallup$gallup_score - gallup$anew_score_mode, digits=2) # count tweets by state count(anew_scores, c('state'))[-8, ]$freq gallup$tweets <- count(anew_scores, c('state'))[-8, ]$freq mean(gallup$anew_score_mean) mean(gallup$anew_score_median) mean(gallup$anew_score_mode) mean(gallup$tweets) mean(gallup$mean_diff) mean(gallup$median_diff) mean(gallup$mode_diff) mean(gallup$anew_score_sd) cor(gallup$gallup_score , gallup$anew_score_mean) cor(gallup$gallup_score , gallup$anew_score_median) cor(gallup$gallup_score , gallup$anew_score_mode) cor(gallup$gallup_score , gallup$geo_happy_score) cor(gallup$anew_score_mode , gallup$geo_happy_score) # ggplot(gallup, aes(x=gallup_score, y=anew_score_mode)) + geom_point(shape=1) + geom_smooth(method=lm, se=FALSE) cor(gallup$median_diff , gallup$anew_score_sd) cor(gallup$mode_diff , gallup$anew_score_sd) cor(gallup$tweets, gallup$mean_diff) cor(gallup$tweets, gallup$median_diff) cor(gallup$tweets, gallup$mode_diff) cor(gallup$tweets, gallup$anew_score_sd) cor(gallup$tweets, gallup$anew_ranking) cor(gallup$tweets, gallup$anew_score_mode) # reorder columns gallup <- gallup[c("state", "tweets", "anew_ranking", "gallup_ranking", "gallup_score", "anew_score_mode", "mode_diff", "anew_score_median", "median_diff", "anew_score_mean", "mean_diff", "anew_score_sd")] gallup <- gallup[with(gallup, order(anew_ranking)), ] gallup table <- xtable(gallup) print(table)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animate.R \name{images_to_gif} \alias{images_to_gif} \title{Create a gif animatation using ImageMagick's convert} \usage{ images_to_gif( FF, output_filename = "animation.gif", convert_extra = "-loop 0 -delay 50" ) } \arguments{ \item{FF}{charcater vector of PNG filenames} \item{output_filename}{the name of the output file, by default 'animation.gif'} \item{convert_extra}{character of extra conver arguments. Defaults to "-loop 0 -delay = 50" for infinte looping and 0.5s per frame} } \value{ the numeric value returned by convert } \description{ Create a gif animatation using ImageMagick's convert } \seealso{ \url{http://www.imagemagick.org/Usage/anim_basics/} \url{http://imagemagick.org/script/command-line-processing.php} }
/man/images_to_gif.Rd
permissive
BigelowLab/dismotools
R
false
true
820
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animate.R \name{images_to_gif} \alias{images_to_gif} \title{Create a gif animatation using ImageMagick's convert} \usage{ images_to_gif( FF, output_filename = "animation.gif", convert_extra = "-loop 0 -delay 50" ) } \arguments{ \item{FF}{charcater vector of PNG filenames} \item{output_filename}{the name of the output file, by default 'animation.gif'} \item{convert_extra}{character of extra conver arguments. Defaults to "-loop 0 -delay = 50" for infinte looping and 0.5s per frame} } \value{ the numeric value returned by convert } \description{ Create a gif animatation using ImageMagick's convert } \seealso{ \url{http://www.imagemagick.org/Usage/anim_basics/} \url{http://imagemagick.org/script/command-line-processing.php} }
#!/usr/bin/env Rscript # Standardise data from Sarkisyan et al. 2016 (GFP) source('src/config.R') source('src/study_standardising.R') # Import and process data meta <- read_yaml('data/studies/sarkisyan_2016_gfp/sarkisyan_2016_gfp.yaml') raw_data <- read_tsv('data/studies/sarkisyan_2016_gfp/raw/amino_acid_genotypes_to_brightness.tsv', skip = 1, col_names = c('mut', 'barcodes', 'median_brightness', 'std')) wt_brightness <- filter(raw_data, is.na(mut)) %>% pull(median_brightness) dm_data <- mutate(raw_data, n_mut = str_count(mut, ':') + 1) %>% filter(n_mut <= 3) %>% separate(mut, into = str_c('mut', 1:3), sep = ':', fill = 'right') %>% pivot_longer(cols = starts_with('mut'), names_to = 'n', names_prefix = 'mut', values_to = 'mut') %>% drop_na(mut) %>% select(-n, -barcodes, -std) %>% tidyr::extract(mut, into = c('wt', 'position', 'mut'), 'S([A-Z])([0-9]+)([A-Z*])', convert=TRUE, remove=FALSE) %>% mutate(position = position + 2) %>% # Numbered from 3rd residue for some reason arrange(position, mut) %>% group_by(position, wt, mut) %>% summarise(raw_score = if_else(1 %in% n_mut, mean(median_brightness[n_mut == 1], na.rm = TRUE), # Use value of single mut if available mean(median_brightness[n_mut <= 4], na.rm = TRUE))) %>% ungroup() %>% mutate(transformed_score = log2(raw_score / wt_brightness), score = normalise_score(transformed_score), class = get_variant_class(wt, mut)) # Save output standardise_study(dm_data, meta$study, meta$transform)
/data/studies/sarkisyan_2016_gfp/standardise_sarkisyan_2016_gfp.R
permissive
ostrokach/aa_subtypes
R
false
false
1,556
r
#!/usr/bin/env Rscript # Standardise data from Sarkisyan et al. 2016 (GFP) source('src/config.R') source('src/study_standardising.R') # Import and process data meta <- read_yaml('data/studies/sarkisyan_2016_gfp/sarkisyan_2016_gfp.yaml') raw_data <- read_tsv('data/studies/sarkisyan_2016_gfp/raw/amino_acid_genotypes_to_brightness.tsv', skip = 1, col_names = c('mut', 'barcodes', 'median_brightness', 'std')) wt_brightness <- filter(raw_data, is.na(mut)) %>% pull(median_brightness) dm_data <- mutate(raw_data, n_mut = str_count(mut, ':') + 1) %>% filter(n_mut <= 3) %>% separate(mut, into = str_c('mut', 1:3), sep = ':', fill = 'right') %>% pivot_longer(cols = starts_with('mut'), names_to = 'n', names_prefix = 'mut', values_to = 'mut') %>% drop_na(mut) %>% select(-n, -barcodes, -std) %>% tidyr::extract(mut, into = c('wt', 'position', 'mut'), 'S([A-Z])([0-9]+)([A-Z*])', convert=TRUE, remove=FALSE) %>% mutate(position = position + 2) %>% # Numbered from 3rd residue for some reason arrange(position, mut) %>% group_by(position, wt, mut) %>% summarise(raw_score = if_else(1 %in% n_mut, mean(median_brightness[n_mut == 1], na.rm = TRUE), # Use value of single mut if available mean(median_brightness[n_mut <= 4], na.rm = TRUE))) %>% ungroup() %>% mutate(transformed_score = log2(raw_score / wt_brightness), score = normalise_score(transformed_score), class = get_variant_class(wt, mut)) # Save output standardise_study(dm_data, meta$study, meta$transform)
#' @title Spek Extractor Convenience Functions #' @description Get the name of the id column in the data from the spek get_id_col_from_spek <- function(spek) { column_list <- get_column_list(spek) column_names <- sapply(column_list, FUN=get_name_of_column) column_uses <- sapply(column_list, FUN=get_use_of_column) return(column_names[which(column_uses == "identifier")]) } get_value_or_numerator_col_from_spek <- function(spek) { column_list <- get_column_list(spek) column_names <- sapply(column_list, FUN=get_name_of_column) column_uses <- sapply(column_list, FUN=get_use_of_column) return(column_names[which(column_uses == "value" | column_uses == "numerator")]) } get_column_names_by_use <- function(spek, use){ column_list <- get_column_list(spek) column_names <- sapply(column_list, FUN=get_name_of_column) column_uses <- sapply(column_list, FUN=get_use_of_column) return(column_names[which(column_uses == use)]) } get_column_list <- function(spek) { spek[[PT$INPUT_TABLE_URI]][[1]][[PT$TABLE_SCHEMA_URI]][[1]][[PT$COLUMN_URI]] } get_name_of_column <- function(column_specification) { column_specification[[PT$COLUMN_NAME_URI]][[1]][['@value']] } get_use_of_column <- function(column_specification) { column_specification[[PT$COLUMN_USE_URI]][[1]][['@value']] }
/R/spek_extractors.R
no_license
Display-Lab/pictoralist
R
false
false
1,307
r
#' @title Spek Extractor Convenience Functions #' @description Get the name of the id column in the data from the spek get_id_col_from_spek <- function(spek) { column_list <- get_column_list(spek) column_names <- sapply(column_list, FUN=get_name_of_column) column_uses <- sapply(column_list, FUN=get_use_of_column) return(column_names[which(column_uses == "identifier")]) } get_value_or_numerator_col_from_spek <- function(spek) { column_list <- get_column_list(spek) column_names <- sapply(column_list, FUN=get_name_of_column) column_uses <- sapply(column_list, FUN=get_use_of_column) return(column_names[which(column_uses == "value" | column_uses == "numerator")]) } get_column_names_by_use <- function(spek, use){ column_list <- get_column_list(spek) column_names <- sapply(column_list, FUN=get_name_of_column) column_uses <- sapply(column_list, FUN=get_use_of_column) return(column_names[which(column_uses == use)]) } get_column_list <- function(spek) { spek[[PT$INPUT_TABLE_URI]][[1]][[PT$TABLE_SCHEMA_URI]][[1]][[PT$COLUMN_URI]] } get_name_of_column <- function(column_specification) { column_specification[[PT$COLUMN_NAME_URI]][[1]][['@value']] } get_use_of_column <- function(column_specification) { column_specification[[PT$COLUMN_USE_URI]][[1]][['@value']] }
library(shiny) library(shinydashboard) library(dplyr) library(magrittr) library(plotly) library(dygraphs) library(tidyquant) library(lubridate) library(forecast) library(Hmisc) options(warn=-1) sample_data = read.csv('sample data.csv', stringsAsFactors = FALSE) sample_data$month = factor(sample_data$month, levels = month.name) sample_data$day = factor(sample_data$day, levels = c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) ui = navbarPage("BI ASSISTANT",id="nav", tabPanel("Dashboard", dashboardPage( dashboardHeader(disable = TRUE), dashboardSidebar(disable = TRUE), dashboardBody( fluidRow( singleton(tags$head( tags$script(src="//cdnjs.cloudflare.com/ajax/libs/annyang/1.4.0/annyang.min.js"), tags$script(src="//code.responsivevoice.org/responsivevoice.js"), includeScript('init.js'), tags$style(type="text/css", ".shiny-output-error { visibility: hidden; }", ".shiny-output-error:before { visibility: hidden; }", ".dygraph-label.dygraph-title { font-weight: normal; }" ) ) ) ), fluidRow( valueBoxOutput("quantity", width = 4), valueBoxOutput("sales", width = 4), valueBoxOutput("profit", width = 4) ), fluidRow( column(width = 6, box(solidHeader = TRUE, width = 12, collapsible = TRUE,color="purple", dygraphOutput("trend", height = 200)), box(solidHeader = TRUE, width = 6, collapsible = TRUE,color="purple", plotlyOutput("salesbar1", height = 200), height = 250), box(solidHeader = TRUE, width = 6, collapsible = TRUE,color="purple", plotlyOutput("sankey", height = 200, width = "100%"), height = 250) ), column(width = 6, box(solidHeader = TRUE, width = 12, collapsible = TRUE,color="purple", plotlyOutput("hmap", height = 200)), box(solidHeader = TRUE, width = 12, collapsible = TRUE,color="purple", plotlyOutput("regression", height = 200), height = 250) )) ) ) ), tabPanel("How to Use", htmlOutput("pdf") )) server = function (input, output, session) { output$quantity = renderValueBox({ valueBox(sum(sample_data$quantity) , "Quantity", icon = icon("signal"), color = "purple" ) }) output$sales = renderValueBox({ valueBox(round(sum(sample_data$sales),0) , "Sales", icon = icon("signal"), color = "purple" ) }) output$profit = renderValueBox({ valueBox(round(sum(sample_data$profit),0) , "Profit", icon = icon("signal"), color = "purple" ) }) output$trend = renderDygraph({ sample_data$date = as.Date(sample_data$date, format = "%m/%d/%y") met = as.character(input$metric3) orderdate = "date" quant_ts = sample_data[,c(orderdate, met)] colnames(quant_ts)[2] = met quant_ts_grouped = quant_ts %>% group_by(date) %>% summarise_all(sum) date = seq.Date(as.Date(min(quant_ts_grouped$date)), as.Date(max(quant_ts_grouped$date)), by = "day") join_dates = as.data.frame(date) new_ts = merge(join_dates, quant_ts_grouped, by = 'date', all.x = TRUE) new_ts[is.na(new_ts)] = 0 min_year = year(min(quant_ts_grouped$date)) min_month = month(min(quant_ts_grouped$date)) min_day = day(min(quant_ts_grouped$date)) new_ts_for = ts(new_ts[2], start = c(min_year,min_month,min_day), frequency = 365.25) h = input$h h = as.numeric(h) fit_aic = Inf fit_order = c(0,0,0) for (p in 1:4) for (d in 0:1) for (q in 1:4) { fitcurrent_aic = AIC(arima(new_ts_for, order=c(p, d, q),method="ML")) if (fitcurrent_aic < fit_aic) { fit_aic = fitcurrent_aic fit_order <- c(p, d, q) } } fit = Arima(new_ts_for, order = fit_order,method="ML") pred = forecast(fit, h = h) actuals = pred$x lower = pred$lower[,2] upper = pred$upper[,2] point_forecast = pred$mean max_new_ts = max(new_ts$date) max_new_ts_num = as.numeric(max_new_ts) max_plus = as.numeric(max_new_ts_num+h) min_new_ts = min(new_ts$date) se = seq(as.numeric(min_new_ts), as.numeric(max_plus)) se = as.Date(se) all = cbind(actuals, lower, upper, point_forecast, se) all = xts(all, order.by = as.Date(se)) all = xts(all, order.by = index(all)) all$se = NULL chart_title = paste0(capitalize(met), " Trend Over Time") dygraph(all, main = chart_title) %>% dyAxis('y', met) %>% dyRangeSelector(dateWindow = c(max_new_ts-h, max_new_ts+h)) %>% dySeries("actuals", label = "Actual") %>% dySeries(c("lower", "point_forecast", "upper"), label = "Predicted") }) output$salesbar1 = renderPlotly({ col = input$dimension col = tolower(col) col = as.character(col) met = input$metric met = tolower(met) met = as.character(met) nd = aggregate(sample_data[,met]~sample_data[,col], data = sample_data, FUN = sum) colnames(nd) = c("dimension", "metric") nd = nd %>% arrange(desc(metric)) nd$dimension = reorder(x=nd$dimension, X = nd$metric, FUN = sum) sum_of = "Sum Of " by = " by " plot_ly(nd, x = ~metric, y = ~dimension, type = "bar", orientation = "h", text = ~dimension, textposition = 'auto', textfont = list(color = 'rgb(255,255,255)'),marker = list(color = 'rgb(95,92,168)', line = list(color = 'rgb(255,255,255)'))) %>% layout(title = paste0(sum_of,capitalize(met),by,capitalize(col)),xaxis = list(title = ""), yaxis = list(title = "", showticklabels = FALSE)) }) output$regression = renderPlotly({ met1 = input$metric1 met1 = as.character(met1) met2 = input$metric2 met2 = as.character(met2) met5 = input$metric5 met5 = as.character(met5) dim5 = input$dimension5 dim5 = as.character(dim5) sample_data_filtered = sample_data[,c(met1,met2,met5,dim5)] sample_data_filtered[,4] = as.factor(sample_data_filtered[,4]) sample_data_final = sample_data_filtered %>% group_by(sample_data_filtered[,4]) %>% summarise_if(is.numeric,sum) colnames(sample_data_final) = c("dimension", "metric1", "metric2", "metric5") vs = " Vs. " by = " By " plot_ly(sample_data_final, x = ~sample_data_final$metric1, y = ~sample_data_final$metric2, type = 'scatter', size = ~sample_data_final$metric5, color = ~sample_data_final$dimension, mode = 'markers', text = ~paste0(capitalize(met5), ": ",sample_data_final$metric5), marker = list(opacity = 0.5, symbol = 'circle')) %>% layout(title = paste0(capitalize(met1),vs,capitalize(met2),by, capitalize(dim5), " [Sizing by ", capitalize(met5),"]"),xaxis = list(title = met1), yaxis = list(title = met2), showlegend = FALSE) }) output$hmap = renderPlotly({ met4 = as.character(input$metric4) dim1 = as.character(input$dimension1) dim2 = as.character(input$dimension2) sample_data_filtered = sample_data[,c(dim1,dim2,met4)] sample_data_filtered[,1] = as.factor(sample_data_filtered[,1]) sample_data_filtered[,2] = as.factor(sample_data_filtered[,2]) new_df = sample_data_filtered %>% group_by(sample_data_filtered[,1], sample_data_filtered[,2]) %>% summarise_if(is.numeric, sum) colnames(new_df) = c("Dimension 1", "Dimension 2", "Metric") sum_of = "Sum Of " by = " by " and = " and " plot_ly(x = new_df$`Dimension 1`, y = new_df$`Dimension 2`, z = new_df$Metric, type = "heatmap") %>% layout(title = paste0(sum_of,capitalize(met4),by,capitalize(dim1),and,capitalize(dim2))) }) output$sankey = renderPlotly({ dim3 = as.character(input$dimension3) dim4 = as.character(input$dimension4) sample_data_filter = sample_data[,c(dim3,dim4)] sample_data_sankey = sample_data_filter %>% group_by(sample_data_filter[,1],sample_data_filter[,2] ) %>% summarise(count=n()) colnames(sample_data_sankey) = c("label1", "label2", "count") node_list1 = data.frame(label1 = c(sample_data_sankey$label1) %>% unique()) node_list1$index1 = index(node_list1)-1 node_list2 = data.frame(label2 = c(sample_data_sankey$label2) %>% unique()) node_list2$index2 = seq(max(node_list1$index)+1,max(node_list1$index)+length(node_list2$label)) new_df1 = merge(sample_data_sankey, node_list1, by = 'label1') new_df2 = merge(new_df1, node_list2, by = 'label2') sank = "Sankey: " an = " And " plot_ly(type = "sankey", orientation = "h", node = list(label = c(sample_data_sankey$label1, sample_data_sankey$label2) %>% unique()), link = list( source = new_df2$index1, target = new_df2$index2, value = new_df2$count)) %>% layout(title=paste0(sank,capitalize(dim3),an,capitalize(dim4))) }) output$pdf <- renderUI({ tags$iframe(style="height:700px; width:100%; scrolling=yes",src="Instructions.pdf") }) } shinyApp(ui = ui, server = server)
/app.R
permissive
avinax/bi-assistant
R
false
false
9,646
r
library(shiny) library(shinydashboard) library(dplyr) library(magrittr) library(plotly) library(dygraphs) library(tidyquant) library(lubridate) library(forecast) library(Hmisc) options(warn=-1) sample_data = read.csv('sample data.csv', stringsAsFactors = FALSE) sample_data$month = factor(sample_data$month, levels = month.name) sample_data$day = factor(sample_data$day, levels = c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) ui = navbarPage("BI ASSISTANT",id="nav", tabPanel("Dashboard", dashboardPage( dashboardHeader(disable = TRUE), dashboardSidebar(disable = TRUE), dashboardBody( fluidRow( singleton(tags$head( tags$script(src="//cdnjs.cloudflare.com/ajax/libs/annyang/1.4.0/annyang.min.js"), tags$script(src="//code.responsivevoice.org/responsivevoice.js"), includeScript('init.js'), tags$style(type="text/css", ".shiny-output-error { visibility: hidden; }", ".shiny-output-error:before { visibility: hidden; }", ".dygraph-label.dygraph-title { font-weight: normal; }" ) ) ) ), fluidRow( valueBoxOutput("quantity", width = 4), valueBoxOutput("sales", width = 4), valueBoxOutput("profit", width = 4) ), fluidRow( column(width = 6, box(solidHeader = TRUE, width = 12, collapsible = TRUE,color="purple", dygraphOutput("trend", height = 200)), box(solidHeader = TRUE, width = 6, collapsible = TRUE,color="purple", plotlyOutput("salesbar1", height = 200), height = 250), box(solidHeader = TRUE, width = 6, collapsible = TRUE,color="purple", plotlyOutput("sankey", height = 200, width = "100%"), height = 250) ), column(width = 6, box(solidHeader = TRUE, width = 12, collapsible = TRUE,color="purple", plotlyOutput("hmap", height = 200)), box(solidHeader = TRUE, width = 12, collapsible = TRUE,color="purple", plotlyOutput("regression", height = 200), height = 250) )) ) ) ), tabPanel("How to Use", htmlOutput("pdf") )) server = function (input, output, session) { output$quantity = renderValueBox({ valueBox(sum(sample_data$quantity) , "Quantity", icon = icon("signal"), color = "purple" ) }) output$sales = renderValueBox({ valueBox(round(sum(sample_data$sales),0) , "Sales", icon = icon("signal"), color = "purple" ) }) output$profit = renderValueBox({ valueBox(round(sum(sample_data$profit),0) , "Profit", icon = icon("signal"), color = "purple" ) }) output$trend = renderDygraph({ sample_data$date = as.Date(sample_data$date, format = "%m/%d/%y") met = as.character(input$metric3) orderdate = "date" quant_ts = sample_data[,c(orderdate, met)] colnames(quant_ts)[2] = met quant_ts_grouped = quant_ts %>% group_by(date) %>% summarise_all(sum) date = seq.Date(as.Date(min(quant_ts_grouped$date)), as.Date(max(quant_ts_grouped$date)), by = "day") join_dates = as.data.frame(date) new_ts = merge(join_dates, quant_ts_grouped, by = 'date', all.x = TRUE) new_ts[is.na(new_ts)] = 0 min_year = year(min(quant_ts_grouped$date)) min_month = month(min(quant_ts_grouped$date)) min_day = day(min(quant_ts_grouped$date)) new_ts_for = ts(new_ts[2], start = c(min_year,min_month,min_day), frequency = 365.25) h = input$h h = as.numeric(h) fit_aic = Inf fit_order = c(0,0,0) for (p in 1:4) for (d in 0:1) for (q in 1:4) { fitcurrent_aic = AIC(arima(new_ts_for, order=c(p, d, q),method="ML")) if (fitcurrent_aic < fit_aic) { fit_aic = fitcurrent_aic fit_order <- c(p, d, q) } } fit = Arima(new_ts_for, order = fit_order,method="ML") pred = forecast(fit, h = h) actuals = pred$x lower = pred$lower[,2] upper = pred$upper[,2] point_forecast = pred$mean max_new_ts = max(new_ts$date) max_new_ts_num = as.numeric(max_new_ts) max_plus = as.numeric(max_new_ts_num+h) min_new_ts = min(new_ts$date) se = seq(as.numeric(min_new_ts), as.numeric(max_plus)) se = as.Date(se) all = cbind(actuals, lower, upper, point_forecast, se) all = xts(all, order.by = as.Date(se)) all = xts(all, order.by = index(all)) all$se = NULL chart_title = paste0(capitalize(met), " Trend Over Time") dygraph(all, main = chart_title) %>% dyAxis('y', met) %>% dyRangeSelector(dateWindow = c(max_new_ts-h, max_new_ts+h)) %>% dySeries("actuals", label = "Actual") %>% dySeries(c("lower", "point_forecast", "upper"), label = "Predicted") }) output$salesbar1 = renderPlotly({ col = input$dimension col = tolower(col) col = as.character(col) met = input$metric met = tolower(met) met = as.character(met) nd = aggregate(sample_data[,met]~sample_data[,col], data = sample_data, FUN = sum) colnames(nd) = c("dimension", "metric") nd = nd %>% arrange(desc(metric)) nd$dimension = reorder(x=nd$dimension, X = nd$metric, FUN = sum) sum_of = "Sum Of " by = " by " plot_ly(nd, x = ~metric, y = ~dimension, type = "bar", orientation = "h", text = ~dimension, textposition = 'auto', textfont = list(color = 'rgb(255,255,255)'),marker = list(color = 'rgb(95,92,168)', line = list(color = 'rgb(255,255,255)'))) %>% layout(title = paste0(sum_of,capitalize(met),by,capitalize(col)),xaxis = list(title = ""), yaxis = list(title = "", showticklabels = FALSE)) }) output$regression = renderPlotly({ met1 = input$metric1 met1 = as.character(met1) met2 = input$metric2 met2 = as.character(met2) met5 = input$metric5 met5 = as.character(met5) dim5 = input$dimension5 dim5 = as.character(dim5) sample_data_filtered = sample_data[,c(met1,met2,met5,dim5)] sample_data_filtered[,4] = as.factor(sample_data_filtered[,4]) sample_data_final = sample_data_filtered %>% group_by(sample_data_filtered[,4]) %>% summarise_if(is.numeric,sum) colnames(sample_data_final) = c("dimension", "metric1", "metric2", "metric5") vs = " Vs. " by = " By " plot_ly(sample_data_final, x = ~sample_data_final$metric1, y = ~sample_data_final$metric2, type = 'scatter', size = ~sample_data_final$metric5, color = ~sample_data_final$dimension, mode = 'markers', text = ~paste0(capitalize(met5), ": ",sample_data_final$metric5), marker = list(opacity = 0.5, symbol = 'circle')) %>% layout(title = paste0(capitalize(met1),vs,capitalize(met2),by, capitalize(dim5), " [Sizing by ", capitalize(met5),"]"),xaxis = list(title = met1), yaxis = list(title = met2), showlegend = FALSE) }) output$hmap = renderPlotly({ met4 = as.character(input$metric4) dim1 = as.character(input$dimension1) dim2 = as.character(input$dimension2) sample_data_filtered = sample_data[,c(dim1,dim2,met4)] sample_data_filtered[,1] = as.factor(sample_data_filtered[,1]) sample_data_filtered[,2] = as.factor(sample_data_filtered[,2]) new_df = sample_data_filtered %>% group_by(sample_data_filtered[,1], sample_data_filtered[,2]) %>% summarise_if(is.numeric, sum) colnames(new_df) = c("Dimension 1", "Dimension 2", "Metric") sum_of = "Sum Of " by = " by " and = " and " plot_ly(x = new_df$`Dimension 1`, y = new_df$`Dimension 2`, z = new_df$Metric, type = "heatmap") %>% layout(title = paste0(sum_of,capitalize(met4),by,capitalize(dim1),and,capitalize(dim2))) }) output$sankey = renderPlotly({ dim3 = as.character(input$dimension3) dim4 = as.character(input$dimension4) sample_data_filter = sample_data[,c(dim3,dim4)] sample_data_sankey = sample_data_filter %>% group_by(sample_data_filter[,1],sample_data_filter[,2] ) %>% summarise(count=n()) colnames(sample_data_sankey) = c("label1", "label2", "count") node_list1 = data.frame(label1 = c(sample_data_sankey$label1) %>% unique()) node_list1$index1 = index(node_list1)-1 node_list2 = data.frame(label2 = c(sample_data_sankey$label2) %>% unique()) node_list2$index2 = seq(max(node_list1$index)+1,max(node_list1$index)+length(node_list2$label)) new_df1 = merge(sample_data_sankey, node_list1, by = 'label1') new_df2 = merge(new_df1, node_list2, by = 'label2') sank = "Sankey: " an = " And " plot_ly(type = "sankey", orientation = "h", node = list(label = c(sample_data_sankey$label1, sample_data_sankey$label2) %>% unique()), link = list( source = new_df2$index1, target = new_df2$index2, value = new_df2$count)) %>% layout(title=paste0(sank,capitalize(dim3),an,capitalize(dim4))) }) output$pdf <- renderUI({ tags$iframe(style="height:700px; width:100%; scrolling=yes",src="Instructions.pdf") }) } shinyApp(ui = ui, server = server)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lsolve_BICG.R \name{lsolve.bicg} \alias{lsolve.bicg} \title{Biconjugate Gradient method} \usage{ lsolve.bicg(A, B, xinit = NA, reltol = 1e-05, maxiter = 10000, preconditioner = diag(ncol(A)), verbose = TRUE) } \arguments{ \item{A}{an \eqn{(m\times n)} dense or sparse matrix. See also \code{\link[Matrix]{sparseMatrix}}.} \item{B}{a vector of length \eqn{m} or an \eqn{(m\times k)} matrix (dense or sparse) for solving \eqn{k} systems simultaneously.} \item{xinit}{a length-\eqn{n} vector for initial starting point. \code{NA} to start from a random initial point near 0.} \item{reltol}{tolerance level for stopping iterations.} \item{maxiter}{maximum number of iterations allowed.} \item{preconditioner}{an \eqn{(n\times n)} preconditioning matrix; default is an identity matrix.} \item{verbose}{a logical; \code{TRUE} to show progress of computation.} } \value{ a named list containing \describe{ \item{x}{solution; a vector of length \eqn{n} or a matrix of size \eqn{(n\times k)}.} \item{iter}{the number of iterations required.} \item{errors}{a vector of errors for stopping criterion.} } } \description{ Biconjugate Gradient(BiCG) method is a modification of Conjugate Gradient for nonsymmetric systems using evaluations with respect to \eqn{A^T} as well as \eqn{A} in matrix-vector multiplications. For an overdetermined system where \code{nrow(A)>ncol(A)}, it is automatically transformed to the normal equation. Underdetermined system - \code{nrow(A)<ncol(A)} - is not supported. Preconditioning matrix \eqn{M}, in theory, should be symmetric and positive definite with fast computability for inverse, though it is not limited until the solver level. } \examples{ ## Overdetermined System A = matrix(rnorm(10*5),nrow=10) x = rnorm(5) b = A\%*\%x out1 = lsolve.cg(A,b) out2 = lsolve.bicg(A,b) matout = cbind(matrix(x),out1$x, out2$x); colnames(matout) = c("true x","CG result", "BiCG result") print(matout) } \references{ \insertRef{watson_conjugate_1976}{SolveLS} \insertRef{voevodin_question_1983}{SolveLS} }
/man/krylov_BICG.Rd
no_license
cran/SolveLS
R
false
true
2,107
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lsolve_BICG.R \name{lsolve.bicg} \alias{lsolve.bicg} \title{Biconjugate Gradient method} \usage{ lsolve.bicg(A, B, xinit = NA, reltol = 1e-05, maxiter = 10000, preconditioner = diag(ncol(A)), verbose = TRUE) } \arguments{ \item{A}{an \eqn{(m\times n)} dense or sparse matrix. See also \code{\link[Matrix]{sparseMatrix}}.} \item{B}{a vector of length \eqn{m} or an \eqn{(m\times k)} matrix (dense or sparse) for solving \eqn{k} systems simultaneously.} \item{xinit}{a length-\eqn{n} vector for initial starting point. \code{NA} to start from a random initial point near 0.} \item{reltol}{tolerance level for stopping iterations.} \item{maxiter}{maximum number of iterations allowed.} \item{preconditioner}{an \eqn{(n\times n)} preconditioning matrix; default is an identity matrix.} \item{verbose}{a logical; \code{TRUE} to show progress of computation.} } \value{ a named list containing \describe{ \item{x}{solution; a vector of length \eqn{n} or a matrix of size \eqn{(n\times k)}.} \item{iter}{the number of iterations required.} \item{errors}{a vector of errors for stopping criterion.} } } \description{ Biconjugate Gradient(BiCG) method is a modification of Conjugate Gradient for nonsymmetric systems using evaluations with respect to \eqn{A^T} as well as \eqn{A} in matrix-vector multiplications. For an overdetermined system where \code{nrow(A)>ncol(A)}, it is automatically transformed to the normal equation. Underdetermined system - \code{nrow(A)<ncol(A)} - is not supported. Preconditioning matrix \eqn{M}, in theory, should be symmetric and positive definite with fast computability for inverse, though it is not limited until the solver level. } \examples{ ## Overdetermined System A = matrix(rnorm(10*5),nrow=10) x = rnorm(5) b = A\%*\%x out1 = lsolve.cg(A,b) out2 = lsolve.bicg(A,b) matout = cbind(matrix(x),out1$x, out2$x); colnames(matout) = c("true x","CG result", "BiCG result") print(matout) } \references{ \insertRef{watson_conjugate_1976}{SolveLS} \insertRef{voevodin_question_1983}{SolveLS} }
# Code for creating scatterplots with colors based on selection # Author: D. Kooijman # Last modified: 30-5-2019 # First run the mainMUVRcode.R file # VIP and Sr, sb and reg values calculated with matlab and imported to R via csv file. #Read in csv files made in Matlab vip_scores = read.csv(file = 'vip_scores.csv') sb = read.csv(file = 'sb.csv') sr = read.csv(file = 'sr.csv') reg = read.csv(file = 'reg.csv') # Variables selected with max mode: Sr_max = as.data.frame(S$Fit$plsFitMax$mat.c[,1]) names(Sr_max) <- c("Sr") VIP_max = as.data.frame(VIP$Fit$plsFitMax$mat.c[,1]) names(VIP_max) <- c("VIP") # If variable selected with rank method corresponding element = 1 tabel_max = merge(VIP_max, Sr_max, by = 0, all = TRUE) tabel_max2 = merge(VIP_max, Sr_max, by = 0, all = TRUE) tabel_max[is.na(tabel_max)] = 0 tabel_max[(tabel_max)!=0] = 1 tabel_max[,1] = tabel_max2[,1] #Combine selection with VIP & SR values all = merge(vip_scores, tabel_max, by.x = "Varnames", by.y = "Row.names", all =TRUE) all_data = cbind.data.frame(sr,vip_scores[,2],sb[,2],reg) all_data = merge(all_data, tabel_max, by.x = "Varnames", by.y = "Row.names", all = TRUE) names(all_data) = c("Varnames", "Sr", "VIP", "sgn", "reg", "VIP_Sel", "Sr_sel") all_data[is.na(all_data)] = 0 #Add column with selection group for (i in 1:1147) { if (all_data$VIP_Sel[i] == 1) { if (all_data$Sr_sel[i] == 1) { all_data$Sel[i] = "Both" } else { all_data$Sel[i] = "VIP" } } else if (all_data$Sr_sel[i] == 1) { if (all_data$VIP_Sel[i] == 1) { all_data$Sel[i] = "Both" } else { all_data$Sel[i] = "Sr" } } else { all_data$Sel[i] = "None" } } #Scatter plots library(ggplot2) REGvsVIP = ggplot(all_data, aes(x=reg,y =VIP, color = Sel )) REGvsVIP = REGvsVIP + geom_point(size=3, shape=16, alpha = 0.5) REGvsSr = ggplot(all_data, aes(x = reg, y = Sr, color = Sel )) REGvsSr = REGvsSr + geom_point(size=3, shape=16, alpha = 0.5) all_data$VIP_sgn = all_data$VIP*all_data$sgn all_data$Sr_sgn = all_data$Sr*all_data$sgn VIPvsSr = ggplot(all_data, aes(x=VIP_sgn,y =Sr_sgn, color = Sel )) VIPvsSr = VIPvsSr + geom_point(size=3, shape=16, alpha = 0.5)
/Scatterplots.R
no_license
DKooijman97/FREELIVE
R
false
false
2,284
r
# Code for creating scatterplots with colors based on selection # Author: D. Kooijman # Last modified: 30-5-2019 # First run the mainMUVRcode.R file # VIP and Sr, sb and reg values calculated with matlab and imported to R via csv file. #Read in csv files made in Matlab vip_scores = read.csv(file = 'vip_scores.csv') sb = read.csv(file = 'sb.csv') sr = read.csv(file = 'sr.csv') reg = read.csv(file = 'reg.csv') # Variables selected with max mode: Sr_max = as.data.frame(S$Fit$plsFitMax$mat.c[,1]) names(Sr_max) <- c("Sr") VIP_max = as.data.frame(VIP$Fit$plsFitMax$mat.c[,1]) names(VIP_max) <- c("VIP") # If variable selected with rank method corresponding element = 1 tabel_max = merge(VIP_max, Sr_max, by = 0, all = TRUE) tabel_max2 = merge(VIP_max, Sr_max, by = 0, all = TRUE) tabel_max[is.na(tabel_max)] = 0 tabel_max[(tabel_max)!=0] = 1 tabel_max[,1] = tabel_max2[,1] #Combine selection with VIP & SR values all = merge(vip_scores, tabel_max, by.x = "Varnames", by.y = "Row.names", all =TRUE) all_data = cbind.data.frame(sr,vip_scores[,2],sb[,2],reg) all_data = merge(all_data, tabel_max, by.x = "Varnames", by.y = "Row.names", all = TRUE) names(all_data) = c("Varnames", "Sr", "VIP", "sgn", "reg", "VIP_Sel", "Sr_sel") all_data[is.na(all_data)] = 0 #Add column with selection group for (i in 1:1147) { if (all_data$VIP_Sel[i] == 1) { if (all_data$Sr_sel[i] == 1) { all_data$Sel[i] = "Both" } else { all_data$Sel[i] = "VIP" } } else if (all_data$Sr_sel[i] == 1) { if (all_data$VIP_Sel[i] == 1) { all_data$Sel[i] = "Both" } else { all_data$Sel[i] = "Sr" } } else { all_data$Sel[i] = "None" } } #Scatter plots library(ggplot2) REGvsVIP = ggplot(all_data, aes(x=reg,y =VIP, color = Sel )) REGvsVIP = REGvsVIP + geom_point(size=3, shape=16, alpha = 0.5) REGvsSr = ggplot(all_data, aes(x = reg, y = Sr, color = Sel )) REGvsSr = REGvsSr + geom_point(size=3, shape=16, alpha = 0.5) all_data$VIP_sgn = all_data$VIP*all_data$sgn all_data$Sr_sgn = all_data$Sr*all_data$sgn VIPvsSr = ggplot(all_data, aes(x=VIP_sgn,y =Sr_sgn, color = Sel )) VIPvsSr = VIPvsSr + geom_point(size=3, shape=16, alpha = 0.5)
vec1<-1:16 vec2<-4*vec1+3 data1<-data.frame(vec1,vec2) cat(names(data1),"\n") print(data1) cat(data1$vec1,"\n") cat(data1$vec2,"\n") cat(data1[,1],"\n") cat(data1[,2],"\n") print(data1[2,])
/dataframe.R
no_license
jesscapall99/chem160module14
R
false
false
198
r
vec1<-1:16 vec2<-4*vec1+3 data1<-data.frame(vec1,vec2) cat(names(data1),"\n") print(data1) cat(data1$vec1,"\n") cat(data1$vec2,"\n") cat(data1[,1],"\n") cat(data1[,2],"\n") print(data1[2,])
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nodes.r \name{ENgetnodeindex} \alias{ENgetnodeindex} \title{Retrieve the index of a node} \usage{ ENgetnodeindex(nodeid) } \arguments{ \item{nodeid}{A character string specifying the node ID.} } \value{ An integer index of the specified node. } \description{ Retrieve the index of a node } \note{ Node indexes are consecutive integers starting from 1. } \examples{ # path to Net1.inp example file included with this package inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp") ENopen( inp, "Net1.rpt") ENgetnodeindex("10") ENgetnodeindex("23") ENclose() } \seealso{ \code{ENgetnodeid} \url{http://wateranalytics.org/EPANET/group___network_info.html} }
/man/ENgetnodeindex.Rd
no_license
VjacheslavFisenko/epanet2toolkit
R
false
true
752
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nodes.r \name{ENgetnodeindex} \alias{ENgetnodeindex} \title{Retrieve the index of a node} \usage{ ENgetnodeindex(nodeid) } \arguments{ \item{nodeid}{A character string specifying the node ID.} } \value{ An integer index of the specified node. } \description{ Retrieve the index of a node } \note{ Node indexes are consecutive integers starting from 1. } \examples{ # path to Net1.inp example file included with this package inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp") ENopen( inp, "Net1.rpt") ENgetnodeindex("10") ENgetnodeindex("23") ENclose() } \seealso{ \code{ENgetnodeid} \url{http://wateranalytics.org/EPANET/group___network_info.html} }
# This piece of code is for Exploratory Data Analysis Course Project 1 # It plots the third graph # Thank you for your kind consideration plot3 <- function() { # Read in data from file and handle the missing values, assuming the file is in the directory rawData <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings="?") # Convert the date column to Date format rawData$Date <- as.Date(rawData$Date,format="%d/%m/%Y") # Extract the relevant data for the required two dates extractData <- subset(rawData,rawData$Date>=as.Date("2007-02-01") & rawData$Date<=as.Date("2007-02-02")) # # Combine the date and time data to construct the date-time data points dateTime <- strptime(paste(extractData$Date,extractData$Time), format="%Y-%m-%d %H:%M:%S") # Plot the third graph and save as png format png(file="plot3.png", width=480, height=480) # Sepcify the graph name and the graph size plot(dateTime,extractData$Sub_metering_1,type="l",xlab="",ylab="Energy sub metering") # Plot the graph and specify the plot type and the label # Add energy sub metering No2 & No3 with red and blue color respectively lines(dateTime,extractData$Sub_metering_2,type="l",col="red") lines(dateTime,extractData$Sub_metering_3,type="l",col="blue") # Add legend legend("topright",legend=c("Sub_metering_1","Sub_metering_2","Sub_metering_3"),col=c("black","red","blue"),lty=1) dev.off() # Close the png device }
/plot3.R
no_license
greatgoal/ExData_Plotting1
R
false
false
1,454
r
# This piece of code is for Exploratory Data Analysis Course Project 1 # It plots the third graph # Thank you for your kind consideration plot3 <- function() { # Read in data from file and handle the missing values, assuming the file is in the directory rawData <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings="?") # Convert the date column to Date format rawData$Date <- as.Date(rawData$Date,format="%d/%m/%Y") # Extract the relevant data for the required two dates extractData <- subset(rawData,rawData$Date>=as.Date("2007-02-01") & rawData$Date<=as.Date("2007-02-02")) # # Combine the date and time data to construct the date-time data points dateTime <- strptime(paste(extractData$Date,extractData$Time), format="%Y-%m-%d %H:%M:%S") # Plot the third graph and save as png format png(file="plot3.png", width=480, height=480) # Sepcify the graph name and the graph size plot(dateTime,extractData$Sub_metering_1,type="l",xlab="",ylab="Energy sub metering") # Plot the graph and specify the plot type and the label # Add energy sub metering No2 & No3 with red and blue color respectively lines(dateTime,extractData$Sub_metering_2,type="l",col="red") lines(dateTime,extractData$Sub_metering_3,type="l",col="blue") # Add legend legend("topright",legend=c("Sub_metering_1","Sub_metering_2","Sub_metering_3"),col=c("black","red","blue"),lty=1) dev.off() # Close the png device }
BSFormula <- function(S0, K, capT, r, sigma) { x <- log(S0/K)+r*capT; sig <- sigma*sqrt(capT); d1 <- x/sig+sig/2; d2 <- d1 - sig; pv <- exp(-r*capT); return( S0*pnorm(d1) - pv*K*pnorm(d2)); } BSFormulaPut <- function(S0, K, capT, r, sigma) { x <- log(S0/K)+r*capT; sig <- sigma*sqrt(capT); d1 <- x/sig+sig/2; d2 <- d1 - sig; pv <- exp(-r*capT); return( S0*pnorm(d1) - pv*K*pnorm(d2)+pv*K-S0); } # This function now works with vectors of strikes and option values BSImpliedVolCall <- function(S0, K, capT, r, C) { nK <- length(K); sigmaL <- rep(1e-10,nK); CL <- BSFormula(S0, K, capT, r, sigmaL); sigmaH <- rep(10,nK); CH <- BSFormula(S0, K, capT, r, sigmaH); while (mean(sigmaH - sigmaL) > 1e-10) { sigma <- (sigmaL + sigmaH)/2; CM <- BSFormula(S0, K, capT, r, sigma); CL <- CL + (CM < C)*(CM-CL); sigmaL <- sigmaL + (CM < C)*(sigma-sigmaL); CH <- CH + (CM >= C)*(CM-CH); sigmaH <- sigmaH + (CM >= C)*(sigma-sigmaH); } return(sigma); } # This function also works with vectors of strikes and option values BSImpliedVolPut <- function(S0, K, capT, r, P) { #pv <- exp(-r*capT); sigmaL <- 1e-10; #intrinsic <- (K-pv*S0); nK <- length(K); sigmaL <- rep(1e-10,nK); #PL <- BSFormula(S0, K, capT, r, sigmaL)+intrinsic; PL <- BSFormula(S0, K, capT, r, sigmaL); sigmaH <- rep(10,nK); #PH <- BSFormula(S0, K, capT, r, sigmaH)+intrinsic; PH <- BSFormula(S0, K, capT, r, sigmaH); while (mean(sigmaH - sigmaL) > 1e-10) { sigma <- (sigmaL + sigmaH)/2; #PM <- BSFormula(S0, K, capT, r, sigma)+intrinsic; PM <- BSFormulaPut(S0, K, capT, r, sigma); PL <- PL + (PM < P)*(PM-PL); sigmaL <- sigmaL + (PM < P)*(sigma-sigmaL); PH <- PH + (PM >= P)*(PM-PH); sigmaH <- sigmaH + (PM >= P)*(sigma-sigmaH); } return(sigma); } # Function to compute option prices and implied vols given list of final values of underlying bsOut <- function(xf,capT,AK) { nK <- length(AK); N <- length(xf); xfbar <- mean(xf); CAV <- numeric(nK); BSV <- numeric(nK); BSVL <- numeric(nK); BSVH <- numeric(nK); for (j in 1:nK){ payoff <- (xf-AK[j]) * (xf>AK[j]); CAV[j] <- sum(payoff)/N; err <- sqrt(var(payoff)/N); BSV[j] <- BSImpliedVolCall(xfbar, AK[j], capT,0, CAV[j]); BSVL[j] <- BSImpliedVolCall(xfbar, AK[j], capT,0, CAV[j]-err); BSVH[j] <- BSImpliedVolCall(xfbar, AK[j], capT,0, CAV[j]+err); } return(data.frame(AK,CAV,BSV,BSVL,BSVH)); } # Function to return implied vols for a range of strikes analyticOut <- function(callFormula,AK,capT) { nK <- length(AK); #callFormula is a function that computes the call price callPrice <- numeric(nK); BSV <- numeric(nK); for (j in 1:nK){ callPrice[j] <- callFormula(AK[j]); BSV[j] <- BSImpliedVolCall(1, AK[j], capT,0, callPrice[j]); } return(data.frame(AK,callPrice,BSV)); }
/BlackScholes.R
no_license
AllenLongChen/capstone
R
false
false
3,003
r
BSFormula <- function(S0, K, capT, r, sigma) { x <- log(S0/K)+r*capT; sig <- sigma*sqrt(capT); d1 <- x/sig+sig/2; d2 <- d1 - sig; pv <- exp(-r*capT); return( S0*pnorm(d1) - pv*K*pnorm(d2)); } BSFormulaPut <- function(S0, K, capT, r, sigma) { x <- log(S0/K)+r*capT; sig <- sigma*sqrt(capT); d1 <- x/sig+sig/2; d2 <- d1 - sig; pv <- exp(-r*capT); return( S0*pnorm(d1) - pv*K*pnorm(d2)+pv*K-S0); } # This function now works with vectors of strikes and option values BSImpliedVolCall <- function(S0, K, capT, r, C) { nK <- length(K); sigmaL <- rep(1e-10,nK); CL <- BSFormula(S0, K, capT, r, sigmaL); sigmaH <- rep(10,nK); CH <- BSFormula(S0, K, capT, r, sigmaH); while (mean(sigmaH - sigmaL) > 1e-10) { sigma <- (sigmaL + sigmaH)/2; CM <- BSFormula(S0, K, capT, r, sigma); CL <- CL + (CM < C)*(CM-CL); sigmaL <- sigmaL + (CM < C)*(sigma-sigmaL); CH <- CH + (CM >= C)*(CM-CH); sigmaH <- sigmaH + (CM >= C)*(sigma-sigmaH); } return(sigma); } # This function also works with vectors of strikes and option values BSImpliedVolPut <- function(S0, K, capT, r, P) { #pv <- exp(-r*capT); sigmaL <- 1e-10; #intrinsic <- (K-pv*S0); nK <- length(K); sigmaL <- rep(1e-10,nK); #PL <- BSFormula(S0, K, capT, r, sigmaL)+intrinsic; PL <- BSFormula(S0, K, capT, r, sigmaL); sigmaH <- rep(10,nK); #PH <- BSFormula(S0, K, capT, r, sigmaH)+intrinsic; PH <- BSFormula(S0, K, capT, r, sigmaH); while (mean(sigmaH - sigmaL) > 1e-10) { sigma <- (sigmaL + sigmaH)/2; #PM <- BSFormula(S0, K, capT, r, sigma)+intrinsic; PM <- BSFormulaPut(S0, K, capT, r, sigma); PL <- PL + (PM < P)*(PM-PL); sigmaL <- sigmaL + (PM < P)*(sigma-sigmaL); PH <- PH + (PM >= P)*(PM-PH); sigmaH <- sigmaH + (PM >= P)*(sigma-sigmaH); } return(sigma); } # Function to compute option prices and implied vols given list of final values of underlying bsOut <- function(xf,capT,AK) { nK <- length(AK); N <- length(xf); xfbar <- mean(xf); CAV <- numeric(nK); BSV <- numeric(nK); BSVL <- numeric(nK); BSVH <- numeric(nK); for (j in 1:nK){ payoff <- (xf-AK[j]) * (xf>AK[j]); CAV[j] <- sum(payoff)/N; err <- sqrt(var(payoff)/N); BSV[j] <- BSImpliedVolCall(xfbar, AK[j], capT,0, CAV[j]); BSVL[j] <- BSImpliedVolCall(xfbar, AK[j], capT,0, CAV[j]-err); BSVH[j] <- BSImpliedVolCall(xfbar, AK[j], capT,0, CAV[j]+err); } return(data.frame(AK,CAV,BSV,BSVL,BSVH)); } # Function to return implied vols for a range of strikes analyticOut <- function(callFormula,AK,capT) { nK <- length(AK); #callFormula is a function that computes the call price callPrice <- numeric(nK); BSV <- numeric(nK); for (j in 1:nK){ callPrice[j] <- callFormula(AK[j]); BSV[j] <- BSImpliedVolCall(1, AK[j], capT,0, callPrice[j]); } return(data.frame(AK,callPrice,BSV)); }
library(ctrlGene) ### Name: pearsonCor ### Title: Analyzes pair-wise correlation ### Aliases: pearsonCor ### ** Examples FIBct pearsonCor(FIBct)
/data/genthat_extracted_code/ctrlGene/examples/pearsonCor.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
152
r
library(ctrlGene) ### Name: pearsonCor ### Title: Analyzes pair-wise correlation ### Aliases: pearsonCor ### ** Examples FIBct pearsonCor(FIBct)
## the function to extract isoforms given ## reference_proteome or whole_proteome ## Regular expression of uniprot isoforms ID is ([[:alnum:]]+-[[:digit:]]+) variant_id_extractor_Uniprot <- function(proteome) { proteome$Cross.reference..dbSNP. variants <- as.character(proteome$Cross.reference..dbSNP.) variant_ids <- unlist(gsubfn::strapply(X = variants,pattern = "rs[[:digit:]]+ ",FUN = length, simplify = T)) variant_number = sum(variant_ids) return(variant_number) }
/variant_id_extractor_Uniprot.R
no_license
vitkl/imex_vs_uniprot
R
false
false
476
r
## the function to extract isoforms given ## reference_proteome or whole_proteome ## Regular expression of uniprot isoforms ID is ([[:alnum:]]+-[[:digit:]]+) variant_id_extractor_Uniprot <- function(proteome) { proteome$Cross.reference..dbSNP. variants <- as.character(proteome$Cross.reference..dbSNP.) variant_ids <- unlist(gsubfn::strapply(X = variants,pattern = "rs[[:digit:]]+ ",FUN = length, simplify = T)) variant_number = sum(variant_ids) return(variant_number) }
get.first.node.height <- function(tr){ sort(intnode.times(tr), dec = T)[3] }
/R/get.first.node.height.R
no_license
sebastianduchene/NELSI
R
false
false
79
r
get.first.node.height <- function(tr){ sort(intnode.times(tr), dec = T)[3] }
testlist <- list(x = structure(c(1.00572097914984e+131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 5L))) result <- do.call(bravo:::colSumSq_matrix,testlist) str(result)
/bravo/inst/testfiles/colSumSq_matrix/libFuzzer_colSumSq_matrix/colSumSq_matrix_valgrind_files/1609960225-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
274
r
testlist <- list(x = structure(c(1.00572097914984e+131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 5L))) result <- do.call(bravo:::colSumSq_matrix,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/signatureClass.R \name{show,ToxicoSig-method} \alias{show,ToxicoSig-method} \title{Show ToxicoGx Signatures} \usage{ \S4method{show}{ToxicoSig}(object) } \arguments{ \item{object}{\code{ToxicoSig}} } \value{ Prints the ToxicoGx Signatures object to the output stream, and returns invisible NULL. } \description{ Show ToxicoGx Signatures } \examples{ data(TGGATESsmall) drug.perturbation <- drugPerturbationSig(TGGATESsmall, mDataType="rna", nthread = 1, duration = "2", drugs = head(drugNames(TGGATESsmall)), features = fNames(TGGATESsmall, "rna")[seq_len(2)]) drug.perturbation }
/man/show-ToxicoSig-method.Rd
no_license
bbyun28/ToxicoGx
R
false
true
665
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/signatureClass.R \name{show,ToxicoSig-method} \alias{show,ToxicoSig-method} \title{Show ToxicoGx Signatures} \usage{ \S4method{show}{ToxicoSig}(object) } \arguments{ \item{object}{\code{ToxicoSig}} } \value{ Prints the ToxicoGx Signatures object to the output stream, and returns invisible NULL. } \description{ Show ToxicoGx Signatures } \examples{ data(TGGATESsmall) drug.perturbation <- drugPerturbationSig(TGGATESsmall, mDataType="rna", nthread = 1, duration = "2", drugs = head(drugNames(TGGATESsmall)), features = fNames(TGGATESsmall, "rna")[seq_len(2)]) drug.perturbation }
# LatticeKrig is a package for analysis of spatial data written for # the R software environment . # Copyright (C) 2016 # University Corporation for Atmospheric Research (UCAR) # Contact: Douglas Nychka, nychka@ucar.edu, # National Center for Atmospheric Research, PO Box 3000, Boulder, CO 80307-3000 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with the R software environment if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # or see http://www.r-project.org/Licenses/GPL-2 LKrigLatticeScales <- function( object, ...){ UseMethod("LKrigLatticeScales") } LKrigLatticeScales.default<- function( object,...){ LKinfo <- object delta <- LKinfo$latticeInfo$delta overlap <- LKinfo$basisInfo$overlap return( delta*overlap) }
/tmp/LatticeKrig/R/LKrigLatticeScales.R
no_license
NCAR/LatticeKrig
R
false
false
1,347
r
# LatticeKrig is a package for analysis of spatial data written for # the R software environment . # Copyright (C) 2016 # University Corporation for Atmospheric Research (UCAR) # Contact: Douglas Nychka, nychka@ucar.edu, # National Center for Atmospheric Research, PO Box 3000, Boulder, CO 80307-3000 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with the R software environment if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # or see http://www.r-project.org/Licenses/GPL-2 LKrigLatticeScales <- function( object, ...){ UseMethod("LKrigLatticeScales") } LKrigLatticeScales.default<- function( object,...){ LKinfo <- object delta <- LKinfo$latticeInfo$delta overlap <- LKinfo$basisInfo$overlap return( delta*overlap) }
### Packages ----------------------------------------------------------------- library(tidyverse) library(magrittr) library(microbenchmark) ### Get data ----------------------------------------------------------------- SPY <- read.csv("./Data//SPY.csv") %>% filter(Type == "call", K >= 200) %>% mutate(MT = as.numeric(as.Date(Tt) - as.Date(Start)), r = 0.0153/91.5*MT) %>% filter(MT <= 30) %>% select(S0, K, r, MT, C = P) variableRange <- SPY %>% select(-C) ### Calibration function ----------------------------------------------------- BlackScholesFun <- function(S0, K, r, MT, sigma) { d1 <- (log(S0/K) + (r + sigma^2/2)*MT)/(sigma*sqrt(MT)) d2 <- d1 - sigma*sqrt(MT) C <- pnorm(d1)*S0 - pnorm(d2)*K*exp(-r*MT) return(C) } n <- nrow(variableRange) funcCalibrate <- function(sigma) { blackScholes <- mapply(BlackScholesFun, S0 = variableRange$S0, K = variableRange$K, r = variableRange$r, MT = variableRange$MT, sigma = rep(sigma, n)) return(sum((blackScholes - SPY$C)^2)) } ### Calibration -------------------------------------------------------------- sigma0 <- 2 lB <- 0.01 uB <- 5 sigmaOptim <- optim(sigma0, funcCalibrate, lower = lB, upper = uB, method = "L-BFGS-B", control = list(trace = TRUE, maxit = 500)) ### Microbenchmark ----------------------------------------------------------- microbenchmark(optim(sigma0, funcCalibrate, lower = lB, upper = uB, method = "L-BFGS-B", control = list(trace = FALSE, maxit = 500)), unit = "s") S0 <- seq(305, 309, by = 1) # Current instrument price K <- seq(200, 350, by = 1) # Strike price MT <- seq(1, 30, by = 1) # Time to maturity # r <- seq(0, 2.5, by = 0.3) # Risk free rate r <- seq(1, 30, by = 2)*0.0153/91.5 sigma <- seq(0.1, 1, by = 0.05) # Volatility of the instrument variableGrid <- expand.grid(S0 = S0, K = K, r = r, MT = MT, sigma = sigma) microbenchmark(mapply(BlackScholesFun, S0 = variableGrid$S0, K = variableGrid$K, r = variableGrid$r, MT = variableGrid$MT, sigma = variableGrid$sigma), unit = "us", times = 10)
/Scripts/BlackAndScholes/CalibrateBlackScholes.R
no_license
lordbirkemose/P7
R
false
false
2,444
r
### Packages ----------------------------------------------------------------- library(tidyverse) library(magrittr) library(microbenchmark) ### Get data ----------------------------------------------------------------- SPY <- read.csv("./Data//SPY.csv") %>% filter(Type == "call", K >= 200) %>% mutate(MT = as.numeric(as.Date(Tt) - as.Date(Start)), r = 0.0153/91.5*MT) %>% filter(MT <= 30) %>% select(S0, K, r, MT, C = P) variableRange <- SPY %>% select(-C) ### Calibration function ----------------------------------------------------- BlackScholesFun <- function(S0, K, r, MT, sigma) { d1 <- (log(S0/K) + (r + sigma^2/2)*MT)/(sigma*sqrt(MT)) d2 <- d1 - sigma*sqrt(MT) C <- pnorm(d1)*S0 - pnorm(d2)*K*exp(-r*MT) return(C) } n <- nrow(variableRange) funcCalibrate <- function(sigma) { blackScholes <- mapply(BlackScholesFun, S0 = variableRange$S0, K = variableRange$K, r = variableRange$r, MT = variableRange$MT, sigma = rep(sigma, n)) return(sum((blackScholes - SPY$C)^2)) } ### Calibration -------------------------------------------------------------- sigma0 <- 2 lB <- 0.01 uB <- 5 sigmaOptim <- optim(sigma0, funcCalibrate, lower = lB, upper = uB, method = "L-BFGS-B", control = list(trace = TRUE, maxit = 500)) ### Microbenchmark ----------------------------------------------------------- microbenchmark(optim(sigma0, funcCalibrate, lower = lB, upper = uB, method = "L-BFGS-B", control = list(trace = FALSE, maxit = 500)), unit = "s") S0 <- seq(305, 309, by = 1) # Current instrument price K <- seq(200, 350, by = 1) # Strike price MT <- seq(1, 30, by = 1) # Time to maturity # r <- seq(0, 2.5, by = 0.3) # Risk free rate r <- seq(1, 30, by = 2)*0.0153/91.5 sigma <- seq(0.1, 1, by = 0.05) # Volatility of the instrument variableGrid <- expand.grid(S0 = S0, K = K, r = r, MT = MT, sigma = sigma) microbenchmark(mapply(BlackScholesFun, S0 = variableGrid$S0, K = variableGrid$K, r = variableGrid$r, MT = variableGrid$MT, sigma = variableGrid$sigma), unit = "us", times = 10)
#' @include utilities_color.R NULL #'Set Color Palette #' #'@description \itemize{ \item \code{change_palette(), set_palette()}: Change #'both color and fill palettes. \item \code{color_palette()}: change color #'palette only. \item \code{fill_palette()}: change fill palette only. #' #'} #'@inheritParams get_palette #'@param p a ggplot #'@param ... other arguments passed to ggplot2 scale_color_xxx() and #' scale_fill_xxx() functions. #' #'@seealso \link{get_palette}. #' #' #'@examples #'# Load data #'data("ToothGrowth") #'df <- ToothGrowth #' #'# Basic plot #'p <- ggboxplot(df, x = "dose", y = "len", #' color = "dose") #'p #' #'# Change the color palette #' set_palette(p, "jco") #'@name set_palette #'@rdname set_palette #'@export set_palette <- function(p, palette){ p + .ggcolor(palette)+ .ggfill(palette) } #'@rdname set_palette #'@export change_palette <- function(p, palette){ set_palette(p, palette) } #'@rdname set_palette #'@export color_palette <- function(palette = NULL, ...) { brewerpal <- .brewerpal() ggscipal <- .ggscipal() res <- NULL if (is.null(palette)) palette <- "" if (length(palette) == 1) { if (palette %in% brewerpal) ggplot2::scale_color_brewer(..., palette = palette) else if (palette %in% ggscipal) .scale_color_ggsci(palette = palette) else if (palette == "grey") ggplot2::scale_color_grey(..., start = 0.8, end = 0.2) else if (palette == "hue") ggplot2::scale_color_hue(...) else if(.is_color(palette)) ggplot2::scale_color_manual(..., values = palette) } else if (palette[1] != "") ggplot2::scale_color_manual(..., values = palette) } #'@rdname set_palette #'@export fill_palette <- function(palette = NULL, ...){ brewerpal <- .brewerpal() ggscipal <- .ggscipal() res <- NULL if (is.null(palette)) palette <- "" if (length(palette) == 1) { if (palette %in% brewerpal) ggplot2::scale_fill_brewer(..., palette = palette) else if (palette %in% ggscipal) .scale_fill_ggsci(palette = palette) else if (palette == "grey") ggplot2::scale_fill_grey(..., start = 0.8, end = 0.2) else if (palette == "hue") ggplot2::scale_fill_hue(...) else if(.is_color(palette)) ggplot2::scale_fill_manual(..., values = palette) } else if (palette[1] != "") ggplot2::scale_fill_manual(..., values = palette) }
/R/set_palette.R
no_license
kassambara/ggpubr
R
false
false
2,387
r
#' @include utilities_color.R NULL #'Set Color Palette #' #'@description \itemize{ \item \code{change_palette(), set_palette()}: Change #'both color and fill palettes. \item \code{color_palette()}: change color #'palette only. \item \code{fill_palette()}: change fill palette only. #' #'} #'@inheritParams get_palette #'@param p a ggplot #'@param ... other arguments passed to ggplot2 scale_color_xxx() and #' scale_fill_xxx() functions. #' #'@seealso \link{get_palette}. #' #' #'@examples #'# Load data #'data("ToothGrowth") #'df <- ToothGrowth #' #'# Basic plot #'p <- ggboxplot(df, x = "dose", y = "len", #' color = "dose") #'p #' #'# Change the color palette #' set_palette(p, "jco") #'@name set_palette #'@rdname set_palette #'@export set_palette <- function(p, palette){ p + .ggcolor(palette)+ .ggfill(palette) } #'@rdname set_palette #'@export change_palette <- function(p, palette){ set_palette(p, palette) } #'@rdname set_palette #'@export color_palette <- function(palette = NULL, ...) { brewerpal <- .brewerpal() ggscipal <- .ggscipal() res <- NULL if (is.null(palette)) palette <- "" if (length(palette) == 1) { if (palette %in% brewerpal) ggplot2::scale_color_brewer(..., palette = palette) else if (palette %in% ggscipal) .scale_color_ggsci(palette = palette) else if (palette == "grey") ggplot2::scale_color_grey(..., start = 0.8, end = 0.2) else if (palette == "hue") ggplot2::scale_color_hue(...) else if(.is_color(palette)) ggplot2::scale_color_manual(..., values = palette) } else if (palette[1] != "") ggplot2::scale_color_manual(..., values = palette) } #'@rdname set_palette #'@export fill_palette <- function(palette = NULL, ...){ brewerpal <- .brewerpal() ggscipal <- .ggscipal() res <- NULL if (is.null(palette)) palette <- "" if (length(palette) == 1) { if (palette %in% brewerpal) ggplot2::scale_fill_brewer(..., palette = palette) else if (palette %in% ggscipal) .scale_fill_ggsci(palette = palette) else if (palette == "grey") ggplot2::scale_fill_grey(..., start = 0.8, end = 0.2) else if (palette == "hue") ggplot2::scale_fill_hue(...) else if(.is_color(palette)) ggplot2::scale_fill_manual(..., values = palette) } else if (palette[1] != "") ggplot2::scale_fill_manual(..., values = palette) }
context("test-as_text.R") library(sf) test_that("Prints Points", { pt <- st_sfc(st_point(c(1.0002,2.3030303)), crs = 4326) expect_equal(st_asewkt(pt, 1), "SRID=4326;POINT(1 2.3)") expect_equal(st_astext(pt, 2, EWKT = FALSE), "POINT(1 2.3)") expect_equal(st_astext(pt, 3, EWKT = FALSE), "POINT(1 2.303)") expect_equal(st_astext(pt, 10, EWKT = FALSE), "POINT(1.0002 2.3030303)") }) test_that("Prints Polygons and Lines", { pol <- st_sfc(st_polygon(list( rbind(c(0,0),c(0.5,0),c(0.5,0.5),c(0.5,0),c(1,0),c(1,1),c(0,1),c(0,0)) ))) txt <- "POLYGON((0 0,0.5 0,0.5 0.5,0.5 0,1 0,1 1,0 1,0 0))" expect_equal(st_astext(pol), txt) ln <- st_cast(pol, "LINESTRING") txt <- "LINESTRING(0 0,0.5 0,0.5 0.5,0.5 0,1 0,1 1,0 1,0 0)" expect_equal(st_astext(ln), txt) })
/lwgeom/tests/testthat/test-as_text.R
no_license
akhikolla/TestedPackages-NoIssues
R
false
false
783
r
context("test-as_text.R") library(sf) test_that("Prints Points", { pt <- st_sfc(st_point(c(1.0002,2.3030303)), crs = 4326) expect_equal(st_asewkt(pt, 1), "SRID=4326;POINT(1 2.3)") expect_equal(st_astext(pt, 2, EWKT = FALSE), "POINT(1 2.3)") expect_equal(st_astext(pt, 3, EWKT = FALSE), "POINT(1 2.303)") expect_equal(st_astext(pt, 10, EWKT = FALSE), "POINT(1.0002 2.3030303)") }) test_that("Prints Polygons and Lines", { pol <- st_sfc(st_polygon(list( rbind(c(0,0),c(0.5,0),c(0.5,0.5),c(0.5,0),c(1,0),c(1,1),c(0,1),c(0,0)) ))) txt <- "POLYGON((0 0,0.5 0,0.5 0.5,0.5 0,1 0,1 1,0 1,0 0))" expect_equal(st_astext(pol), txt) ln <- st_cast(pol, "LINESTRING") txt <- "LINESTRING(0 0,0.5 0,0.5 0.5,0.5 0,1 0,1 1,0 1,0 0)" expect_equal(st_astext(ln), txt) })
## Assignment 2 library(ggplot2) library(dplyr) library(tidyr) library(grid) (WD <- getwd()) if (!is.null(WD)) setwd(WD) SCC <- readRDS("./ExploreData_Data/Source_Classification_Code.rds") NEI <- readRDS("./ExploreData_Data/summarySCC_PM25.rds") ## 1 - Have total emissions from PM2.5 decreased in the United States from 1999 ## to 2008? Using the base plotting system, make a plot showing the total PM2.5 ## emission from all sources for each of the years 1999, 2002, 2005, and 2008. DF1 <- NEI %>% select(year, type, Emissions) %>% group_by(type, year) %>% summarize(PM25 = mean(Emissions)) # because the number of meters changes from year-to-year, the average is a better represnetation. It controlls for the increase owing to the placement of new meeters. model <- lm(PM25 ~ year, DF1) with(DF1, plot(year, PM25, main = "Total PM2.5 From All Sources", type = "n")) with(subset(DF1, type == "NON-ROAD"), points(year, PM25), col = "black", pch = 15) with(subset(DF1, type == "NONPOINT"), points(year, PM25, col = "blue", pch = 16)) with(subset(DF1, type == "ON-ROAD"), points(year, PM25, col = "red", pch = 17)) with(subset(DF1, type == "POINT"), points(year, PM25, col = "green",pch = 18)) abline(model, lwd=2) legend(x = 2006, y = 55, pch = c(15,16,17,18), col = c("black", "blue", "red", "green"), legend = c("NON-ROAD", "NONPOINT", "ON-ROAD", "POINT"), cex = .75, bty= "n") dev.copy(png, file = "plot1.png", width=500, height=350) dev.off() ## 2 - Have total emissions from PM2.5 decreased in the Baltimore City, Maryland ## (fips == "24510") from 1999 to 2008? Use the base plotting system to make a ## plot answering this question. DF2 <- NEI %>% select(fips, year, Emissions) %>% filter(fips == "24510") %>% group_by(year) %>% summarize(PM25 = mean(Emissions)) model <- lm(PM25 ~ year, DF2) with(DF2, plot(year, PM25, pch = 15, main = "Average PM25 From All Emission Types \nin Baltimore, MD")) abline(model, lwd = 1, col = "red") legend(x=2005, y=10, pch = 15,bty = "n", col = c("black", "red"), legend = c("Mean PM25", "Regression Line")) dev.copy(png, file = "plot2.png", width=600, height=450) dev.off() ## 3- Of the four types of sources indicated by the type (point, nonpoint, ## onroad, nonroad) variable, which of these four sources have seen decreases in ## emissions from 1999-2008 for Baltimore City? Which have seen increases in ## emissions from 1999-2008? Use the ggplot2 plotting system to make a plot ## answer this question. DF3 <- NEI %>% select(fips, year, type, Emissions) %>% filter(fips == "24510") %>% group_by(type, year) %>% summarize(PM25 = mean(Emissions)) qplot(year, PM25, facets = . ~ type, data=DF3, main = "PM25 by Source Type in Baltimore, MD", geom = c("point", "smooth"), method = "lm") + scale_x_continuous(breaks=c(1999, 2002, 2005, 2008)) + theme(panel.margin = unit(1, "lines")) dev.copy(png, file = "plot3.png", width=700, height=300) dev.off() ## 4 - Across the United States, how have emissions from coal combustion-related ## sources changed from 1999-2008? CoalCat <- SCC %>% select(SCC, Short.Name) %>% filter(grepl('Coal', Short.Name )) %>% select(SCC) NEIsub <- NEI %>% select(year, SCC , Emissions) %>% rename(PM25 = Emissions) CoalMerged <- left_join(CoalCat, NEIsub, by = "SCC") #warnings; slow execution time CoalMerged <- na.omit(CoalMerged) DF4 <- CoalMerged %>% group_by(year) %>% summarize(PM25 = sum(PM25)) ggplot(DF4, aes(year, PM25)) + geom_point(size = 4, alpha = 0.5) + geom_smooth(method = "lm") + labs(title = "Average Coal Emissions", x="Year", y=expression("Average Coal Emissions "* PM[2.5])) + scale_x_continuous(breaks=c(1999, 2002, 2005, 2008)) dev.copy(png, file = "plot4.png", width=500, height=400) dev.off() ## 5 - How have emissions from motor vehicle sources changed from 1999-2008 in ## Baltimore City? VehicleCat <- SCC %>% select(SCC, Short.Name) %>% filter(grepl('Motor|Vehicle', Short.Name )) %>% select(SCC) NEIsub <- NEI %>% select(fips, year, SCC , Emissions) %>% rename(PM25 = Emissions) %>% filter(fips == "24510") VehicleMerged <- left_join(VehicleCat, NEIsub, by = "SCC") VehicleMerged <- na.omit(VehicleMerged) ggplot(VehicleMerged, aes(year, PM25)) + geom_point(size = 4, alpha = 0.5) + geom_smooth(method = "lm") + labs(title = "Motor Vehicle Emissions in Baltimore, MD",x="Year", y=expression("Vehicle Emissions "* PM[2.5])) + scale_x_continuous(breaks=c(1999, 2002, 2005, 2008)) dev.copy(png, file = "plot5.png", width=500, height=300) dev.off() ## 6 - Compare emissions from motor vehicle sources in Baltimore City with ## emissions from motor vehicle sources in Los Angeles County, California ## (fips == "06037"). Which city has seen greater changes over time in motor # vehicle emissions? NEIbaltimore <- NEI %>% select(fips, year, SCC , Emissions) %>% filter(fips == "24510") %>% rename(PM25 = Emissions) NEIla <- NEI %>% select(fips, year, SCC, Emissions) %>% filter(fips == "06037") %>% rename(PM25 = Emissions) Baltimore <- left_join(VehicleCat, NEIbaltimore, by = "SCC") Baltimore <- na.omit(Baltimore) LA <- left_join(VehicleCat, NEIla, by = "SCC") LA <- na.omit(LA) BLA <- bind_rows(Baltimore, LA) BLA <- mutate(BLA, City = ifelse(fips == 24510, "Baltimore", "Los Angeles")) BLA2 <- BLA %>% group_by(year,fips) %>% rename(City = fips) %>% summarize(avePM25 = sum(PM25)) ggplot(BLA, aes(factor(year), log(PM25))) + geom_boxplot(aes(color = City)) + labs(title = "Motor Vehicle Emission Comparison of Two Cities",x="Year", y=expression("Vehicle Emissions log("* PM[2.5]*")")) dev.copy(png, file = "plot6.png", width=500, height=300) dev.off()
/Assignment2.R
no_license
excelmaxx/ExploreData
R
false
false
6,016
r
## Assignment 2 library(ggplot2) library(dplyr) library(tidyr) library(grid) (WD <- getwd()) if (!is.null(WD)) setwd(WD) SCC <- readRDS("./ExploreData_Data/Source_Classification_Code.rds") NEI <- readRDS("./ExploreData_Data/summarySCC_PM25.rds") ## 1 - Have total emissions from PM2.5 decreased in the United States from 1999 ## to 2008? Using the base plotting system, make a plot showing the total PM2.5 ## emission from all sources for each of the years 1999, 2002, 2005, and 2008. DF1 <- NEI %>% select(year, type, Emissions) %>% group_by(type, year) %>% summarize(PM25 = mean(Emissions)) # because the number of meters changes from year-to-year, the average is a better represnetation. It controlls for the increase owing to the placement of new meeters. model <- lm(PM25 ~ year, DF1) with(DF1, plot(year, PM25, main = "Total PM2.5 From All Sources", type = "n")) with(subset(DF1, type == "NON-ROAD"), points(year, PM25), col = "black", pch = 15) with(subset(DF1, type == "NONPOINT"), points(year, PM25, col = "blue", pch = 16)) with(subset(DF1, type == "ON-ROAD"), points(year, PM25, col = "red", pch = 17)) with(subset(DF1, type == "POINT"), points(year, PM25, col = "green",pch = 18)) abline(model, lwd=2) legend(x = 2006, y = 55, pch = c(15,16,17,18), col = c("black", "blue", "red", "green"), legend = c("NON-ROAD", "NONPOINT", "ON-ROAD", "POINT"), cex = .75, bty= "n") dev.copy(png, file = "plot1.png", width=500, height=350) dev.off() ## 2 - Have total emissions from PM2.5 decreased in the Baltimore City, Maryland ## (fips == "24510") from 1999 to 2008? Use the base plotting system to make a ## plot answering this question. DF2 <- NEI %>% select(fips, year, Emissions) %>% filter(fips == "24510") %>% group_by(year) %>% summarize(PM25 = mean(Emissions)) model <- lm(PM25 ~ year, DF2) with(DF2, plot(year, PM25, pch = 15, main = "Average PM25 From All Emission Types \nin Baltimore, MD")) abline(model, lwd = 1, col = "red") legend(x=2005, y=10, pch = 15,bty = "n", col = c("black", "red"), legend = c("Mean PM25", "Regression Line")) dev.copy(png, file = "plot2.png", width=600, height=450) dev.off() ## 3- Of the four types of sources indicated by the type (point, nonpoint, ## onroad, nonroad) variable, which of these four sources have seen decreases in ## emissions from 1999-2008 for Baltimore City? Which have seen increases in ## emissions from 1999-2008? Use the ggplot2 plotting system to make a plot ## answer this question. DF3 <- NEI %>% select(fips, year, type, Emissions) %>% filter(fips == "24510") %>% group_by(type, year) %>% summarize(PM25 = mean(Emissions)) qplot(year, PM25, facets = . ~ type, data=DF3, main = "PM25 by Source Type in Baltimore, MD", geom = c("point", "smooth"), method = "lm") + scale_x_continuous(breaks=c(1999, 2002, 2005, 2008)) + theme(panel.margin = unit(1, "lines")) dev.copy(png, file = "plot3.png", width=700, height=300) dev.off() ## 4 - Across the United States, how have emissions from coal combustion-related ## sources changed from 1999-2008? CoalCat <- SCC %>% select(SCC, Short.Name) %>% filter(grepl('Coal', Short.Name )) %>% select(SCC) NEIsub <- NEI %>% select(year, SCC , Emissions) %>% rename(PM25 = Emissions) CoalMerged <- left_join(CoalCat, NEIsub, by = "SCC") #warnings; slow execution time CoalMerged <- na.omit(CoalMerged) DF4 <- CoalMerged %>% group_by(year) %>% summarize(PM25 = sum(PM25)) ggplot(DF4, aes(year, PM25)) + geom_point(size = 4, alpha = 0.5) + geom_smooth(method = "lm") + labs(title = "Average Coal Emissions", x="Year", y=expression("Average Coal Emissions "* PM[2.5])) + scale_x_continuous(breaks=c(1999, 2002, 2005, 2008)) dev.copy(png, file = "plot4.png", width=500, height=400) dev.off() ## 5 - How have emissions from motor vehicle sources changed from 1999-2008 in ## Baltimore City? VehicleCat <- SCC %>% select(SCC, Short.Name) %>% filter(grepl('Motor|Vehicle', Short.Name )) %>% select(SCC) NEIsub <- NEI %>% select(fips, year, SCC , Emissions) %>% rename(PM25 = Emissions) %>% filter(fips == "24510") VehicleMerged <- left_join(VehicleCat, NEIsub, by = "SCC") VehicleMerged <- na.omit(VehicleMerged) ggplot(VehicleMerged, aes(year, PM25)) + geom_point(size = 4, alpha = 0.5) + geom_smooth(method = "lm") + labs(title = "Motor Vehicle Emissions in Baltimore, MD",x="Year", y=expression("Vehicle Emissions "* PM[2.5])) + scale_x_continuous(breaks=c(1999, 2002, 2005, 2008)) dev.copy(png, file = "plot5.png", width=500, height=300) dev.off() ## 6 - Compare emissions from motor vehicle sources in Baltimore City with ## emissions from motor vehicle sources in Los Angeles County, California ## (fips == "06037"). Which city has seen greater changes over time in motor # vehicle emissions? NEIbaltimore <- NEI %>% select(fips, year, SCC , Emissions) %>% filter(fips == "24510") %>% rename(PM25 = Emissions) NEIla <- NEI %>% select(fips, year, SCC, Emissions) %>% filter(fips == "06037") %>% rename(PM25 = Emissions) Baltimore <- left_join(VehicleCat, NEIbaltimore, by = "SCC") Baltimore <- na.omit(Baltimore) LA <- left_join(VehicleCat, NEIla, by = "SCC") LA <- na.omit(LA) BLA <- bind_rows(Baltimore, LA) BLA <- mutate(BLA, City = ifelse(fips == 24510, "Baltimore", "Los Angeles")) BLA2 <- BLA %>% group_by(year,fips) %>% rename(City = fips) %>% summarize(avePM25 = sum(PM25)) ggplot(BLA, aes(factor(year), log(PM25))) + geom_boxplot(aes(color = City)) + labs(title = "Motor Vehicle Emission Comparison of Two Cities",x="Year", y=expression("Vehicle Emissions log("* PM[2.5]*")")) dev.copy(png, file = "plot6.png", width=500, height=300) dev.off()
testlist <- list(A = structure(c(5.59502239659854e+141, 1.52615801940682e+225, 9.12488123524439e+192, 0, 0, 0, 0, 0), .Dim = c(1L, 8L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613112641-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
241
r
testlist <- list(A = structure(c(5.59502239659854e+141, 1.52615801940682e+225, 9.12488123524439e+192, 0, 0, 0, 0, 0), .Dim = c(1L, 8L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/points_to_lines.R \name{points_to_lines} \alias{points_to_lines} \title{From points to lines} \usage{ points_to_lines(sfpoints, dist, net, verbose = TRUE) } \arguments{ \item{sfpoints}{spatial points from \code{\link{clean}}} \item{dist}{buffer distance to intersect pointts with streets. IF lat lon, degree, if projected [m]} \item{net}{Spatial roadnetwork} } \description{ \code{\link{points_to_lines}} Aggregate points by street } \note{ net must have a column name id to each street. sfpoints must include names "id", "veh" and "speed". Use with UTM data (not lat lon) } \examples{ \dontrun{ a <- clean() a plot(a["type"], axes = T, pch = 16, cex = 0.5, col = "red") d <- points_to_lines(a, 1/102/47, osm) plot(d[c("MeanSpeed")], axes = T) plot(d[c("MaxSpeed")], axes = T) } } \seealso{ \code{\link{clean}} }
/man/points_to_lines.Rd
no_license
ibarraespinosa/trapos
R
false
true
893
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/points_to_lines.R \name{points_to_lines} \alias{points_to_lines} \title{From points to lines} \usage{ points_to_lines(sfpoints, dist, net, verbose = TRUE) } \arguments{ \item{sfpoints}{spatial points from \code{\link{clean}}} \item{dist}{buffer distance to intersect pointts with streets. IF lat lon, degree, if projected [m]} \item{net}{Spatial roadnetwork} } \description{ \code{\link{points_to_lines}} Aggregate points by street } \note{ net must have a column name id to each street. sfpoints must include names "id", "veh" and "speed". Use with UTM data (not lat lon) } \examples{ \dontrun{ a <- clean() a plot(a["type"], axes = T, pch = 16, cex = 0.5, col = "red") d <- points_to_lines(a, 1/102/47, osm) plot(d[c("MeanSpeed")], axes = T) plot(d[c("MaxSpeed")], axes = T) } } \seealso{ \code{\link{clean}} }
### GAIT PLOT PANEL #### #' @title #' descriptiveKinematicGaitPanel #' @description #' convenient descriptive plot panel of gait kinematics for a specific context #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param EventContext [string] context of the frame sequence #' @param colorFactor [string] line color according an independant variable #' @param linetypeFactor [string] line type definied according an independant variable #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @param manualLineType [list] manual line type ( see ggplot2 doc) #' @param manualSizeType [float] manual line size ( see ggplot2 doc) #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKinematicGaitPanel<- function(descStatsFrameSequence,descStatsPhases, EventContext, colorFactor=NULL, linetypeFactor=NULL, normativeData=NULL,stdCorridorFlag=FALSE, manualLineType=NULL,manualSizeType=NULL){ if (EventContext== "Left"){ prefixe = "L" } else if (EventContext== "Right"){ prefixe = "R" } else if (EventContext== "Overall"){ prefixe = ""} # trace uni Pelvis_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"PelvisAngles"),"X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(0,60), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Pelvis_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"PelvisAngles"),"Y", iTitle="Pelvic obliquity",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Pelvis_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"PelvisAngles"),"Z", iTitle="Pelvis rotation",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"HipAngles"),"X", iTitle="Hip flexion",yLabel="Deg", legendPosition="none",ylimits=c(-20,70), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"HipAngles"),"Y", iTitle="Hip Abd",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"HipAngles"),"Z", iTitle="Hip rot",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"KneeAngles"),"X", iTitle="Knee flexion",yLabel="Deg", legendPosition="none",ylimits=c(-15,75), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"KneeAngles"),"Y", iTitle="Knee Abd",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"KneeAngles"),"Z", iTitle="Knee rot",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"AnkleAngles"),"X", iTitle="Ankle flexion",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"AnkleAngles"),"Y", iTitle="Ankle eversion",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) FootProgress_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"FootProgressAngles"),"Z", iTitle="Foot progression",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) if (!(is.null(descStatsPhases))){ Pelvis_X=addGaitDescriptiveEventsLines(Pelvis_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Pelvis_Y=addGaitDescriptiveEventsLines(Pelvis_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Pelvis_Z=addGaitDescriptiveEventsLines(Pelvis_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_X=addGaitDescriptiveEventsLines(Hip_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Y=addGaitDescriptiveEventsLines(Hip_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Z=addGaitDescriptiveEventsLines(Hip_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_X=addGaitDescriptiveEventsLines(Knee_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Y=addGaitDescriptiveEventsLines(Knee_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Z=addGaitDescriptiveEventsLines(Knee_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_X=addGaitDescriptiveEventsLines(Ankle_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Y=addGaitDescriptiveEventsLines(Ankle_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) FootProgress_Z=addGaitDescriptiveEventsLines(FootProgress_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) } if (!(is.null(normativeData))){ Pelvis_X = Pelvis_X+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "X")) Pelvis_Y = Pelvis_Y+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Y")) Pelvis_Z = Pelvis_Z+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Z")) Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "Y")) FootProgress_Z = FootProgress_Z+geom_normative_ribbon(filter(normativeData,Label=="FootProgressAngles" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) # Pelvis_X = Pelvis_X + # geom_ribbon(data = filter(data,Label=="PelvisAngles" & Axis == "X"), # aes(ymin = Min, ymax = Max,fill = ComparisonFactor, x= Frame,group=interaction(ComparisonFactor,Label,Axis)), # alpha = 0.4) Pelvis_X = Pelvis_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"PelvisAngles") & Axis == "X")) Pelvis_Y = Pelvis_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"PelvisAngles") & Axis == "Y")) Pelvis_Z = Pelvis_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"PelvisAngles") & Axis == "Z")) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipAngles") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipAngles") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipAngles") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeAngles") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeAngles") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeAngles") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleAngles") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleAngles") & Axis == "Y")) FootProgress_Z = FootProgress_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"FootProgressAngles") & Axis == "Z")) } if (!(is.null(manualLineType))){ Pelvis_X = Pelvis_X + scale_linetype_manual(values=manualLineType) Pelvis_Y = Pelvis_Y + scale_linetype_manual(values=manualLineType) Pelvis_Z = Pelvis_Z + scale_linetype_manual(values=manualLineType) Hip_X = Hip_X + scale_linetype_manual(values=manualLineType) Hip_Y = Hip_Y + scale_linetype_manual(values=manualLineType) Hip_Z = Hip_Z + scale_linetype_manual(values=manualLineType) Knee_X = Knee_X + scale_linetype_manual(values=manualLineType) Knee_Y = Knee_Y + scale_linetype_manual(values=manualLineType) Knee_Z = Knee_Z + scale_linetype_manual(values=manualLineType) Ankle_X = Ankle_X + scale_linetype_manual(values=manualLineType) Ankle_Y = Ankle_Y + scale_linetype_manual(values=manualLineType) FootProgress_Z = FootProgress_Z + scale_linetype_manual(values=manualLineType) } if (!(is.null(manualSizeType))){ Pelvis_X = Pelvis_X + scale_size_manual(values=manualSizeType) Pelvis_Y = Pelvis_Y + scale_size_manual(values=manualSizeType) Pelvis_Z = Pelvis_Z + scale_size_manual(values=manualSizeType) Hip_X = Hip_X + scale_size_manual(values=manualSizeType) Hip_Y = Hip_Y + scale_size_manual(values=manualSizeType) Hip_Z = Hip_Z + scale_size_manual(values=manualSizeType) Knee_X = Knee_X + scale_size_manual(values=manualSizeType) Knee_Y = Knee_Y + scale_size_manual(values=manualSizeType) Knee_Z = Knee_Z + scale_size_manual(values=manualSizeType) Ankle_X = Ankle_X + scale_size_manual(values=manualSizeType) Ankle_Y = Ankle_Y + scale_size_manual(values=manualSizeType) FootProgress_Z = FootProgress_Z + scale_size_manual(values=manualSizeType) } p1 = plot_grid(Pelvis_X, Pelvis_Y,Pelvis_Z,ncol=3) p2 = plot_grid(Hip_X, Hip_Y,Hip_Z,ncol=3) p3 = plot_grid(Knee_X, Knee_Y,Knee_Z,ncol=3) p4 = plot_grid(Ankle_X, Ankle_Y,FootProgress_Z,ncol=3) legend_shared <- get_legend(Pelvis_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1, p2,p3, p4, legend_shared, nrow = 5,rel_heights = c(1,1,1,1, .2)) fig return(fig) } #' @title #' descriptiveKinematicGaitPanel_bothContext #' @description #' convenient descriptive plot panel of gait kinematics for left and right contexts #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKinematicGaitPanel_bothContext<- function(descStatsFrameSequence,descStatsPhases=NULL, normativeData=NULL,stdCorridorFlag=TRUE){ # Pelvis_X = descriptivePlot_bothContext(descStatsFrameSequence, "LPelvisAngles","X", "RPelvisAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(0,60)) Pelvis_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LPelvisAngles","Y", "RPelvisAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Pelvis_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LPelvisAngles","Z", "RPelvisAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Hip_X = descriptivePlot_bothContext(descStatsFrameSequence, "LHipAngles","X", "RHipAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-20,70)) Hip_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LHipAngles","Y", "RHipAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Hip_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LHipAngles","Z", "RHipAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Knee_X = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeAngles","X", "RKneeAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-15,75)) Knee_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeAngles","Y", "RKneeAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Knee_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeAngles","Z", "RKneeAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Ankle_X = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleAngles","X", "RAnkleAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Ankle_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleAngles","Y", "RAnkleAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="top",ylimits=c(-30,30)) FootProgress_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LFootProgressAngles","Z", "RFootProgressAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) if (!(is.null(descStatsPhases))){ Pelvis_X = Pelvis_X+geom_vline_descriptiveEvents_bothContext(descStatsPhases) Pelvis_Y = Pelvis_Y+ geom_vline_descriptiveEvents_bothContext(descStatsPhases) Pelvis_Z= Pelvis_Z +geom_vline_descriptiveEvents_bothContext(descStatsPhases) Hip_X= Hip_X + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Hip_Y=Hip_Y + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Hip_Z=Hip_Z + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Knee_X=Knee_X + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Knee_Y=Knee_Y + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Knee_Z=Knee_Z + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Ankle_X=Ankle_X + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Ankle_Y=Ankle_Y + geom_vline_descriptiveEvents_bothContext(descStatsPhases) FootProgress_Z=FootProgress_Z + geom_vline_descriptiveEvents_bothContext(descStatsPhases) } if (!(is.null(normativeData))){ Pelvis_X = Pelvis_X+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "X")) Pelvis_Y = Pelvis_Y+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Y")) Pelvis_Z = Pelvis_Z+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Z")) Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "Y")) FootProgress_Z = FootProgress_Z+geom_normative_ribbon(filter(normativeData,Label=="FootProgressAngles" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) Pelvis_X = Pelvis_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LPelvisAngles","RPelvisAngles") & Axis == "X")) Pelvis_Y = Pelvis_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LPelvisAngles","RPelvisAngles") & Axis == "Y")) Pelvis_Z = Pelvis_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LPelvisAngles","RPelvisAngles") & Axis == "Z")) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipAngles","RHipAngles") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipAngles","RHipAngles") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipAngles","RHipAngles") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeAngles","RKneeAngles") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeAngles","RKneeAngles") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeAngles","RKneeAngles") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleAngles","RAnkleAngles") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleAngles","RAnkleAngles") & Axis == "Y")) FootProgress_Z = FootProgress_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LFootProgressAngles","RFootProgressAngles") & Axis == "Z")) } p1 = plot_grid(Pelvis_X, Pelvis_Y,Pelvis_Z,ncol=3) p2 = plot_grid(Hip_X, Hip_Y,Hip_Z,ncol=3) p3 = plot_grid(Knee_X, Knee_Y,Knee_Z,ncol=3) p4 = plot_grid(Ankle_X, Ankle_Y,FootProgress_Z,ncol=3) legend_shared <- get_legend(Pelvis_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1, p2,p3, p4, legend_shared, nrow = 5,rel_heights = c(1,1,1,1, .2)) fig return(fig) } #' @title #' descriptiveKineticGaitPanel #' @description #' convenient descriptive plot panel of gait kinetics for a specific context #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param EventContext [string] context of the frame sequence #' @param colorFactor [string] line color according an independant variable #' @param linetypeFactor [string] line type definied according an independant variable #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @param manualLineType [list] manual line type ( see ggplot2 doc) #' @param manualSizeType [float] manual line size ( see ggplot2 doc) #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKineticGaitPanel<- function(descStatsFrameSequence,descStatsPhases, EventContext, colorFactor=NULL, linetypeFactor=NULL, normativeData=NULL,stdCorridorFlag=FALSE, manualLineType=NULL,manualSizeType=NULL){ if (EventContext== "Left"){ prefixe = "L" } else if (EventContext== "Right"){ prefixe = "R" } else if (EventContext== "Overall"){ prefixe = ""} Hip_X = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipMoment"),"X", iTitle="Hip extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-2.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Y = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipMoment"),"Y", iTitle="Hip abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,2.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Z = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipMoment"),"Z", iTitle="Hip rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Power = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipPower"),"Z", iTitle="Hip power",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_X = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneeMoment"),"X", iTitle="Knee extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Y = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneeMoment"),"Y", iTitle="Knee abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Z = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneeMoment"),"Z", iTitle="Knee rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Power = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneePower"),"Z", iTitle="Knee power",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_X = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnkleMoment"),"X", iTitle="Ankle extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Y = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnkleMoment"),"Y", iTitle="Ankle abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Z = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnkleMoment"),"Z", iTitle="Ankle rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Power = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnklePower"),"Z", iTitle="Ankle power",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-2.0,5.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) if (!(is.null(descStatsPhases))){ Hip_X=addGaitDescriptiveEventsLines(Hip_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Y=addGaitDescriptiveEventsLines(Hip_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Z=addGaitDescriptiveEventsLines(Hip_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Power=addGaitDescriptiveEventsLines(Hip_Power,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_X=addGaitDescriptiveEventsLines(Knee_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Y=addGaitDescriptiveEventsLines(Knee_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Z=addGaitDescriptiveEventsLines(Knee_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Power=addGaitDescriptiveEventsLines(Knee_Power,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_X=addGaitDescriptiveEventsLines(Ankle_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Y=addGaitDescriptiveEventsLines(Ankle_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Z=addGaitDescriptiveEventsLines(Ankle_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Power=addGaitDescriptiveEventsLines(Ankle_Power,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) } if (!(is.null(normativeData))){ Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Z")) Hip_Power = Hip_Power+geom_normative_ribbon(filter(normativeData,Label=="HipPower" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Z")) Knee_Power = Knee_Power+geom_normative_ribbon(filter(normativeData,Label=="KneePower" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Y")) Ankle_Z = Ankle_Z+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Z")) Ankle_Power = Ankle_Power+geom_normative_ribbon(filter(normativeData,Label=="AnklePower" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipMoment") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipMoment") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipMoment") & Axis == "Z")) Hip_Power = Hip_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipPower") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeMoment") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeMoment") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeMoment") & Axis == "Z")) Knee_Power = Knee_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneePower") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleMoment") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleMoment") & Axis == "Y")) Ankle_Z = Ankle_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleMoment") & Axis == "Z")) Ankle_Power = Ankle_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnklePower") & Axis == "Z")) } if (!(is.null(manualLineType))){ Hip_X = Hip_X + scale_linetype_manual(values=manualLineType) Hip_Y = Hip_Y + scale_linetype_manual(values=manualLineType) Hip_Z = Hip_Z + scale_linetype_manual(values=manualLineType) Hip_Power = Hip_Power + scale_linetype_manual(values=manualLineType) Knee_X = Knee_X + scale_linetype_manual(values=manualLineType) Knee_Y = Knee_Y + scale_linetype_manual(values=manualLineType) Knee_Z = Knee_Z + scale_linetype_manual(values=manualLineType) Knee_Power = Knee_Power + scale_linetype_manual(values=manualLineType) Ankle_X = Ankle_X + scale_linetype_manual(values=manualLineType) Ankle_Y = Ankle_Y + scale_linetype_manual(values=manualLineType) Ankle_Z = Ankle_Z + scale_linetype_manual(values=manualLineType) Ankle_Power = Ankle_Power + scale_linetype_manual(values=manualLineType) } if (!(is.null(manualSizeType))){ Hip_X = Hip_X + scale_size_manual(values=manualSizeType) Hip_Y = Hip_Y + scale_size_manual(values=manualSizeType) Hip_Z = Hip_Z + scale_size_manual(values=manualSizeType) Hip_Power = Hip_Power + scale_size_manual(values=manualSizeType) Knee_X = Knee_X + scale_size_manual(values=manualSizeType) Knee_Y = Knee_Y + scale_size_manual(values=manualSizeType) Knee_Z = Knee_Z + scale_size_manual(values=manualSizeType) Knee_Power = Knee_Power + scale_size_manual(values=manualSizeType) Ankle_X = Ankle_X + scale_size_manual(values=manualSizeType) Ankle_Y = Ankle_Y + scale_size_manual(values=manualSizeType) Ankle_Z = Ankle_Z + scale_size_manual(values=manualSizeType) Ankle_Power = Ankle_Power + scale_size_manual(values=manualSizeType) } p1 = plot_grid(Hip_X, Hip_Y,Hip_Z,Hip_power,ncol=4) p2 = plot_grid(Knee_X, Knee_Y,Knee_Z,Knee_power,ncol=4) p3 = plot_grid(Ankle_X, Ankle_Y,Ankle_Z,Ankle_power,ncol=4) legend_shared <- get_legend(Hip_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1,p2,p3,legend_shared, nrow = 4, rel_heights = c(1,1,1,.2)) fig return(fig) } #' @title #' descriptiveKineticGaitPanel_bothContext #' @description #' convenient descriptive plot panel of gait kinematics for left and right contexts #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKineticGaitPanel_bothContext<- function(descStatsFrameSequence,descStatsPhases=NULL, normativeData=NULL,stdCorridorFlag=FALSE){ Hip_X = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","X", "RHipMoment","X", iTitle="Hip extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-2.0,3.0)) Hip_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","Y", "RHipMoment","Y", iTitle="Hip abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,2.0)) Hip_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","Z", "RHipMoment","Z", iTitle="Hip rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Hip_Power = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","Z", "RHipMoment","Z", iTitle="Hip rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0)) Knee_X = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","X", "RKneeMoment","X", iTitle="Knee extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0)) Knee_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","Y", "RKneeMoment","Y", iTitle="Knee abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0)) Knee_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","Z", "RKneeMoment","Z", iTitle="Knee rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Knee_Power = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","Z", "RKneeMoment","Z", iTitle="Knee rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0)) Ankle_X = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","X", "RAnkleMoment","X", iTitle="Ankle extensor moment",yLabel="N.m.kg-1", legendPosition="top",ylimits=c(-1.0,3.0)) Ankle_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","Y", "RAnkleMoment","Y", iTitle="Ankle abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Ankle_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","Z", "RAnkleMoment","Z", iTitle="Ankle rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Ankle_Power = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","Z", "RAnkleMoment","Z", iTitle="Ankle rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-5.0,5.0)) if (!(is.null(descStatsPhases))){ Hip_X=addGaitDescriptiveEventsLines_bothContext(Hip_X,descStatsPhases) Hip_Y=addGaitDescriptiveEventsLines_bothContext(Hip_Y,descStatsPhases) Hip_Z=addGaitDescriptiveEventsLines_bothContext(Hip_Z,descStatsPhases) Hip_Power=addGaitDescriptiveEventsLines_bothContext(Hip_Power,descStatsPhases) Knee_X=addGaitDescriptiveEventsLines_bothContext(Knee_X,descStatsPhases) Knee_Y=addGaitDescriptiveEventsLines_bothContext(Knee_Y,descStatsPhases) Knee_Z=addGaitDescriptiveEventsLines_bothContext(Knee_Z,descStatsPhases) Knee_Power=addGaitDescriptiveEventsLines_bothContext(Knee_Power,descStatsPhases) Ankle_X=addGaitDescriptiveEventsLines_bothContext(Ankle_X,descStatsPhases) Ankle_Y=addGaitDescriptiveEventsLines_bothContext(Ankle_Y,descStatsPhases) Ankle_Z=addGaitDescriptiveEventsLines_bothContext(Ankle_Z,descStatsPhases) Ankle_Power=addGaitDescriptiveEventsLines_bothContext(Ankle_Power,descStatsPhases) } if (!(is.null(normativeData))){ Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Z")) Hip_Power = Hip_Power+geom_normative_ribbon(filter(normativeData,Label=="HipPower" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Z")) Knee_Power = Knee_Power+geom_normative_ribbon(filter(normativeData,Label=="KneePower" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Y")) Ankle_Z = Ankle_Z+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Z")) Ankle_Power = Ankle_Power+geom_normative_ribbon(filter(normativeData,Label=="AnklePower" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipMoment","RHipMoment") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipMoment","RHipMoment") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipMoment","RHipMoment") & Axis == "Z")) Hip_Power = Hip_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipPower","RHipPower") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeMoment","RKneeMoment") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeMoment","RKneeMoment") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeMoment","RKneeMoment") & Axis == "Z")) Knee_Power = Knee_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneePower","RKneePower") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleMoment","RAnkleMoment") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleMoment","RAnkleMoment") & Axis == "Y")) Ankle_Z = Ankle_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleMoment","RAnkleMoment") & Axis == "Z")) Ankle_Power = Ankle_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnklePower","RAnklePower") & Axis == "Z")) } p1 = plot_grid(Hip_X, Hip_Y,Hip_Z,Hip_Power,ncol=4) p2 = plot_grid(Knee_X, Knee_Y,Knee_Z,Knee_Power,ncol=4) p3 = plot_grid(Ankle_X, Ankle_Y,Ankle_Z,Ankle_Power,ncol=4) legend_shared <- get_legend(Hip_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1,p2,p3,legend_shared, nrow = 4, rel_heights = c(1,1,1,.2)) fig return(fig) }
/R/plotPanel.R
no_license
pyCGM2/rCGM2
R
false
false
40,911
r
### GAIT PLOT PANEL #### #' @title #' descriptiveKinematicGaitPanel #' @description #' convenient descriptive plot panel of gait kinematics for a specific context #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param EventContext [string] context of the frame sequence #' @param colorFactor [string] line color according an independant variable #' @param linetypeFactor [string] line type definied according an independant variable #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @param manualLineType [list] manual line type ( see ggplot2 doc) #' @param manualSizeType [float] manual line size ( see ggplot2 doc) #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKinematicGaitPanel<- function(descStatsFrameSequence,descStatsPhases, EventContext, colorFactor=NULL, linetypeFactor=NULL, normativeData=NULL,stdCorridorFlag=FALSE, manualLineType=NULL,manualSizeType=NULL){ if (EventContext== "Left"){ prefixe = "L" } else if (EventContext== "Right"){ prefixe = "R" } else if (EventContext== "Overall"){ prefixe = ""} # trace uni Pelvis_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"PelvisAngles"),"X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(0,60), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Pelvis_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"PelvisAngles"),"Y", iTitle="Pelvic obliquity",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Pelvis_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"PelvisAngles"),"Z", iTitle="Pelvis rotation",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"HipAngles"),"X", iTitle="Hip flexion",yLabel="Deg", legendPosition="none",ylimits=c(-20,70), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"HipAngles"),"Y", iTitle="Hip Abd",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"HipAngles"),"Z", iTitle="Hip rot",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"KneeAngles"),"X", iTitle="Knee flexion",yLabel="Deg", legendPosition="none",ylimits=c(-15,75), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"KneeAngles"),"Y", iTitle="Knee Abd",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"KneeAngles"),"Z", iTitle="Knee rot",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_X = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"AnkleAngles"),"X", iTitle="Ankle flexion",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Y = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"AnkleAngles"),"Y", iTitle="Ankle eversion",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) FootProgress_Z = descriptivePlot(descStatsFrameSequence, EventContext , paste0(prefixe,"FootProgressAngles"),"Z", iTitle="Foot progression",yLabel="Deg", legendPosition="none",ylimits=c(-30,30), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) if (!(is.null(descStatsPhases))){ Pelvis_X=addGaitDescriptiveEventsLines(Pelvis_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Pelvis_Y=addGaitDescriptiveEventsLines(Pelvis_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Pelvis_Z=addGaitDescriptiveEventsLines(Pelvis_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_X=addGaitDescriptiveEventsLines(Hip_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Y=addGaitDescriptiveEventsLines(Hip_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Z=addGaitDescriptiveEventsLines(Hip_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_X=addGaitDescriptiveEventsLines(Knee_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Y=addGaitDescriptiveEventsLines(Knee_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Z=addGaitDescriptiveEventsLines(Knee_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_X=addGaitDescriptiveEventsLines(Ankle_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Y=addGaitDescriptiveEventsLines(Ankle_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) FootProgress_Z=addGaitDescriptiveEventsLines(FootProgress_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) } if (!(is.null(normativeData))){ Pelvis_X = Pelvis_X+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "X")) Pelvis_Y = Pelvis_Y+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Y")) Pelvis_Z = Pelvis_Z+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Z")) Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "Y")) FootProgress_Z = FootProgress_Z+geom_normative_ribbon(filter(normativeData,Label=="FootProgressAngles" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) # Pelvis_X = Pelvis_X + # geom_ribbon(data = filter(data,Label=="PelvisAngles" & Axis == "X"), # aes(ymin = Min, ymax = Max,fill = ComparisonFactor, x= Frame,group=interaction(ComparisonFactor,Label,Axis)), # alpha = 0.4) Pelvis_X = Pelvis_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"PelvisAngles") & Axis == "X")) Pelvis_Y = Pelvis_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"PelvisAngles") & Axis == "Y")) Pelvis_Z = Pelvis_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"PelvisAngles") & Axis == "Z")) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipAngles") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipAngles") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipAngles") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeAngles") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeAngles") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeAngles") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleAngles") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleAngles") & Axis == "Y")) FootProgress_Z = FootProgress_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"FootProgressAngles") & Axis == "Z")) } if (!(is.null(manualLineType))){ Pelvis_X = Pelvis_X + scale_linetype_manual(values=manualLineType) Pelvis_Y = Pelvis_Y + scale_linetype_manual(values=manualLineType) Pelvis_Z = Pelvis_Z + scale_linetype_manual(values=manualLineType) Hip_X = Hip_X + scale_linetype_manual(values=manualLineType) Hip_Y = Hip_Y + scale_linetype_manual(values=manualLineType) Hip_Z = Hip_Z + scale_linetype_manual(values=manualLineType) Knee_X = Knee_X + scale_linetype_manual(values=manualLineType) Knee_Y = Knee_Y + scale_linetype_manual(values=manualLineType) Knee_Z = Knee_Z + scale_linetype_manual(values=manualLineType) Ankle_X = Ankle_X + scale_linetype_manual(values=manualLineType) Ankle_Y = Ankle_Y + scale_linetype_manual(values=manualLineType) FootProgress_Z = FootProgress_Z + scale_linetype_manual(values=manualLineType) } if (!(is.null(manualSizeType))){ Pelvis_X = Pelvis_X + scale_size_manual(values=manualSizeType) Pelvis_Y = Pelvis_Y + scale_size_manual(values=manualSizeType) Pelvis_Z = Pelvis_Z + scale_size_manual(values=manualSizeType) Hip_X = Hip_X + scale_size_manual(values=manualSizeType) Hip_Y = Hip_Y + scale_size_manual(values=manualSizeType) Hip_Z = Hip_Z + scale_size_manual(values=manualSizeType) Knee_X = Knee_X + scale_size_manual(values=manualSizeType) Knee_Y = Knee_Y + scale_size_manual(values=manualSizeType) Knee_Z = Knee_Z + scale_size_manual(values=manualSizeType) Ankle_X = Ankle_X + scale_size_manual(values=manualSizeType) Ankle_Y = Ankle_Y + scale_size_manual(values=manualSizeType) FootProgress_Z = FootProgress_Z + scale_size_manual(values=manualSizeType) } p1 = plot_grid(Pelvis_X, Pelvis_Y,Pelvis_Z,ncol=3) p2 = plot_grid(Hip_X, Hip_Y,Hip_Z,ncol=3) p3 = plot_grid(Knee_X, Knee_Y,Knee_Z,ncol=3) p4 = plot_grid(Ankle_X, Ankle_Y,FootProgress_Z,ncol=3) legend_shared <- get_legend(Pelvis_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1, p2,p3, p4, legend_shared, nrow = 5,rel_heights = c(1,1,1,1, .2)) fig return(fig) } #' @title #' descriptiveKinematicGaitPanel_bothContext #' @description #' convenient descriptive plot panel of gait kinematics for left and right contexts #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKinematicGaitPanel_bothContext<- function(descStatsFrameSequence,descStatsPhases=NULL, normativeData=NULL,stdCorridorFlag=TRUE){ # Pelvis_X = descriptivePlot_bothContext(descStatsFrameSequence, "LPelvisAngles","X", "RPelvisAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(0,60)) Pelvis_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LPelvisAngles","Y", "RPelvisAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Pelvis_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LPelvisAngles","Z", "RPelvisAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Hip_X = descriptivePlot_bothContext(descStatsFrameSequence, "LHipAngles","X", "RHipAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-20,70)) Hip_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LHipAngles","Y", "RHipAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Hip_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LHipAngles","Z", "RHipAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Knee_X = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeAngles","X", "RKneeAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-15,75)) Knee_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeAngles","Y", "RKneeAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Knee_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeAngles","Z", "RKneeAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Ankle_X = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleAngles","X", "RAnkleAngles","X", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) Ankle_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleAngles","Y", "RAnkleAngles","Y", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="top",ylimits=c(-30,30)) FootProgress_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LFootProgressAngles","Z", "RFootProgressAngles","Z", iTitle="Pelvic tilt",yLabel="Deg", legendPosition="none",ylimits=c(-30,30)) if (!(is.null(descStatsPhases))){ Pelvis_X = Pelvis_X+geom_vline_descriptiveEvents_bothContext(descStatsPhases) Pelvis_Y = Pelvis_Y+ geom_vline_descriptiveEvents_bothContext(descStatsPhases) Pelvis_Z= Pelvis_Z +geom_vline_descriptiveEvents_bothContext(descStatsPhases) Hip_X= Hip_X + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Hip_Y=Hip_Y + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Hip_Z=Hip_Z + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Knee_X=Knee_X + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Knee_Y=Knee_Y + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Knee_Z=Knee_Z + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Ankle_X=Ankle_X + geom_vline_descriptiveEvents_bothContext(descStatsPhases) Ankle_Y=Ankle_Y + geom_vline_descriptiveEvents_bothContext(descStatsPhases) FootProgress_Z=FootProgress_Z + geom_vline_descriptiveEvents_bothContext(descStatsPhases) } if (!(is.null(normativeData))){ Pelvis_X = Pelvis_X+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "X")) Pelvis_Y = Pelvis_Y+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Y")) Pelvis_Z = Pelvis_Z+geom_normative_ribbon(filter(normativeData,Label=="PelvisAngles" & Axis == "Z")) Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipAngles" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeAngles" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleAngles" & Axis == "Y")) FootProgress_Z = FootProgress_Z+geom_normative_ribbon(filter(normativeData,Label=="FootProgressAngles" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) Pelvis_X = Pelvis_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LPelvisAngles","RPelvisAngles") & Axis == "X")) Pelvis_Y = Pelvis_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LPelvisAngles","RPelvisAngles") & Axis == "Y")) Pelvis_Z = Pelvis_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LPelvisAngles","RPelvisAngles") & Axis == "Z")) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipAngles","RHipAngles") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipAngles","RHipAngles") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipAngles","RHipAngles") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeAngles","RKneeAngles") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeAngles","RKneeAngles") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeAngles","RKneeAngles") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleAngles","RAnkleAngles") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleAngles","RAnkleAngles") & Axis == "Y")) FootProgress_Z = FootProgress_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LFootProgressAngles","RFootProgressAngles") & Axis == "Z")) } p1 = plot_grid(Pelvis_X, Pelvis_Y,Pelvis_Z,ncol=3) p2 = plot_grid(Hip_X, Hip_Y,Hip_Z,ncol=3) p3 = plot_grid(Knee_X, Knee_Y,Knee_Z,ncol=3) p4 = plot_grid(Ankle_X, Ankle_Y,FootProgress_Z,ncol=3) legend_shared <- get_legend(Pelvis_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1, p2,p3, p4, legend_shared, nrow = 5,rel_heights = c(1,1,1,1, .2)) fig return(fig) } #' @title #' descriptiveKineticGaitPanel #' @description #' convenient descriptive plot panel of gait kinetics for a specific context #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param EventContext [string] context of the frame sequence #' @param colorFactor [string] line color according an independant variable #' @param linetypeFactor [string] line type definied according an independant variable #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @param manualLineType [list] manual line type ( see ggplot2 doc) #' @param manualSizeType [float] manual line size ( see ggplot2 doc) #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKineticGaitPanel<- function(descStatsFrameSequence,descStatsPhases, EventContext, colorFactor=NULL, linetypeFactor=NULL, normativeData=NULL,stdCorridorFlag=FALSE, manualLineType=NULL,manualSizeType=NULL){ if (EventContext== "Left"){ prefixe = "L" } else if (EventContext== "Right"){ prefixe = "R" } else if (EventContext== "Overall"){ prefixe = ""} Hip_X = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipMoment"),"X", iTitle="Hip extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-2.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Y = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipMoment"),"Y", iTitle="Hip abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,2.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Z = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipMoment"),"Z", iTitle="Hip rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Hip_Power = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"HipPower"),"Z", iTitle="Hip power",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_X = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneeMoment"),"X", iTitle="Knee extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Y = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneeMoment"),"Y", iTitle="Knee abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Z = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneeMoment"),"Z", iTitle="Knee rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Knee_Power = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"KneePower"),"Z", iTitle="Knee power",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_X = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnkleMoment"),"X", iTitle="Ankle extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,3.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Y = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnkleMoment"),"Y", iTitle="Ankle abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Z = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnkleMoment"),"Z", iTitle="Ankle rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) Ankle_Power = descriptivePlot(descStatsFrameSequence, iSubjects, "Overall" , paste0(prefixe,"AnklePower"),"Z", iTitle="Ankle power",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-2.0,5.0), colorFactor = colorFactor,linetypeFactor = linetypeFactor, facetFactor = NULL) if (!(is.null(descStatsPhases))){ Hip_X=addGaitDescriptiveEventsLines(Hip_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Y=addGaitDescriptiveEventsLines(Hip_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Z=addGaitDescriptiveEventsLines(Hip_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Hip_Power=addGaitDescriptiveEventsLines(Hip_Power,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_X=addGaitDescriptiveEventsLines(Knee_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Y=addGaitDescriptiveEventsLines(Knee_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Z=addGaitDescriptiveEventsLines(Knee_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Knee_Power=addGaitDescriptiveEventsLines(Knee_Power,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_X=addGaitDescriptiveEventsLines(Ankle_X,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Y=addGaitDescriptiveEventsLines(Ankle_Y,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Z=addGaitDescriptiveEventsLines(Ankle_Z,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) Ankle_Power=addGaitDescriptiveEventsLines(Ankle_Power,descStatsPhases,EventContext, colorFactor=colorFactor, linetypeFactor=linetypeFactor ) } if (!(is.null(normativeData))){ Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Z")) Hip_Power = Hip_Power+geom_normative_ribbon(filter(normativeData,Label=="HipPower" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Z")) Knee_Power = Knee_Power+geom_normative_ribbon(filter(normativeData,Label=="KneePower" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Y")) Ankle_Z = Ankle_Z+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Z")) Ankle_Power = Ankle_Power+geom_normative_ribbon(filter(normativeData,Label=="AnklePower" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipMoment") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipMoment") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipMoment") & Axis == "Z")) Hip_Power = Hip_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"HipPower") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeMoment") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeMoment") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneeMoment") & Axis == "Z")) Knee_Power = Knee_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"KneePower") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleMoment") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleMoment") & Axis == "Y")) Ankle_Z = Ankle_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnkleMoment") & Axis == "Z")) Ankle_Power = Ankle_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label==paste0(prefixe,"AnklePower") & Axis == "Z")) } if (!(is.null(manualLineType))){ Hip_X = Hip_X + scale_linetype_manual(values=manualLineType) Hip_Y = Hip_Y + scale_linetype_manual(values=manualLineType) Hip_Z = Hip_Z + scale_linetype_manual(values=manualLineType) Hip_Power = Hip_Power + scale_linetype_manual(values=manualLineType) Knee_X = Knee_X + scale_linetype_manual(values=manualLineType) Knee_Y = Knee_Y + scale_linetype_manual(values=manualLineType) Knee_Z = Knee_Z + scale_linetype_manual(values=manualLineType) Knee_Power = Knee_Power + scale_linetype_manual(values=manualLineType) Ankle_X = Ankle_X + scale_linetype_manual(values=manualLineType) Ankle_Y = Ankle_Y + scale_linetype_manual(values=manualLineType) Ankle_Z = Ankle_Z + scale_linetype_manual(values=manualLineType) Ankle_Power = Ankle_Power + scale_linetype_manual(values=manualLineType) } if (!(is.null(manualSizeType))){ Hip_X = Hip_X + scale_size_manual(values=manualSizeType) Hip_Y = Hip_Y + scale_size_manual(values=manualSizeType) Hip_Z = Hip_Z + scale_size_manual(values=manualSizeType) Hip_Power = Hip_Power + scale_size_manual(values=manualSizeType) Knee_X = Knee_X + scale_size_manual(values=manualSizeType) Knee_Y = Knee_Y + scale_size_manual(values=manualSizeType) Knee_Z = Knee_Z + scale_size_manual(values=manualSizeType) Knee_Power = Knee_Power + scale_size_manual(values=manualSizeType) Ankle_X = Ankle_X + scale_size_manual(values=manualSizeType) Ankle_Y = Ankle_Y + scale_size_manual(values=manualSizeType) Ankle_Z = Ankle_Z + scale_size_manual(values=manualSizeType) Ankle_Power = Ankle_Power + scale_size_manual(values=manualSizeType) } p1 = plot_grid(Hip_X, Hip_Y,Hip_Z,Hip_power,ncol=4) p2 = plot_grid(Knee_X, Knee_Y,Knee_Z,Knee_power,ncol=4) p3 = plot_grid(Ankle_X, Ankle_Y,Ankle_Z,Ankle_power,ncol=4) legend_shared <- get_legend(Hip_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1,p2,p3,legend_shared, nrow = 4, rel_heights = c(1,1,1,.2)) fig return(fig) } #' @title #' descriptiveKineticGaitPanel_bothContext #' @description #' convenient descriptive plot panel of gait kinematics for left and right contexts #' @param descStatsFrameSequence [dataframe] descriptive stats table of all frame sequences #' @param descStatsPhases [dataframe] descriptive stats table of gait phase scalar () #' @param normativeData [dataframe] table of a normative dataset #' @param stdCorridorFlag [Bool] add std corridor to plot #' @return fig [ggplot2 figure] #' @examples #' #' @section Warning: #' #' #' descriptiveKineticGaitPanel_bothContext<- function(descStatsFrameSequence,descStatsPhases=NULL, normativeData=NULL,stdCorridorFlag=FALSE){ Hip_X = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","X", "RHipMoment","X", iTitle="Hip extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-2.0,3.0)) Hip_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","Y", "RHipMoment","Y", iTitle="Hip abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,2.0)) Hip_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","Z", "RHipMoment","Z", iTitle="Hip rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Hip_Power = descriptivePlot_bothContext(descStatsFrameSequence, "LHipMoment","Z", "RHipMoment","Z", iTitle="Hip rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0)) Knee_X = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","X", "RKneeMoment","X", iTitle="Knee extensor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0)) Knee_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","Y", "RKneeMoment","Y", iTitle="Knee abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-1.0,1.0)) Knee_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","Z", "RKneeMoment","Z", iTitle="Knee rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Knee_Power = descriptivePlot_bothContext(descStatsFrameSequence, "LKneeMoment","Z", "RKneeMoment","Z", iTitle="Knee rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-3.0,3.0)) Ankle_X = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","X", "RAnkleMoment","X", iTitle="Ankle extensor moment",yLabel="N.m.kg-1", legendPosition="top",ylimits=c(-1.0,3.0)) Ankle_Y = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","Y", "RAnkleMoment","Y", iTitle="Ankle abductor moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Ankle_Z = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","Z", "RAnkleMoment","Z", iTitle="Ankle rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-0.5,0.5)) Ankle_Power = descriptivePlot_bothContext(descStatsFrameSequence, "LAnkleMoment","Z", "RAnkleMoment","Z", iTitle="Ankle rotator moment",yLabel="N.m.kg-1", legendPosition="none",ylimits=c(-5.0,5.0)) if (!(is.null(descStatsPhases))){ Hip_X=addGaitDescriptiveEventsLines_bothContext(Hip_X,descStatsPhases) Hip_Y=addGaitDescriptiveEventsLines_bothContext(Hip_Y,descStatsPhases) Hip_Z=addGaitDescriptiveEventsLines_bothContext(Hip_Z,descStatsPhases) Hip_Power=addGaitDescriptiveEventsLines_bothContext(Hip_Power,descStatsPhases) Knee_X=addGaitDescriptiveEventsLines_bothContext(Knee_X,descStatsPhases) Knee_Y=addGaitDescriptiveEventsLines_bothContext(Knee_Y,descStatsPhases) Knee_Z=addGaitDescriptiveEventsLines_bothContext(Knee_Z,descStatsPhases) Knee_Power=addGaitDescriptiveEventsLines_bothContext(Knee_Power,descStatsPhases) Ankle_X=addGaitDescriptiveEventsLines_bothContext(Ankle_X,descStatsPhases) Ankle_Y=addGaitDescriptiveEventsLines_bothContext(Ankle_Y,descStatsPhases) Ankle_Z=addGaitDescriptiveEventsLines_bothContext(Ankle_Z,descStatsPhases) Ankle_Power=addGaitDescriptiveEventsLines_bothContext(Ankle_Power,descStatsPhases) } if (!(is.null(normativeData))){ Hip_X = Hip_X+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "X")) Hip_Y = Hip_Y+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Y")) Hip_Z = Hip_Z+geom_normative_ribbon(filter(normativeData,Label=="HipMoment" & Axis == "Z")) Hip_Power = Hip_Power+geom_normative_ribbon(filter(normativeData,Label=="HipPower" & Axis == "Z")) Knee_X = Knee_X+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "X")) Knee_Y = Knee_Y+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Y")) Knee_Z = Knee_Z+geom_normative_ribbon(filter(normativeData,Label=="KneeMoment" & Axis == "Z")) Knee_Power = Knee_Power+geom_normative_ribbon(filter(normativeData,Label=="KneePower" & Axis == "Z")) Ankle_X = Ankle_X+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "X")) Ankle_Y = Ankle_Y+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Y")) Ankle_Z = Ankle_Z+geom_normative_ribbon(filter(normativeData,Label=="AnkleMoment" & Axis == "Z")) Ankle_Power = Ankle_Power+geom_normative_ribbon(filter(normativeData,Label=="AnklePower" & Axis == "Z")) } if (stdCorridorFlag){ data = getStdCorridorLimits_fromDescStatFrameSequences(descStatsFrameSequence) Hip_X = Hip_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipMoment","RHipMoment") & Axis == "X")) Hip_Y = Hip_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipMoment","RHipMoment") & Axis == "Y")) Hip_Z = Hip_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipMoment","RHipMoment") & Axis == "Z")) Hip_Power = Hip_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LHipPower","RHipPower") & Axis == "Z")) Knee_X = Knee_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeMoment","RKneeMoment") & Axis == "X")) Knee_Y = Knee_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeMoment","RKneeMoment") & Axis == "Y")) Knee_Z = Knee_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneeMoment","RKneeMoment") & Axis == "Z")) Knee_Power = Knee_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LKneePower","RKneePower") & Axis == "Z")) Ankle_X = Ankle_X + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleMoment","RAnkleMoment") & Axis == "X")) Ankle_Y = Ankle_Y + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleMoment","RAnkleMoment") & Axis == "Y")) Ankle_Z = Ankle_Z + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnkleMoment","RAnkleMoment") & Axis == "Z")) Ankle_Power = Ankle_Power + geom_stdRibbon(filter(descStatsFrameSequence,Label %in% c("LAnklePower","RAnklePower") & Axis == "Z")) } p1 = plot_grid(Hip_X, Hip_Y,Hip_Z,Hip_Power,ncol=4) p2 = plot_grid(Knee_X, Knee_Y,Knee_Z,Knee_Power,ncol=4) p3 = plot_grid(Ankle_X, Ankle_Y,Ankle_Z,Ankle_Power,ncol=4) legend_shared <- get_legend(Hip_X + theme(legend.position=c(0.3,0.8),legend.direction = "horizontal")) fig = plot_grid(p1,p2,p3,legend_shared, nrow = 4, rel_heights = c(1,1,1,.2)) fig return(fig) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calcMACcomparison.R \name{calcMACcomparison} \alias{calcMACcomparison} \title{calcMACcomparison} \usage{ calcMACcomparison(DBmix, DBref, threshMAC) } \arguments{ \item{DBmix}{A (nS x nL) matrix with evidence (only alleles) information. LIST not efficient} \item{DBref}{A (nR x nL) matrix with reference information. LIST not efficient} \item{threshMAC}{Required MAC threshold for being a candidate match} } \description{ A function calc number of alleles in ref-table which are within evidence-table }
/casesolver_1.4.1/man/calcMACcomparison.Rd
no_license
drchriscole/casesolver
R
false
true
600
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calcMACcomparison.R \name{calcMACcomparison} \alias{calcMACcomparison} \title{calcMACcomparison} \usage{ calcMACcomparison(DBmix, DBref, threshMAC) } \arguments{ \item{DBmix}{A (nS x nL) matrix with evidence (only alleles) information. LIST not efficient} \item{DBref}{A (nR x nL) matrix with reference information. LIST not efficient} \item{threshMAC}{Required MAC threshold for being a candidate match} } \description{ A function calc number of alleles in ref-table which are within evidence-table }
#collapse columns as strings join.columns<-function(obj,char="|",quote.last=FALSE) { if(class(obj)=="list"){obj<-as.matrix(obj[[1]])} else {obj<-as.matrix(obj)} if(length(obj)==0) { return(NULL) }else{ if(ncol(as.matrix(obj))>=2) { n<-ncol(obj) out<-data.frame() sobj<-obj i<-1 for(i in 1:(n-1)) { if(quote.last==TRUE) { sobj[,i]<-paste(as.character(obj[,i]),paste("'",as.character(obj[,i+1]),"'",sep=""),sep=char) } else { sobj[,i]<-paste(as.character(obj[,i]),as.character(obj[,i+1]),sep=char) } } sobj[,-n] }else{ obj } } } #accesory function to return position of first instance of unique object unique.id<-function(obj) { tmp<-as.factor(obj) id<-seq(along=obj) sapply(1:nlevels(tmp),function(i) { id[tmp==levels(tmp)[i]][1] }) } #function to check for packages and attempt to download if not found check.get.packages<-function(pkg) { options(warn=-1) #make sure bio conductor is one of the repositories #will need a mechanism to make sure this stays upto date if(!all(names(getOption("repos"))%in%"BioCsoft")) { r<-getOption("repos") r["BioCsoft"]<-"http://www.bioconductor.org/packages/2.10/bioc" options(repos = r) } res<-character() need<-as.matrix(sapply(1:length(pkg),function(i) { if(require(pkg[i],character.only = TRUE)==FALSE) { res<-c(res,pkg[i]) } })) if(!any(need=="NULL")) { x<-apply(need,1,install.packages) tryCatch(apply(need,1,library, character.only= TRUE),error=function(e){paste("could not find package: ",paste(as.character(need),collapse=", "),sep="")}) } } #function to extract objects based on reference extract.on.index<-function(database,index=database[,1,drop=FALSE],what,extract.on="row") { # the merge function should be used instead if(extract.on=="col"){database<-t(database)} #assume top row are column names col.names<-database[1,] #first column of what and database are the index for extractions # cbind objects based on matching index values index.w<-as.character(what) ref<-as.data.frame(index) out<-lapply(1:ncol(ref),function(j) { index.d<-as.character(ref[,j])#as.character(database[,1]) index.w<-index.w[index.w%in%index.d] tmp.database<-database out<-matrix(NA,length(index.w),ncol(tmp.database),1) e.index<-c(1:nrow(database)) i<-1 for(i in 1:length(index.w)) { if(any(index.w[i]%in%index.d)) { ext<-unique(e.index[index.w[i]==index.d])[1] out[i,]<-tmp.database[ext,] } } # placing rownames in a column to avoid duplicate error out<-as.matrix(cbind(index.w,out)) if(extract.on=="col") { out<-cbind(col.names,as.data.frame(t(out))) #fix column names col.names<-as.character(unlist(out[1,])) out<-out[-1,] colnames(out)<-col.names }else{ out<-as.data.frame(out) colnames(out)<-col.names } }) return(out) } #check object value or set default on condition if.or<-function(object,if.value=NULL,default,environment=devium) { obj<-tryCatch(svalue(get(object,envir=environment)),error=function(e){NA}) if(!any(obj%in%c(if.value,NA))){return(obj)}else{return(default)} } #get unassigned variables from within data frame gget<-function(obj) { #break obj on $ # [1] = data frame # [2] = variable name # return object tmp<-unlist(strsplit(obj,"\\$")) if(!length(tmp)==0) get(tmp[1])[,tmp[2]] else NULL } #function to connect to google docs GetGoogleDoc<-function(account,password,connection="new") { #returns list # [1] = connection name # [2] = names of documents # connection = as.character connection name if already made using this function # and stored in the envir= googDocs #install RGoogleDocs if not available if(require("RGoogleDocs")==FALSE) { install.packages("RGoogleDocs", repos = "http://www.omegahat.org/R", type="source") library("RGoogleDocs") } if(connection == "new") { #make time stampped name for connection con.name<-con.name.txt<-paste('connection',format(Sys.time(), "%Y.%m.%d_%I_%M_%p"), sep = ".") #set options to avoid ssl error options(RCurlOptions = list(capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE)) #assign to new envir assign("googDocs",new.env(),envir=.GlobalEnv) assign(con.name,getGoogleDocsConnection(getGoogleAuth(account, password, service ="wise")), envir = googDocs ) } else { con.name<-con.name.txt<-connection } docs<-getDocs(tryCatch(get(con.name,envir=googDocs),error=function(e){stop(paste(connection, " does not exist","\n"))})) dnames<-names(docs) return(list(connection = con.name.txt , names = dnames)) } #function to view excel objects viewExcelObject<-function(obj.path) { #connect to file and view: #worksheet names #named ranges if(require("XLConnect")==FALSE) { install.packages("XLConnect") library("XLConnect") } #load workbook old.dir<-getwd() wd<-dirname(obj.path) workbook<-basename(obj.path) setwd(wd) wb = loadWorkbook(workbook, create = FALSE) #get sheet names all.worksheets<-getSheets(wb) #get all valid named ranges all.named.ranges<-getDefinedNames(wb, validOnly=TRUE) setwd(old.dir) return(list(worksheets=all.worksheets,named.ranges=all.named.ranges)) } #accesory functions based/from package pmg #---------------------------------------------------- Paste<-function (..., sep = "", collapse = "") { x = unlist(list(...)) x = x[!is.na(x)] x = x[x != "NA"] paste(x, sep = sep, collapse = collapse) } is.gWindow<-function (obj) { is(obj, "gWindowRGtk") } rpel<-function (string, envir = .GlobalEnv) { eval(parse(text = string), envir = envir) } #function to calculate placement of list items into an Excel worksheet list.placement.full<-function(data.list,list.names,direction,start.col,start.row,spacer) { #accessory fxn list.object.dim.full<-function(data.list,list.names) { l.dim<-list() n<-length(data.list) i<-1 for(i in 1:n) { tmp.list<-as.data.frame(data.list[[i]]) height<-dim(tmp.list)[1] width<-dim(as.data.frame(tmp.list))[2] l.dim[[i]]<-as.data.frame(matrix(cbind(width,height),ncol=2)) } out<-do.call("rbind",l.dim) out<-cbind(list.names,out) colnames(out)<-c("objects","width","height") out } set.1<-list.object.dim.full(data.list,list.names) col.i<-rbind(matrix(LETTERS,ncol=1),matrix(paste(rep(LETTERS,each=length(LETTERS)),rep(LETTERS,length(LETTERS)),sep=""),ncol=1)) row.i<-matrix(1:1e6,ncol=1) place.row<-matrix() place.col<-matrix() place.range<-matrix() columns<-matrix() rows<-matrix() n<-dim(set.1)[1] i<-1 for(i in 1:n) { place.row[i]<-start.row+sum(unlist(set.1[1:i,3]))+spacer*(i-1)-unlist(set.1[i,3]) place.col[i]<-col.i[start.col+sum(unlist(set.1[1:(i),2]))+spacer*(i-1)-unlist(set.1[i,2])] if(direction=="vertical"){ place.range[i]<-matrix(paste(col.i[start.col],place.row[i],sep=""),ncol=1)} else{ if(direction=="horizontal"){ place.range[i]<-matrix(paste(place.col[i],start.row,sep=""),ncol=1)}}} ex.range<-as.data.frame(cbind(set.1,place.range)) ex.range } #function to get gwidget svalues for assigned widgets d.get<-function(object, main.object="devium.pca.object",envir=devium) { #check to see if main object exists else create sapply(1:length(object),function(i) { tmp<-svalue(get(object[i],envir=envir)) d.assign(add.obj=object[i],value=tmp,main.object,envir=envir) }) } #function to get gwidget svalues for assigned widgets #main.object and its envir as string check.get.obj<-function(object, main.object="devium.pca.object",envir="devium") { #check to see if main object exists else create check.get.envir(main.object,envir) env<-get(envir) sapply(1:length(object),function(i) { tmp<-svalue(get(object[i],envir=get(envir))) d.assign(add.obj=object[i],value=tmp,main.object,envir=get(envir)) }) } check.get.envir<-function(main.object,envir) { if(!exists(envir)){ assign(envir,new.env(),envir= .GlobalEnv)} if(!exists(main.object,envir=get(envir))){assign(main.object,list(),envir=get(envir))} } #fxn to create the environment "devium" if it does not exist create.devium.env<-function() { if(!exists("devium")) { if(!is.environment("devium")){ assign("devium",new.env(),envir= .GlobalEnv)} #check for devium objects and set to null if they don't exist for (i in c("devium.helpBrowser.window", "devium.plotnotebook.window")) { if(!exists(i)) { assign(i, NULL, envir = devium) } } } } #function to make assignments to storage object d.assign<-function(add.obj,value,main.object,envir=devium) #main.object="devium.pca.object" { .local<-function() { tmp<-get(main.object,envir=envir) tmp[[add.obj]]<-value assign(get("main.object"),tmp,envir=devium) } tryCatch(.local(),error=function(e){}) } #from plyr: get as text .<-function (..., .env = parent.frame()) { structure(as.list(match.call()[-1]), env = .env, class = "quoted") } #load devium objects source.dir<-function(type="file",dir=getwd(), file.list=c("https://raw.github.com/dgrapov/devium/master/R/Devium%20GUI%20elements.r", "https://raw.github.com/dgrapov/devium/master/R/Devium%20Plotting%20Functions.r", "https://raw.github.com/dgrapov/devium/master/R/Devium%20common%20functions.R", "https://raw.github.com/dgrapov/devium/master/R/Devium%20network%20functions.r")) { #check to see the type of source switch(type, "file" = .local<-function(file.list) { o.dir<-getwd() setwd(dir) obj<-dir() sapply(1:length(obj),function(i) { tryCatch(source(obj[i]),error=function(e){print(paste("can't load:",obj[i]))}) }) setwd(o.dir) }, "https" = .local<-function(file.list) { if(require(RCurl)==FALSE){install.packages("RCurl");library(RCurl)} else { library(RCurl)} if(is.null(file.list)){return()}else{obj<-file.list} sapply(1:length(obj),function(i) { tryCatch( eval( expr = parse( text = getURL(obj[i], ssl.verifypeer=FALSE) ),envir=.GlobalEnv),error=function(e){print(paste("can't load:",obj[i]))}) }) } ) .local(file.list=file.list) }
/R/Devium common functions.R
no_license
narendrameena/devium
R
false
false
11,128
r
#collapse columns as strings join.columns<-function(obj,char="|",quote.last=FALSE) { if(class(obj)=="list"){obj<-as.matrix(obj[[1]])} else {obj<-as.matrix(obj)} if(length(obj)==0) { return(NULL) }else{ if(ncol(as.matrix(obj))>=2) { n<-ncol(obj) out<-data.frame() sobj<-obj i<-1 for(i in 1:(n-1)) { if(quote.last==TRUE) { sobj[,i]<-paste(as.character(obj[,i]),paste("'",as.character(obj[,i+1]),"'",sep=""),sep=char) } else { sobj[,i]<-paste(as.character(obj[,i]),as.character(obj[,i+1]),sep=char) } } sobj[,-n] }else{ obj } } } #accesory function to return position of first instance of unique object unique.id<-function(obj) { tmp<-as.factor(obj) id<-seq(along=obj) sapply(1:nlevels(tmp),function(i) { id[tmp==levels(tmp)[i]][1] }) } #function to check for packages and attempt to download if not found check.get.packages<-function(pkg) { options(warn=-1) #make sure bio conductor is one of the repositories #will need a mechanism to make sure this stays upto date if(!all(names(getOption("repos"))%in%"BioCsoft")) { r<-getOption("repos") r["BioCsoft"]<-"http://www.bioconductor.org/packages/2.10/bioc" options(repos = r) } res<-character() need<-as.matrix(sapply(1:length(pkg),function(i) { if(require(pkg[i],character.only = TRUE)==FALSE) { res<-c(res,pkg[i]) } })) if(!any(need=="NULL")) { x<-apply(need,1,install.packages) tryCatch(apply(need,1,library, character.only= TRUE),error=function(e){paste("could not find package: ",paste(as.character(need),collapse=", "),sep="")}) } } #function to extract objects based on reference extract.on.index<-function(database,index=database[,1,drop=FALSE],what,extract.on="row") { # the merge function should be used instead if(extract.on=="col"){database<-t(database)} #assume top row are column names col.names<-database[1,] #first column of what and database are the index for extractions # cbind objects based on matching index values index.w<-as.character(what) ref<-as.data.frame(index) out<-lapply(1:ncol(ref),function(j) { index.d<-as.character(ref[,j])#as.character(database[,1]) index.w<-index.w[index.w%in%index.d] tmp.database<-database out<-matrix(NA,length(index.w),ncol(tmp.database),1) e.index<-c(1:nrow(database)) i<-1 for(i in 1:length(index.w)) { if(any(index.w[i]%in%index.d)) { ext<-unique(e.index[index.w[i]==index.d])[1] out[i,]<-tmp.database[ext,] } } # placing rownames in a column to avoid duplicate error out<-as.matrix(cbind(index.w,out)) if(extract.on=="col") { out<-cbind(col.names,as.data.frame(t(out))) #fix column names col.names<-as.character(unlist(out[1,])) out<-out[-1,] colnames(out)<-col.names }else{ out<-as.data.frame(out) colnames(out)<-col.names } }) return(out) } #check object value or set default on condition if.or<-function(object,if.value=NULL,default,environment=devium) { obj<-tryCatch(svalue(get(object,envir=environment)),error=function(e){NA}) if(!any(obj%in%c(if.value,NA))){return(obj)}else{return(default)} } #get unassigned variables from within data frame gget<-function(obj) { #break obj on $ # [1] = data frame # [2] = variable name # return object tmp<-unlist(strsplit(obj,"\\$")) if(!length(tmp)==0) get(tmp[1])[,tmp[2]] else NULL } #function to connect to google docs GetGoogleDoc<-function(account,password,connection="new") { #returns list # [1] = connection name # [2] = names of documents # connection = as.character connection name if already made using this function # and stored in the envir= googDocs #install RGoogleDocs if not available if(require("RGoogleDocs")==FALSE) { install.packages("RGoogleDocs", repos = "http://www.omegahat.org/R", type="source") library("RGoogleDocs") } if(connection == "new") { #make time stampped name for connection con.name<-con.name.txt<-paste('connection',format(Sys.time(), "%Y.%m.%d_%I_%M_%p"), sep = ".") #set options to avoid ssl error options(RCurlOptions = list(capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE)) #assign to new envir assign("googDocs",new.env(),envir=.GlobalEnv) assign(con.name,getGoogleDocsConnection(getGoogleAuth(account, password, service ="wise")), envir = googDocs ) } else { con.name<-con.name.txt<-connection } docs<-getDocs(tryCatch(get(con.name,envir=googDocs),error=function(e){stop(paste(connection, " does not exist","\n"))})) dnames<-names(docs) return(list(connection = con.name.txt , names = dnames)) } #function to view excel objects viewExcelObject<-function(obj.path) { #connect to file and view: #worksheet names #named ranges if(require("XLConnect")==FALSE) { install.packages("XLConnect") library("XLConnect") } #load workbook old.dir<-getwd() wd<-dirname(obj.path) workbook<-basename(obj.path) setwd(wd) wb = loadWorkbook(workbook, create = FALSE) #get sheet names all.worksheets<-getSheets(wb) #get all valid named ranges all.named.ranges<-getDefinedNames(wb, validOnly=TRUE) setwd(old.dir) return(list(worksheets=all.worksheets,named.ranges=all.named.ranges)) } #accesory functions based/from package pmg #---------------------------------------------------- Paste<-function (..., sep = "", collapse = "") { x = unlist(list(...)) x = x[!is.na(x)] x = x[x != "NA"] paste(x, sep = sep, collapse = collapse) } is.gWindow<-function (obj) { is(obj, "gWindowRGtk") } rpel<-function (string, envir = .GlobalEnv) { eval(parse(text = string), envir = envir) } #function to calculate placement of list items into an Excel worksheet list.placement.full<-function(data.list,list.names,direction,start.col,start.row,spacer) { #accessory fxn list.object.dim.full<-function(data.list,list.names) { l.dim<-list() n<-length(data.list) i<-1 for(i in 1:n) { tmp.list<-as.data.frame(data.list[[i]]) height<-dim(tmp.list)[1] width<-dim(as.data.frame(tmp.list))[2] l.dim[[i]]<-as.data.frame(matrix(cbind(width,height),ncol=2)) } out<-do.call("rbind",l.dim) out<-cbind(list.names,out) colnames(out)<-c("objects","width","height") out } set.1<-list.object.dim.full(data.list,list.names) col.i<-rbind(matrix(LETTERS,ncol=1),matrix(paste(rep(LETTERS,each=length(LETTERS)),rep(LETTERS,length(LETTERS)),sep=""),ncol=1)) row.i<-matrix(1:1e6,ncol=1) place.row<-matrix() place.col<-matrix() place.range<-matrix() columns<-matrix() rows<-matrix() n<-dim(set.1)[1] i<-1 for(i in 1:n) { place.row[i]<-start.row+sum(unlist(set.1[1:i,3]))+spacer*(i-1)-unlist(set.1[i,3]) place.col[i]<-col.i[start.col+sum(unlist(set.1[1:(i),2]))+spacer*(i-1)-unlist(set.1[i,2])] if(direction=="vertical"){ place.range[i]<-matrix(paste(col.i[start.col],place.row[i],sep=""),ncol=1)} else{ if(direction=="horizontal"){ place.range[i]<-matrix(paste(place.col[i],start.row,sep=""),ncol=1)}}} ex.range<-as.data.frame(cbind(set.1,place.range)) ex.range } #function to get gwidget svalues for assigned widgets d.get<-function(object, main.object="devium.pca.object",envir=devium) { #check to see if main object exists else create sapply(1:length(object),function(i) { tmp<-svalue(get(object[i],envir=envir)) d.assign(add.obj=object[i],value=tmp,main.object,envir=envir) }) } #function to get gwidget svalues for assigned widgets #main.object and its envir as string check.get.obj<-function(object, main.object="devium.pca.object",envir="devium") { #check to see if main object exists else create check.get.envir(main.object,envir) env<-get(envir) sapply(1:length(object),function(i) { tmp<-svalue(get(object[i],envir=get(envir))) d.assign(add.obj=object[i],value=tmp,main.object,envir=get(envir)) }) } check.get.envir<-function(main.object,envir) { if(!exists(envir)){ assign(envir,new.env(),envir= .GlobalEnv)} if(!exists(main.object,envir=get(envir))){assign(main.object,list(),envir=get(envir))} } #fxn to create the environment "devium" if it does not exist create.devium.env<-function() { if(!exists("devium")) { if(!is.environment("devium")){ assign("devium",new.env(),envir= .GlobalEnv)} #check for devium objects and set to null if they don't exist for (i in c("devium.helpBrowser.window", "devium.plotnotebook.window")) { if(!exists(i)) { assign(i, NULL, envir = devium) } } } } #function to make assignments to storage object d.assign<-function(add.obj,value,main.object,envir=devium) #main.object="devium.pca.object" { .local<-function() { tmp<-get(main.object,envir=envir) tmp[[add.obj]]<-value assign(get("main.object"),tmp,envir=devium) } tryCatch(.local(),error=function(e){}) } #from plyr: get as text .<-function (..., .env = parent.frame()) { structure(as.list(match.call()[-1]), env = .env, class = "quoted") } #load devium objects source.dir<-function(type="file",dir=getwd(), file.list=c("https://raw.github.com/dgrapov/devium/master/R/Devium%20GUI%20elements.r", "https://raw.github.com/dgrapov/devium/master/R/Devium%20Plotting%20Functions.r", "https://raw.github.com/dgrapov/devium/master/R/Devium%20common%20functions.R", "https://raw.github.com/dgrapov/devium/master/R/Devium%20network%20functions.r")) { #check to see the type of source switch(type, "file" = .local<-function(file.list) { o.dir<-getwd() setwd(dir) obj<-dir() sapply(1:length(obj),function(i) { tryCatch(source(obj[i]),error=function(e){print(paste("can't load:",obj[i]))}) }) setwd(o.dir) }, "https" = .local<-function(file.list) { if(require(RCurl)==FALSE){install.packages("RCurl");library(RCurl)} else { library(RCurl)} if(is.null(file.list)){return()}else{obj<-file.list} sapply(1:length(obj),function(i) { tryCatch( eval( expr = parse( text = getURL(obj[i], ssl.verifypeer=FALSE) ),envir=.GlobalEnv),error=function(e){print(paste("can't load:",obj[i]))}) }) } ) .local(file.list=file.list) }
# Every function in this file requires: # x: a matrix of data # m: the cutoff row to split the rows of x in two subset # option1: (0): use the mean of the matrix of the subset created by splitting the matrix (as in equations (2.5)) # or (1): use the mean of the whole x (as in proposition (2.1)) # option2: (0): use sigma as defined in equation (2.5) # or (1): use sigma=cov.shrink(x) as instead # option3: (0): use the eigenvectors as defined in equation (2.6) # or (1): use the eigenvectors from the first subset of x # or (2): use the eigenvectors from the second subset of x # or (3): use the eigenvector from sigma=cov.shrink(x) # So the basic model showned in the paper uses the 3 respective options as (0,0,0) or (1,0,0) # See the definition of the function "estimator" to see the implementation # The equations referred to are the ones in Abadir's used at the time, available in the same folder as this code ##### NEW ESTIMATOR # Compute one covariance matrix SIGMA~ from equation (2.6) estimator <- function(x,m,option1,option2,option3) { source("compute_matrices.R") source("abadir.R") library("matrixcalc") library("tawny") n = dim(x)[1] k = dim(x)[2] ### Equation (2.3) (split the data into 2 matrices x1 and x2) x1 = x[1:m,]# [m x k] x2 = x[(m+1):n,]# [(n-m) x k] ##### CLASSIC COVARIANCE MATRIX (MARKOWITZ) # Compute the covariance matrix named SIGMA sigma = classic_covariance_matrix(x) # [k x k] # Create the spectral decomposition of SIGMA output_spectral_decomposition = spectral_decomposition(sigma,k) # Unload the output and transform list elements as matrices lambda = matrix(unlist(output_spectral_decomposition[1]),ncol = k,byrow = 1) p = matrix(unlist(output_spectral_decomposition[2]),ncol = k,byrow = 1) ### Equation (2.4) SIGMA1 decomposition (SIGMA1 = P1 LAMBDA1 P1') # Same procedure for the covariance matrix named SIGMA1 sigma1 = matrix(ncol = k, nrow = k) if (option2 == 0) { sigma1 = classic_covariance_matrix(x1) }else { sigma1 = cov.shrink(x1) } output_spectral_decomposition1 = spectral_decomposition(sigma1,k) lambda1 = matrix(unlist(output_spectral_decomposition1[1]),ncol = k,byrow = 1) p1 = matrix(unlist(output_spectral_decomposition1[2]),ncol = k,byrow = 1) ### Equation (2.5) computing lambda~ # Compute the covariance matrix named SIGMA2 sigma2 = matrix(ncol = k, nrow = k) if (option1 == 0) { sigma2 = classic_covariance_matrix(x2) }else { sigma2 = classic_covariance_matrix(x2,x) } # Compute lambda~ lambda_tilde = diag( t(p1) %*% sigma2 %*% p1 )*identity_matrix(k) # Choice of the eigenvectors to be used in Equation (2.6) sigma3 = matrix(ncol = k, nrow = k) P = matrix(ncol = k, nrow = k) if (option3 == 0) { P=p }else if (option3 == 1) { P=p1 }else if (option3 == 2) { output_spectral_decomposition2 = spectral_decomposition(sigma2,k) lambda2 = matrix(unlist(output_spectral_decomposition2[1]),ncol = k,byrow = 1) p2 = matrix(unlist(output_spectral_decomposition2[2]),ncol = k,byrow = 1) P = p2 }else if (option3 == 3) { sigma3 = cov.shrink(x) output_spectral_decomposition3 = spectral_decomposition(sigma3,k) lambda3 = matrix(unlist(output_spectral_decomposition3[1]),ncol = k,byrow = 1) p3 = matrix(unlist(output_spectral_decomposition3[2]),ncol = k,byrow = 1) P = p3 } ### Equation (2.6) computing the new estimator SIGMA~ sigma_tilde = P %*% lambda_tilde %*% t(P) return(sigma_tilde) } ##### GENERALIZED ESTIMATOR # Equation (2.15) estimator_generalized <- function(x,m,number_of_samples,option1,option2,option3) { # For parallel computation exporting source("compute_matrices.R") source("abadir.R") # Compute the average of s samples rand = sapply(1:number_of_samples, function(i) sample(dim(x)[1],replace = 0)) # Non-repeated random samplings of rows # Bootstrapped Abadir's estimator sampled_estimators = lapply(1:number_of_samples, function(i) estimator(x[rand[,i],], m, option1,option2,option3) ) samples_sum = Reduce("+",sampled_estimators) generalized_estimator = (1/number_of_samples) * samples_sum # Average computation return(generalized_estimator) } ##### GENERALIZED ESTIMATOR OVER MULTIPLE M's # Equation (3.1) estimator_generalized_m_averaged <- function(x,m_s,number_of_samples,option1,option2,option3) { generalized_estimators = lapply(1:length(m_s), function(i) estimator_generalized(x,m_s[i],number_of_samples,option1,option2,option3)) generalized_estimator_m_sum = Reduce("+",generalized_estimators) generalized_estimator_m_averaged = (1/length(m_s)) * generalized_estimator_m_sum # Average computation return(generalized_estimator_m_averaged) } ##### GENERALIZED ESTIMATOR OVER MULTIPLE M's, USING PARALLEL COMPUTING # Equation (3.1) estimator_generalized_m_averaged_par <- function(x,m_s,number_of_samples,option1,option2,option3) { f <- function(i) { m=m_s[i] estimator_generalized(x,m,number_of_samples,option1,option2,option3) } # Parallel computing cl <- makePSOCKcluster(detectCores()-1) export_list = list("x","m_s","number_of_samples","option1","option2","option3","estimator_generalized") cluster_export(cl,export_list,environment()) output_estimators = parLapply(cl, 1:length(m_s), f) stopCluster(cl) # Bootstrapped generalized estimator generalized_estimator_m_sum = Reduce("+",output_estimators) generalized_estimator_m_averaged = (1/length(m_s)) * generalized_estimator_m_sum # Average computation return(generalized_estimator_m_averaged) } ##### BOOTSTRAPPED MATRICES bootstrap <- function(x,m,number_of_bootstraps,benchmark,option1,option2,option3) { n = dim(x)[1] k = dim(x)[2] m = round(m) rand = sapply(1:number_of_bootstraps, function(i) round(runif(n,1,n))) # Repeated random samplings of rows classical_covariance = ones_matrix(k) # Empty data container bootstraps_cov = list() # Empty data container if (missing(benchmark)) { # Bootstrapped classical covariance matrix bootstraps_cov = lapply(1:number_of_bootstraps, function(i) classic_covariance_matrix(x[rand[,i],])) bootstraps_sum = Reduce("+",bootstraps_cov) classical_covariance = ( n/ ((n-1)*number_of_bootstraps) ) * bootstraps_sum # Average computation }else {classical_covariance=benchmark} # Bootstrapped Abadir's estimator bootstraps_estimator = lapply(1:number_of_bootstraps, function(i) estimator(x[rand[,i],], m, option1,option2,option3) ) bootstraps_sum = Reduce("+",bootstraps_estimator) generalized_estimator = (1/number_of_bootstraps) * bootstraps_sum # Average computation # Errors differences = lapply(1:number_of_bootstraps, function(i) classical_covariance - bootstraps_estimator[[i]]) norms_l1 = sapply(1:number_of_bootstraps, function(i) vech_norm(differences[[i]], 1) ) norms_l2 = sapply(1:number_of_bootstraps, function(i) vech_norm(differences[[i]], 2) ) return( list( classical_covariance, generalized_estimator, mean(norms_l1), mean(norms_l2), bootstraps_cov, bootstraps_estimator, rand ) ) } ##### BOOTSTRAPPED MATRICES (COVARIANCE AND CORRELATION) bootstrap_both <- function(x,m,number_of_bootstraps,benchmark,option1,option2,option3) { n = dim(x)[1] k = dim(x)[2] m = round(m) # Because resampling with repetition can cause covariance matrices to be singular (2 rows can be the same), # We bootstrap a correlation matrix every average of 3 covariance matrices j = max( floor(number_of_bootstraps/3) ,1) # Number of correlation matrices # Get the bootstrap of the covariances bootstrapping_cov = bootstrap(x,m,number_of_bootstraps,benchmark,option1,option2,option3) classical_covariance = bootstrapping_cov[1] generalized_estimator = bootstrapping_cov[2] norm_l1_cov = bootstrapping_cov[3] norm_l2_cov = bootstrapping_cov[4] rand = matrix(unlist( bootstrapping_cov[7] ),byrow = 1, ncol = number_of_bootstraps) temp_estimators = bootstrapping_cov[6] if (missing(benchmark)) { temp_covariances = bootstrapping_cov[5] # Bootstrapped classical correlation temp_cov_averages = lapply( 0:(j-1), function(i) ( temp_covariances[[1]][[(1+i*3)]]/3 + temp_covariances[[1]][[(2+i*3)]]/3 + temp_covariances[[1]][[(3+i*3)]]/3) ) bootstraps = lapply( 1:j, function(i) correlation_matrix(temp_cov_averages[[i]])) bootstraps_sum = Reduce("+",bootstraps) classical_correlation = ( n/ (n*j) ) * bootstraps_sum # Average computation }else{classical_correlation = correlation_matrix(benchmark)} # Bootstrapped Abadir's estimator correlation temp_corr_averages = lapply( 0:(j-1), function(i) ( temp_estimators[[1]][[(1+i*3)]]/3 + temp_estimators[[1]][[(2+i*3)]]/3 + temp_estimators[[1]][[(3+i*3)]]/3) ) bootstraps = lapply( 1:j, function(i) correlation_matrix(temp_corr_averages[[i]])) bootstraps_sum = Reduce("+",bootstraps) generalized_correlation = ( n/ (n*j) ) * bootstraps_sum # Average computation # Errors differences = lapply( 1:j, function(i) classical_correlation - bootstraps[[i]]) norms_l1_corr = sapply( 1:j, function(i) vech_norm(differences[[i]], 1) ) norms_l2_corr = sapply( 1:j, function(i) vech_norm(differences[[i]], 2) ) return( list( classical_covariance, generalized_estimator, norm_l1_cov, norm_l2_cov, classical_correlation, generalized_correlation, mean(norms_l1_corr), mean(norms_l2_corr) ) ) } ##### BOOTSTRAPPED MATRICES, USING PARALLEL COMPUTING bootstrap_par <- function(x,m,number_of_bootstraps,benchmark,option1,option2,option3) { n = dim(x)[1] k = dim(x)[2] m = round(m) rand = sapply(1:number_of_bootstraps, function(i) round(runif(n,1,n))) # Repeated random samplings of rows classical_covariance = ones_matrix(k) # Empty data container bootstraps_cov = list() # Empty data container if (missing(benchmark)) { # Bootstrapped classical covariance matrix bootstraps_cov = lapply(1:number_of_bootstraps, function(i) classic_covariance_matrix(x[rand[,i],])) bootstraps_sum = Reduce("+",bootstraps_cov) classical_covariance = ( n/ ((n-1)*number_of_bootstraps) ) * bootstraps_sum # Average computation }else {classical_covariance=benchmark} f <- function(i) { estimator(x[rand[,i],], m, option1,option2,option3) } # Parallel computing cl <- makePSOCKcluster(detectCores()-1) export_list = list("x","m","number_of_bootstraps","benchmark","option1","option2","option3","estimator") cluster_export(cl,export_list,environment()) bootstraps_estimator = parLapply(cl, 1:number_of_bootstraps, f) stopCluster(cl) # Bootstrapped estimator bootstrapped_estimator_sum = Reduce("+",bootstraps_estimator) bootstrapped_estimator_averaged = (1/number_of_bootstraps) * bootstrapped_estimator_sum # Average computation return( bootstrapped_estimator_averaged ) } ##### OPTIMAL m based on the errors from the covariance matrix from Abadir estimator # Return a list containing ( optimal m, vector of errors for each m used ) find_optimal_m_cov <- function(x,m_s,number_of_bootstraps,option1,option2,option3) { errors = lapply(m_s, function(m_s) bootstrap(x,m_s,number_of_bootstraps,option1,option2,option3)[3] ) errors = unlist(errors) names(errors) = m_s # Since the single lowest error of all the set could be due to chance and be surrounded by significantly higher values, # I Compute a rolling average of 4 observations in order to identify clusters of low errors (regions of mimima) optimal_m = unlist(cluster_minimum(errors, 4)[1]) return( list( optimal_m, errors ) ) } ##### OPTIMAL m based on the errors from the correlation matrix based on the covariance matrix from Abadir estimator # Return a list containing ( optimal m, vector of errors for each m used ) find_optimal_m_corr <- function(x,m_s,number_of_bootstraps,option1,option2,option3) { errors = lapply(m_s, function(m_s) bootstrap_both(x,m_s,number_of_bootstraps,option1,option2,option3)[7] ) errors = unlist(errors) names(errors) = m_s # Since the single lowest error of all the set could be due to chance and be surrounded by significantly higher values, # I Compute a rolling average of 4 observations in order to identify clusters of low errors (regions of mimima) optimal_m = unlist(cluster_minimum(errors, 4)[1]) return( list( optimal_m, errors ) ) } ##### OPTIMAL m based on the errors from both (from the correlation matrix based on the covariance matrix from Abadir estimator) # Return a list containing ( optimal m, vector of errors for each m used ) find_optimal_m_both <- function(x,m_s,number_of_bootstraps,benchmark,option1,option2,option3) { # In order for the parallelization of the computations to work, we need to provide all the files to load to execute the code # And this even if we put it in the main. header=source("header.R") output_bootstrapping = list() # Empty data container if (missing(benchmark)) { output_bootstrapping = lapply(m_s, function(m_s) bootstrap_both(x,m_s,number_of_bootstraps,option1,option2,option3) ) }else { output_bootstrapping = lapply(m_s, function(m_s) bootstrap_both(x,m_s,number_of_bootstraps,benchmark,option1,option2,option3) ) } errors_cov = sapply(1:length(m_s), function(i) unlist(output_bootstrapping[[i]][[3]]) ) names(errors_cov) = m_s errors_corr = sapply(1:length(m_s), function(i) unlist(output_bootstrapping[[i]][[7]]) ) names(errors_corr) = m_s # Standardize them to their lowest error standardized_errors_cov = errors_cov/min(errors_cov)-1 standardized_errors_corr = errors_corr/min(errors_corr)-1 # Create an index to minimize (simply an average of their standardized errors) errors_both = (standardized_errors_cov + standardized_errors_corr)/2 # Since the single lowest error of all the set could be due to chance and be surrounded by significantly higher values, # I Compute a rolling average of 4 observations in order to identify clusters of low errors (regions of mimima) optimal_m = unlist(cluster_minimum(errors_both, 4)[1]) return( list(optimal_m, errors_both, errors_cov, errors_corr ) ) }
/abadir.R
permissive
plnad/bocconi_thesis
R
false
false
14,540
r
# Every function in this file requires: # x: a matrix of data # m: the cutoff row to split the rows of x in two subset # option1: (0): use the mean of the matrix of the subset created by splitting the matrix (as in equations (2.5)) # or (1): use the mean of the whole x (as in proposition (2.1)) # option2: (0): use sigma as defined in equation (2.5) # or (1): use sigma=cov.shrink(x) as instead # option3: (0): use the eigenvectors as defined in equation (2.6) # or (1): use the eigenvectors from the first subset of x # or (2): use the eigenvectors from the second subset of x # or (3): use the eigenvector from sigma=cov.shrink(x) # So the basic model showned in the paper uses the 3 respective options as (0,0,0) or (1,0,0) # See the definition of the function "estimator" to see the implementation # The equations referred to are the ones in Abadir's used at the time, available in the same folder as this code ##### NEW ESTIMATOR # Compute one covariance matrix SIGMA~ from equation (2.6) estimator <- function(x,m,option1,option2,option3) { source("compute_matrices.R") source("abadir.R") library("matrixcalc") library("tawny") n = dim(x)[1] k = dim(x)[2] ### Equation (2.3) (split the data into 2 matrices x1 and x2) x1 = x[1:m,]# [m x k] x2 = x[(m+1):n,]# [(n-m) x k] ##### CLASSIC COVARIANCE MATRIX (MARKOWITZ) # Compute the covariance matrix named SIGMA sigma = classic_covariance_matrix(x) # [k x k] # Create the spectral decomposition of SIGMA output_spectral_decomposition = spectral_decomposition(sigma,k) # Unload the output and transform list elements as matrices lambda = matrix(unlist(output_spectral_decomposition[1]),ncol = k,byrow = 1) p = matrix(unlist(output_spectral_decomposition[2]),ncol = k,byrow = 1) ### Equation (2.4) SIGMA1 decomposition (SIGMA1 = P1 LAMBDA1 P1') # Same procedure for the covariance matrix named SIGMA1 sigma1 = matrix(ncol = k, nrow = k) if (option2 == 0) { sigma1 = classic_covariance_matrix(x1) }else { sigma1 = cov.shrink(x1) } output_spectral_decomposition1 = spectral_decomposition(sigma1,k) lambda1 = matrix(unlist(output_spectral_decomposition1[1]),ncol = k,byrow = 1) p1 = matrix(unlist(output_spectral_decomposition1[2]),ncol = k,byrow = 1) ### Equation (2.5) computing lambda~ # Compute the covariance matrix named SIGMA2 sigma2 = matrix(ncol = k, nrow = k) if (option1 == 0) { sigma2 = classic_covariance_matrix(x2) }else { sigma2 = classic_covariance_matrix(x2,x) } # Compute lambda~ lambda_tilde = diag( t(p1) %*% sigma2 %*% p1 )*identity_matrix(k) # Choice of the eigenvectors to be used in Equation (2.6) sigma3 = matrix(ncol = k, nrow = k) P = matrix(ncol = k, nrow = k) if (option3 == 0) { P=p }else if (option3 == 1) { P=p1 }else if (option3 == 2) { output_spectral_decomposition2 = spectral_decomposition(sigma2,k) lambda2 = matrix(unlist(output_spectral_decomposition2[1]),ncol = k,byrow = 1) p2 = matrix(unlist(output_spectral_decomposition2[2]),ncol = k,byrow = 1) P = p2 }else if (option3 == 3) { sigma3 = cov.shrink(x) output_spectral_decomposition3 = spectral_decomposition(sigma3,k) lambda3 = matrix(unlist(output_spectral_decomposition3[1]),ncol = k,byrow = 1) p3 = matrix(unlist(output_spectral_decomposition3[2]),ncol = k,byrow = 1) P = p3 } ### Equation (2.6) computing the new estimator SIGMA~ sigma_tilde = P %*% lambda_tilde %*% t(P) return(sigma_tilde) } ##### GENERALIZED ESTIMATOR # Equation (2.15) estimator_generalized <- function(x,m,number_of_samples,option1,option2,option3) { # For parallel computation exporting source("compute_matrices.R") source("abadir.R") # Compute the average of s samples rand = sapply(1:number_of_samples, function(i) sample(dim(x)[1],replace = 0)) # Non-repeated random samplings of rows # Bootstrapped Abadir's estimator sampled_estimators = lapply(1:number_of_samples, function(i) estimator(x[rand[,i],], m, option1,option2,option3) ) samples_sum = Reduce("+",sampled_estimators) generalized_estimator = (1/number_of_samples) * samples_sum # Average computation return(generalized_estimator) } ##### GENERALIZED ESTIMATOR OVER MULTIPLE M's # Equation (3.1) estimator_generalized_m_averaged <- function(x,m_s,number_of_samples,option1,option2,option3) { generalized_estimators = lapply(1:length(m_s), function(i) estimator_generalized(x,m_s[i],number_of_samples,option1,option2,option3)) generalized_estimator_m_sum = Reduce("+",generalized_estimators) generalized_estimator_m_averaged = (1/length(m_s)) * generalized_estimator_m_sum # Average computation return(generalized_estimator_m_averaged) } ##### GENERALIZED ESTIMATOR OVER MULTIPLE M's, USING PARALLEL COMPUTING # Equation (3.1) estimator_generalized_m_averaged_par <- function(x,m_s,number_of_samples,option1,option2,option3) { f <- function(i) { m=m_s[i] estimator_generalized(x,m,number_of_samples,option1,option2,option3) } # Parallel computing cl <- makePSOCKcluster(detectCores()-1) export_list = list("x","m_s","number_of_samples","option1","option2","option3","estimator_generalized") cluster_export(cl,export_list,environment()) output_estimators = parLapply(cl, 1:length(m_s), f) stopCluster(cl) # Bootstrapped generalized estimator generalized_estimator_m_sum = Reduce("+",output_estimators) generalized_estimator_m_averaged = (1/length(m_s)) * generalized_estimator_m_sum # Average computation return(generalized_estimator_m_averaged) } ##### BOOTSTRAPPED MATRICES bootstrap <- function(x,m,number_of_bootstraps,benchmark,option1,option2,option3) { n = dim(x)[1] k = dim(x)[2] m = round(m) rand = sapply(1:number_of_bootstraps, function(i) round(runif(n,1,n))) # Repeated random samplings of rows classical_covariance = ones_matrix(k) # Empty data container bootstraps_cov = list() # Empty data container if (missing(benchmark)) { # Bootstrapped classical covariance matrix bootstraps_cov = lapply(1:number_of_bootstraps, function(i) classic_covariance_matrix(x[rand[,i],])) bootstraps_sum = Reduce("+",bootstraps_cov) classical_covariance = ( n/ ((n-1)*number_of_bootstraps) ) * bootstraps_sum # Average computation }else {classical_covariance=benchmark} # Bootstrapped Abadir's estimator bootstraps_estimator = lapply(1:number_of_bootstraps, function(i) estimator(x[rand[,i],], m, option1,option2,option3) ) bootstraps_sum = Reduce("+",bootstraps_estimator) generalized_estimator = (1/number_of_bootstraps) * bootstraps_sum # Average computation # Errors differences = lapply(1:number_of_bootstraps, function(i) classical_covariance - bootstraps_estimator[[i]]) norms_l1 = sapply(1:number_of_bootstraps, function(i) vech_norm(differences[[i]], 1) ) norms_l2 = sapply(1:number_of_bootstraps, function(i) vech_norm(differences[[i]], 2) ) return( list( classical_covariance, generalized_estimator, mean(norms_l1), mean(norms_l2), bootstraps_cov, bootstraps_estimator, rand ) ) } ##### BOOTSTRAPPED MATRICES (COVARIANCE AND CORRELATION) bootstrap_both <- function(x,m,number_of_bootstraps,benchmark,option1,option2,option3) { n = dim(x)[1] k = dim(x)[2] m = round(m) # Because resampling with repetition can cause covariance matrices to be singular (2 rows can be the same), # We bootstrap a correlation matrix every average of 3 covariance matrices j = max( floor(number_of_bootstraps/3) ,1) # Number of correlation matrices # Get the bootstrap of the covariances bootstrapping_cov = bootstrap(x,m,number_of_bootstraps,benchmark,option1,option2,option3) classical_covariance = bootstrapping_cov[1] generalized_estimator = bootstrapping_cov[2] norm_l1_cov = bootstrapping_cov[3] norm_l2_cov = bootstrapping_cov[4] rand = matrix(unlist( bootstrapping_cov[7] ),byrow = 1, ncol = number_of_bootstraps) temp_estimators = bootstrapping_cov[6] if (missing(benchmark)) { temp_covariances = bootstrapping_cov[5] # Bootstrapped classical correlation temp_cov_averages = lapply( 0:(j-1), function(i) ( temp_covariances[[1]][[(1+i*3)]]/3 + temp_covariances[[1]][[(2+i*3)]]/3 + temp_covariances[[1]][[(3+i*3)]]/3) ) bootstraps = lapply( 1:j, function(i) correlation_matrix(temp_cov_averages[[i]])) bootstraps_sum = Reduce("+",bootstraps) classical_correlation = ( n/ (n*j) ) * bootstraps_sum # Average computation }else{classical_correlation = correlation_matrix(benchmark)} # Bootstrapped Abadir's estimator correlation temp_corr_averages = lapply( 0:(j-1), function(i) ( temp_estimators[[1]][[(1+i*3)]]/3 + temp_estimators[[1]][[(2+i*3)]]/3 + temp_estimators[[1]][[(3+i*3)]]/3) ) bootstraps = lapply( 1:j, function(i) correlation_matrix(temp_corr_averages[[i]])) bootstraps_sum = Reduce("+",bootstraps) generalized_correlation = ( n/ (n*j) ) * bootstraps_sum # Average computation # Errors differences = lapply( 1:j, function(i) classical_correlation - bootstraps[[i]]) norms_l1_corr = sapply( 1:j, function(i) vech_norm(differences[[i]], 1) ) norms_l2_corr = sapply( 1:j, function(i) vech_norm(differences[[i]], 2) ) return( list( classical_covariance, generalized_estimator, norm_l1_cov, norm_l2_cov, classical_correlation, generalized_correlation, mean(norms_l1_corr), mean(norms_l2_corr) ) ) } ##### BOOTSTRAPPED MATRICES, USING PARALLEL COMPUTING bootstrap_par <- function(x,m,number_of_bootstraps,benchmark,option1,option2,option3) { n = dim(x)[1] k = dim(x)[2] m = round(m) rand = sapply(1:number_of_bootstraps, function(i) round(runif(n,1,n))) # Repeated random samplings of rows classical_covariance = ones_matrix(k) # Empty data container bootstraps_cov = list() # Empty data container if (missing(benchmark)) { # Bootstrapped classical covariance matrix bootstraps_cov = lapply(1:number_of_bootstraps, function(i) classic_covariance_matrix(x[rand[,i],])) bootstraps_sum = Reduce("+",bootstraps_cov) classical_covariance = ( n/ ((n-1)*number_of_bootstraps) ) * bootstraps_sum # Average computation }else {classical_covariance=benchmark} f <- function(i) { estimator(x[rand[,i],], m, option1,option2,option3) } # Parallel computing cl <- makePSOCKcluster(detectCores()-1) export_list = list("x","m","number_of_bootstraps","benchmark","option1","option2","option3","estimator") cluster_export(cl,export_list,environment()) bootstraps_estimator = parLapply(cl, 1:number_of_bootstraps, f) stopCluster(cl) # Bootstrapped estimator bootstrapped_estimator_sum = Reduce("+",bootstraps_estimator) bootstrapped_estimator_averaged = (1/number_of_bootstraps) * bootstrapped_estimator_sum # Average computation return( bootstrapped_estimator_averaged ) } ##### OPTIMAL m based on the errors from the covariance matrix from Abadir estimator # Return a list containing ( optimal m, vector of errors for each m used ) find_optimal_m_cov <- function(x,m_s,number_of_bootstraps,option1,option2,option3) { errors = lapply(m_s, function(m_s) bootstrap(x,m_s,number_of_bootstraps,option1,option2,option3)[3] ) errors = unlist(errors) names(errors) = m_s # Since the single lowest error of all the set could be due to chance and be surrounded by significantly higher values, # I Compute a rolling average of 4 observations in order to identify clusters of low errors (regions of mimima) optimal_m = unlist(cluster_minimum(errors, 4)[1]) return( list( optimal_m, errors ) ) } ##### OPTIMAL m based on the errors from the correlation matrix based on the covariance matrix from Abadir estimator # Return a list containing ( optimal m, vector of errors for each m used ) find_optimal_m_corr <- function(x,m_s,number_of_bootstraps,option1,option2,option3) { errors = lapply(m_s, function(m_s) bootstrap_both(x,m_s,number_of_bootstraps,option1,option2,option3)[7] ) errors = unlist(errors) names(errors) = m_s # Since the single lowest error of all the set could be due to chance and be surrounded by significantly higher values, # I Compute a rolling average of 4 observations in order to identify clusters of low errors (regions of mimima) optimal_m = unlist(cluster_minimum(errors, 4)[1]) return( list( optimal_m, errors ) ) } ##### OPTIMAL m based on the errors from both (from the correlation matrix based on the covariance matrix from Abadir estimator) # Return a list containing ( optimal m, vector of errors for each m used ) find_optimal_m_both <- function(x,m_s,number_of_bootstraps,benchmark,option1,option2,option3) { # In order for the parallelization of the computations to work, we need to provide all the files to load to execute the code # And this even if we put it in the main. header=source("header.R") output_bootstrapping = list() # Empty data container if (missing(benchmark)) { output_bootstrapping = lapply(m_s, function(m_s) bootstrap_both(x,m_s,number_of_bootstraps,option1,option2,option3) ) }else { output_bootstrapping = lapply(m_s, function(m_s) bootstrap_both(x,m_s,number_of_bootstraps,benchmark,option1,option2,option3) ) } errors_cov = sapply(1:length(m_s), function(i) unlist(output_bootstrapping[[i]][[3]]) ) names(errors_cov) = m_s errors_corr = sapply(1:length(m_s), function(i) unlist(output_bootstrapping[[i]][[7]]) ) names(errors_corr) = m_s # Standardize them to their lowest error standardized_errors_cov = errors_cov/min(errors_cov)-1 standardized_errors_corr = errors_corr/min(errors_corr)-1 # Create an index to minimize (simply an average of their standardized errors) errors_both = (standardized_errors_cov + standardized_errors_corr)/2 # Since the single lowest error of all the set could be due to chance and be surrounded by significantly higher values, # I Compute a rolling average of 4 observations in order to identify clusters of low errors (regions of mimima) optimal_m = unlist(cluster_minimum(errors_both, 4)[1]) return( list(optimal_m, errors_both, errors_cov, errors_corr ) ) }
context("Authentication") test_that("On package load, the session_store exists", { expect_true(is.environment(session_store)) }) test_that("login checks for email and password before POSTing", { expect_error(crunchAuth(email=NULL), "Must supply the email address associated with your crunch.io account") expect_error(crunchAuth(email=1L, password=NULL), "Must supply a password") }) with_mock_HTTP({ test_that("Jupyter helper sets up env", { with(reset.option("httr_config"), { jupyterLogin("test_token") cfg <- getOption("httr_config") expect_identical(cfg$options$cookie, "token=test_token") expect_true(grepl("jupyter.crunch.io", cfg$headers[["user-agent"]])) expect_true(grepl("rcrunch", cfg$headers[["user-agent"]])) }) }) }) if (run.integration.tests) { test_that("login works if crunch is running", { deleteSessionInfo() suppressMessages(login()) expect_true("root" %in% ls(envir=session_store)) expect_true(is.authenticated()) logout() expect_false(is.authenticated()) }) test_that("crunchAuth succeeds when it should and not when it shouldn't", { logout() em <- getOption("crunch.email") pw <- getOption("crunch.pw") expect_true(is.character(em)) expect_true(is.character(pw)) expect_true(is.list(crunchAuth(em, password=pw))) suppressMessages(login()) logout() expect_error(crunchAuth("lkjasdfksdfkjhl", password="w23nrnsod"), "Unable to authenticate lkjasdfksdfkjhl") }) test_that("session URLs can be retrieved", { suppressMessages(login()) expect_true(is.character(sessionURL("datasets"))) logout() expect_error(sessionURL("datasets"), "You must authenticate before making this request") }) test_that("login returns a session object", { cr <- suppressMessages(login()) expect_true(is.list(cr)) logout() expect_error(sessionURL("datasets"), "You must authenticate before making this request") }) }
/crunch/tests/testthat/test-auth.R
no_license
ingted/R-Examples
R
false
false
2,197
r
context("Authentication") test_that("On package load, the session_store exists", { expect_true(is.environment(session_store)) }) test_that("login checks for email and password before POSTing", { expect_error(crunchAuth(email=NULL), "Must supply the email address associated with your crunch.io account") expect_error(crunchAuth(email=1L, password=NULL), "Must supply a password") }) with_mock_HTTP({ test_that("Jupyter helper sets up env", { with(reset.option("httr_config"), { jupyterLogin("test_token") cfg <- getOption("httr_config") expect_identical(cfg$options$cookie, "token=test_token") expect_true(grepl("jupyter.crunch.io", cfg$headers[["user-agent"]])) expect_true(grepl("rcrunch", cfg$headers[["user-agent"]])) }) }) }) if (run.integration.tests) { test_that("login works if crunch is running", { deleteSessionInfo() suppressMessages(login()) expect_true("root" %in% ls(envir=session_store)) expect_true(is.authenticated()) logout() expect_false(is.authenticated()) }) test_that("crunchAuth succeeds when it should and not when it shouldn't", { logout() em <- getOption("crunch.email") pw <- getOption("crunch.pw") expect_true(is.character(em)) expect_true(is.character(pw)) expect_true(is.list(crunchAuth(em, password=pw))) suppressMessages(login()) logout() expect_error(crunchAuth("lkjasdfksdfkjhl", password="w23nrnsod"), "Unable to authenticate lkjasdfksdfkjhl") }) test_that("session URLs can be retrieved", { suppressMessages(login()) expect_true(is.character(sessionURL("datasets"))) logout() expect_error(sessionURL("datasets"), "You must authenticate before making this request") }) test_that("login returns a session object", { cr <- suppressMessages(login()) expect_true(is.list(cr)) logout() expect_error(sessionURL("datasets"), "You must authenticate before making this request") }) }
#### Downloading, inspecting, and parsing data from TCGA #### # BRCA is breast cancer data ## install TCGA bioconductor tools # identify location for Bioconductor tools #source("https://bioconductor.org/biocLite.R") # install Bioconductor tools #biocLite("TCGAbiolinks") #biocLite("SummarizedExperiment") #biocLite("maftools") # load Bioconductor tools library(TCGAbiolinks) library(SummarizedExperiment) library(maftools) # install packages from CRAN #install.packages("dplyr") # load packages from CRAN library(dplyr) #### Set up project #### # create directory structure dir.create("data") dir.create("figures") #### Identify TCGA data available #### # show all available projects getGDCprojects()$project_id # view data available for breast cancer (TCGA-BRCA) TCGAbiolinks:::getProjectSummary("TCGA-BRCA") #### Clinical data #### # download and read clinical data for breast cancer into R clinical <- GDCquery_clinic(project = "TCGA-BRCA", type = "clinical") # write data to file write.table(clinical, "data/clinicalBRCA.csv") # inspecting variables of interest str(clinical) # 1097 total records table(clinical$race) table(clinical$vital_status) table(clinical$morphology) clinical$days_to_death clinical$bcr_patient_barcode # patient ID #### Gene expression (transcriptome) data #### # identify desired data query_fpkm <- GDCquery(project = "TCGA-BRCA", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "HTSeq - FPKM-UQ") # download data # downloads query data into GDCdata/ # data files are rather large; this step takes awhile! GDCdownload(query_fpkm) # read downloaded data into R fpkm <- GDCprepare(query_fpkm) # the commands above may create the following supplemental files: # Human_genes_GRCh38_p10.rda # MANIFEST.txt # These files can be moved to GDCdata/ # save imported object to file save(fpkm, file="GDCdata/geneExpressionBRCA.RData") # load saved data load("GDCdata/geneExpressionBRCA.RData") # inspect structure and features of object assayNames(fpkm) head(assay(fpkm), 1) colSums(assay(fpkm)) rowRanges(fpkm) colData(fpkm) # metadata colnames(colData(fpkm)) # just metadata column names # show gene names rowRanges(fpkm)$external_gene_name # extract genes of interest # create object of ensembl_gene_id and external_gene_name genes <-rowData(fpkm) # find BRCA1 and BRCA2 brca1 <- grep("brca", genes$external_gene_name, ignore.case = TRUE) genes[brca1, ] # BRCA1 ENSG00000012048 # BRCA2 ENSG00000139618 ## assemble dataset for genes of interest and metadata fpkmDat <- as.data.frame(t(assays(fpkm)[[1]])) # extract expression data colnames(fpkmDat) # print gene names rownames(fpkmDat) # show sample names # extract gene data for target genes fpkmGene <- fpkmDat %>% select(ENSG00000012048, ENSG00000139618) # extract metadata metaDat <-as.data.frame(colData(fpkm)) # bind metadata to gene expression data fpkmGene <- cbind(fpkmGene, metaDat) # create object of gene names in order geneNames <- c("BRCA1", "BRCA2") # create object of metadata names metaNames <- colnames(colData(fpkm)) # replace column names colnames(fpkmGene) <- c(geneNames, metaNames) ## clean data # remove troublesome metadata fpkmGene <- select(fpkmGene, -treatments) # save aggregated data to file write.table(fpkmGene, "data/targetGeneBRCA.csv") #### Simple Nucelotide Variation #### #https://bioconductor.org/packages/devel/bioc/vignettes/TCGAbiolinks/inst/doc/tcgaBiolinks.html # download somatic mutations as maf files (save as csv) query_maf_muse <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "muse") query_maf_varscan2 <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "varscan2") query_maf_somaticsniper <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "somaticsniper") query_maf_mutect2 <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "mutect2") # create maf object (without clinical data) maf_muse <- read.maf(query_maf_muse, useAll = FALSE) # visual summary of data plotmafSummary(maf = maf_muse, rmOutlier = TRUE, addStat = 'median', dashboard = TRUE) # draw oncoplot oncoplot(maf = maf_muse, top = 10, removeNonMutated = TRUE) # assess transitions and transversions maf_titv <- titv(maf = maf_muse, plot = FALSE, useSyn = TRUE) # plot transitions and transversions plotTiTv(res = maf_titv) # extract barcodes from maf query barcodes <- sort(query_maf$Tumor_Sample_Barcode) %>% unique str_trunc(barcodes, 12, side = "right", ellipsis = "") # extract barcodes from clinical data sub_id <- sort(clinical$submitter_id) %>% unique() clinical <- rename(clinical, Tumor_Sample_Barcode = submitter_id) # download all snp data (including germline) query_snp <- GDCquery(project = "TCGA-BRCA", data.category = "Simple Nucleotide Variation") # create maf object with clinical data attached maf <- read.maf(query_maf, clinicalData = clinical, useAll = FALSE)
/BRCA_expression_data.R
no_license
shahaozi77/cancer_genomics
R
false
false
4,956
r
#### Downloading, inspecting, and parsing data from TCGA #### # BRCA is breast cancer data ## install TCGA bioconductor tools # identify location for Bioconductor tools #source("https://bioconductor.org/biocLite.R") # install Bioconductor tools #biocLite("TCGAbiolinks") #biocLite("SummarizedExperiment") #biocLite("maftools") # load Bioconductor tools library(TCGAbiolinks) library(SummarizedExperiment) library(maftools) # install packages from CRAN #install.packages("dplyr") # load packages from CRAN library(dplyr) #### Set up project #### # create directory structure dir.create("data") dir.create("figures") #### Identify TCGA data available #### # show all available projects getGDCprojects()$project_id # view data available for breast cancer (TCGA-BRCA) TCGAbiolinks:::getProjectSummary("TCGA-BRCA") #### Clinical data #### # download and read clinical data for breast cancer into R clinical <- GDCquery_clinic(project = "TCGA-BRCA", type = "clinical") # write data to file write.table(clinical, "data/clinicalBRCA.csv") # inspecting variables of interest str(clinical) # 1097 total records table(clinical$race) table(clinical$vital_status) table(clinical$morphology) clinical$days_to_death clinical$bcr_patient_barcode # patient ID #### Gene expression (transcriptome) data #### # identify desired data query_fpkm <- GDCquery(project = "TCGA-BRCA", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "HTSeq - FPKM-UQ") # download data # downloads query data into GDCdata/ # data files are rather large; this step takes awhile! GDCdownload(query_fpkm) # read downloaded data into R fpkm <- GDCprepare(query_fpkm) # the commands above may create the following supplemental files: # Human_genes_GRCh38_p10.rda # MANIFEST.txt # These files can be moved to GDCdata/ # save imported object to file save(fpkm, file="GDCdata/geneExpressionBRCA.RData") # load saved data load("GDCdata/geneExpressionBRCA.RData") # inspect structure and features of object assayNames(fpkm) head(assay(fpkm), 1) colSums(assay(fpkm)) rowRanges(fpkm) colData(fpkm) # metadata colnames(colData(fpkm)) # just metadata column names # show gene names rowRanges(fpkm)$external_gene_name # extract genes of interest # create object of ensembl_gene_id and external_gene_name genes <-rowData(fpkm) # find BRCA1 and BRCA2 brca1 <- grep("brca", genes$external_gene_name, ignore.case = TRUE) genes[brca1, ] # BRCA1 ENSG00000012048 # BRCA2 ENSG00000139618 ## assemble dataset for genes of interest and metadata fpkmDat <- as.data.frame(t(assays(fpkm)[[1]])) # extract expression data colnames(fpkmDat) # print gene names rownames(fpkmDat) # show sample names # extract gene data for target genes fpkmGene <- fpkmDat %>% select(ENSG00000012048, ENSG00000139618) # extract metadata metaDat <-as.data.frame(colData(fpkm)) # bind metadata to gene expression data fpkmGene <- cbind(fpkmGene, metaDat) # create object of gene names in order geneNames <- c("BRCA1", "BRCA2") # create object of metadata names metaNames <- colnames(colData(fpkm)) # replace column names colnames(fpkmGene) <- c(geneNames, metaNames) ## clean data # remove troublesome metadata fpkmGene <- select(fpkmGene, -treatments) # save aggregated data to file write.table(fpkmGene, "data/targetGeneBRCA.csv") #### Simple Nucelotide Variation #### #https://bioconductor.org/packages/devel/bioc/vignettes/TCGAbiolinks/inst/doc/tcgaBiolinks.html # download somatic mutations as maf files (save as csv) query_maf_muse <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "muse") query_maf_varscan2 <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "varscan2") query_maf_somaticsniper <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "somaticsniper") query_maf_mutect2 <- GDCquery_Maf("BRCA", save.csv =TRUE, pipelines = "mutect2") # create maf object (without clinical data) maf_muse <- read.maf(query_maf_muse, useAll = FALSE) # visual summary of data plotmafSummary(maf = maf_muse, rmOutlier = TRUE, addStat = 'median', dashboard = TRUE) # draw oncoplot oncoplot(maf = maf_muse, top = 10, removeNonMutated = TRUE) # assess transitions and transversions maf_titv <- titv(maf = maf_muse, plot = FALSE, useSyn = TRUE) # plot transitions and transversions plotTiTv(res = maf_titv) # extract barcodes from maf query barcodes <- sort(query_maf$Tumor_Sample_Barcode) %>% unique str_trunc(barcodes, 12, side = "right", ellipsis = "") # extract barcodes from clinical data sub_id <- sort(clinical$submitter_id) %>% unique() clinical <- rename(clinical, Tumor_Sample_Barcode = submitter_id) # download all snp data (including germline) query_snp <- GDCquery(project = "TCGA-BRCA", data.category = "Simple Nucleotide Variation") # create maf object with clinical data attached maf <- read.maf(query_maf, clinicalData = clinical, useAll = FALSE)
library(lubridate) mydata <- read.csv("Data Analysis Project/household_power_consumption.txt", header = TRUE,sep = ";") mydata$Date <- as.character(mydata$Date) reqdata <- subset(mydata, (Date=="1/2/2007" | Date=="2/2/2007")) reqdata$Date <- dmy(reqdata$Date) reqdata$Global_active_power <- as.character(reqdata$Global_active_power) reqdata$Global_active_power <- as.numeric(reqdata$Global_active_power) png(filename = "Plot1.png",width = 480,height = 480) hist(reqdata$Global_active_power, col = "red", xlab = "Global Active Power (kilowatts)", main = "Global Active Power") dev.off()
/Plot1.R
no_license
Ma-Salah/ExData_Plotting1
R
false
false
594
r
library(lubridate) mydata <- read.csv("Data Analysis Project/household_power_consumption.txt", header = TRUE,sep = ";") mydata$Date <- as.character(mydata$Date) reqdata <- subset(mydata, (Date=="1/2/2007" | Date=="2/2/2007")) reqdata$Date <- dmy(reqdata$Date) reqdata$Global_active_power <- as.character(reqdata$Global_active_power) reqdata$Global_active_power <- as.numeric(reqdata$Global_active_power) png(filename = "Plot1.png",width = 480,height = 480) hist(reqdata$Global_active_power, col = "red", xlab = "Global Active Power (kilowatts)", main = "Global Active Power") dev.off()
# ========================================================================== # The master file replicates the simulation results in # "Two examples of convex-programming-based high-dimensional # econometric estimators" by Zhan Gao and Zhentao Shi # ========================================================================== # ========================================================================== # Replication of Table 1: CLasso Results # ========================================================================== # CAVEAT: As mentioned in the paper, solvers other than Rmosek are very slow # running. It is recommended to try a small scale experiment and try # each case separately. # To Replicate the results in Table 1 with only Rmosek # The results are in "PLS_Result_rep.csv" source("./CLasso/master_rep.R") # Generate data explicitly since we need to compare across platforms # (R v.s Matlab) # source("./CLasso/data_gen.R") # For the comparison among all methods, we provide a small scale sample # (30 replications) # To generate the full 500 replication data, uncomment the data_gen.R line # and generate data explicitly first, and then change the # "./CLasso/master_comparison.R" and "./CLasso/master_cvx.m" by change # the variable Rep from 30 to 500 # The CVX results are generated in Matlab: Run "./CLasso/master_cvx.m" in Matlab # The results are stored in "CVX_PLS_Result.csv" # For comparison results # The results are saved in "PLS_Result_comparison.csv" source("./CLasso/master_comparison.R") # ========================================================================== # Replication of Table 2: REL Results # ========================================================================== # The bias and RMSE by Rmosek documented in Table 2 (left panel) are stored # in "REL_Result_Rep.csv" # The workplace is saved in "REL_Result_Rep.RData" source("./REL/master_rep.R") # ========================================================================== # Replication of Table 3: REL inner-loop time comparison # ========================================================================== # Time documented in Table 3 is stored in "REL_time_compare_R.csv" # The workplace is saved in "REL_Compare_Result.RData" # The CVX results are generated in Matlab: Run "./REL/master_cvx.m" in Matlab source("./REL/master_compare.R")
/master.R
no_license
imfacrc/convex_prog_in_econometrics
R
false
false
2,361
r
# ========================================================================== # The master file replicates the simulation results in # "Two examples of convex-programming-based high-dimensional # econometric estimators" by Zhan Gao and Zhentao Shi # ========================================================================== # ========================================================================== # Replication of Table 1: CLasso Results # ========================================================================== # CAVEAT: As mentioned in the paper, solvers other than Rmosek are very slow # running. It is recommended to try a small scale experiment and try # each case separately. # To Replicate the results in Table 1 with only Rmosek # The results are in "PLS_Result_rep.csv" source("./CLasso/master_rep.R") # Generate data explicitly since we need to compare across platforms # (R v.s Matlab) # source("./CLasso/data_gen.R") # For the comparison among all methods, we provide a small scale sample # (30 replications) # To generate the full 500 replication data, uncomment the data_gen.R line # and generate data explicitly first, and then change the # "./CLasso/master_comparison.R" and "./CLasso/master_cvx.m" by change # the variable Rep from 30 to 500 # The CVX results are generated in Matlab: Run "./CLasso/master_cvx.m" in Matlab # The results are stored in "CVX_PLS_Result.csv" # For comparison results # The results are saved in "PLS_Result_comparison.csv" source("./CLasso/master_comparison.R") # ========================================================================== # Replication of Table 2: REL Results # ========================================================================== # The bias and RMSE by Rmosek documented in Table 2 (left panel) are stored # in "REL_Result_Rep.csv" # The workplace is saved in "REL_Result_Rep.RData" source("./REL/master_rep.R") # ========================================================================== # Replication of Table 3: REL inner-loop time comparison # ========================================================================== # Time documented in Table 3 is stored in "REL_time_compare_R.csv" # The workplace is saved in "REL_Compare_Result.RData" # The CVX results are generated in Matlab: Run "./REL/master_cvx.m" in Matlab source("./REL/master_compare.R")
### Age biases in SNVs setwd("/Users/kasitchatsirisupachai/Desktop/Age_differences_cancer/") library(broom) ### read data clinical <- read.csv("Data/all_clin_XML.csv") projects <- unique(as.character(clinical$cancer_type)) # keep only projects that have > 100 samples projects <- projects[!(projects %in% c("ACC", "CHOL", "DLBC", "KICH", "LAML", "MESO", "THYM", "UCS", "UVM"))] ################################################################################################### ### Logistic regression to test whether age associates with increased/decreased possibility of a gene to be mutated # clean id function clean_id <- function(id){ tmp <- gsub(pattern = "[.]", replacement = "-", id) tmp <- unlist(strsplit(tmp, split = "-"))[1:3] return(paste0(tmp, collapse = "-")) } # function to test association between age and mutation test_age_mut_gene <- function(gene, project, mut_df, clinical){ # get value for gene of interest values_gene <- mut_df[gene] values_gene$patient <- rownames(values_gene) rownames(values_gene) <- NULL colnames(values_gene) <- c("mut", "patient") # merge with age data df <- merge(values_gene, clinical, by.x = "patient", by.y = "patient") # logistic regression logit_fit <- glm(mut ~ age , data = df, family = "binomial") summary(logit_fit) p.value <- formatC(as.numeric(summary(logit_fit)$coefficients[,4][2]), format = "e", digits = 2) coeff <- summary(logit_fit)$coefficients[,1][2] std.error <- summary(logit_fit)$coefficients[,2][2] Z <- summary(logit_fit)$coefficients[,3][2] result <- tidy(logit_fit) CI <- confint.default(logit_fit, level = 0.95) result <- cbind(as.data.frame(result), CI) result <- result[,c("term", "estimate", "std.error", "statistic", "2.5 %", "97.5 %", "p.value")] colnames(result) <- c("term", "estimate", "std.error", "statistic", "conf.low", "conf.high", "p.value") result$odds <- exp(result$estimate) result$odds_conf.low <- exp(result$conf.low) result$odds_conf.high <- exp(result$conf.high) result <- result[,c("term", "estimate", "std.error", "conf.low", "conf.high", "statistic", "odds", "odds_conf.low", "odds_conf.high", "p.value")] result_df <- as.data.frame(result[result$term == "age",]) result_df$term <- gene colnames(result_df) <- c("gene", "estimate", "std.error", "conf.low", "conf.high", "statistic", "odds", "odds_conf.low", "odds_conf.high", "p.value") return(result_df) } # function to test mutation and age for each cancer type age_mut <- function(project, clinical){ print(paste("Start working: ", project)) ### read gene-sample mutation table if(project %in% c("COAD", "READ", "STAD", "UCEC")){ mut_df <- read.csv(paste0("Analysis_results/Mutations/1_table_mutations_samples/", project, "_mutations_filter_hypermutated_and_MSI-H.csv", collapse = "")) } else { mut_df <- read.csv(paste0("Analysis_results/Mutations/1_table_mutations_samples/", project, "_mutations_filter_hypermutated.csv", collapse = "")) } row.names(mut_df) <- mut_df$X mut_df$X <- NULL genes <- colnames(mut_df) print(paste0(project, ": ", nrow(mut_df))) # print num samples tmp <- do.call(rbind,lapply(genes, test_age_mut_gene, project = project, mut_df = mut_df, clinical = clinical)) rownames(tmp) <- NULL tmp$p.value <- as.numeric(as.character(tmp$p.value)) tmp$q.value <- p.adjust(tmp$p.value, method = "BH") tmp$Sig <- ifelse(tmp$q.value < 0.05, TRUE, FALSE) write.csv(tmp, paste0("Analysis_results/Mutations/2_Univariate_age_SNVs/",project, "_univariate_age_mutations_new.csv", collapse = ""), row.names = FALSE) return(tmp) } results <- lapply(projects, age_mut, clinical = clinical) names(results) <- projects results_df <- do.call(rbind, results) results_df$cancer_type <- row.names(results_df) row.names(results_df) <- NULL # clean cancer type cancer_types <- results_df$cancer_type clean_type <- function(cancer_type){ return(unlist(strsplit(cancer_type, split = "[.]"))[1]) } results_df$cancer_type <- unlist(lapply(cancer_types, clean_type)) results_df <- results_df[,c("cancer_type", "gene", "estimate", "std.error", "conf.low", "conf.high", "statistic", "odds", "odds_conf.low", "odds_conf.high", "p.value", "q.value", "Sig")] write.csv(results_df, "Analysis_results/Mutations/Summary_age_SNVs_univariate_new.csv", row.names = FALSE)
/Scripts/4_SNVs/11_Age_SNVs_cancer_specific_simple.R
no_license
ALPH123/Age-associated_cancer_genome
R
false
false
4,459
r
### Age biases in SNVs setwd("/Users/kasitchatsirisupachai/Desktop/Age_differences_cancer/") library(broom) ### read data clinical <- read.csv("Data/all_clin_XML.csv") projects <- unique(as.character(clinical$cancer_type)) # keep only projects that have > 100 samples projects <- projects[!(projects %in% c("ACC", "CHOL", "DLBC", "KICH", "LAML", "MESO", "THYM", "UCS", "UVM"))] ################################################################################################### ### Logistic regression to test whether age associates with increased/decreased possibility of a gene to be mutated # clean id function clean_id <- function(id){ tmp <- gsub(pattern = "[.]", replacement = "-", id) tmp <- unlist(strsplit(tmp, split = "-"))[1:3] return(paste0(tmp, collapse = "-")) } # function to test association between age and mutation test_age_mut_gene <- function(gene, project, mut_df, clinical){ # get value for gene of interest values_gene <- mut_df[gene] values_gene$patient <- rownames(values_gene) rownames(values_gene) <- NULL colnames(values_gene) <- c("mut", "patient") # merge with age data df <- merge(values_gene, clinical, by.x = "patient", by.y = "patient") # logistic regression logit_fit <- glm(mut ~ age , data = df, family = "binomial") summary(logit_fit) p.value <- formatC(as.numeric(summary(logit_fit)$coefficients[,4][2]), format = "e", digits = 2) coeff <- summary(logit_fit)$coefficients[,1][2] std.error <- summary(logit_fit)$coefficients[,2][2] Z <- summary(logit_fit)$coefficients[,3][2] result <- tidy(logit_fit) CI <- confint.default(logit_fit, level = 0.95) result <- cbind(as.data.frame(result), CI) result <- result[,c("term", "estimate", "std.error", "statistic", "2.5 %", "97.5 %", "p.value")] colnames(result) <- c("term", "estimate", "std.error", "statistic", "conf.low", "conf.high", "p.value") result$odds <- exp(result$estimate) result$odds_conf.low <- exp(result$conf.low) result$odds_conf.high <- exp(result$conf.high) result <- result[,c("term", "estimate", "std.error", "conf.low", "conf.high", "statistic", "odds", "odds_conf.low", "odds_conf.high", "p.value")] result_df <- as.data.frame(result[result$term == "age",]) result_df$term <- gene colnames(result_df) <- c("gene", "estimate", "std.error", "conf.low", "conf.high", "statistic", "odds", "odds_conf.low", "odds_conf.high", "p.value") return(result_df) } # function to test mutation and age for each cancer type age_mut <- function(project, clinical){ print(paste("Start working: ", project)) ### read gene-sample mutation table if(project %in% c("COAD", "READ", "STAD", "UCEC")){ mut_df <- read.csv(paste0("Analysis_results/Mutations/1_table_mutations_samples/", project, "_mutations_filter_hypermutated_and_MSI-H.csv", collapse = "")) } else { mut_df <- read.csv(paste0("Analysis_results/Mutations/1_table_mutations_samples/", project, "_mutations_filter_hypermutated.csv", collapse = "")) } row.names(mut_df) <- mut_df$X mut_df$X <- NULL genes <- colnames(mut_df) print(paste0(project, ": ", nrow(mut_df))) # print num samples tmp <- do.call(rbind,lapply(genes, test_age_mut_gene, project = project, mut_df = mut_df, clinical = clinical)) rownames(tmp) <- NULL tmp$p.value <- as.numeric(as.character(tmp$p.value)) tmp$q.value <- p.adjust(tmp$p.value, method = "BH") tmp$Sig <- ifelse(tmp$q.value < 0.05, TRUE, FALSE) write.csv(tmp, paste0("Analysis_results/Mutations/2_Univariate_age_SNVs/",project, "_univariate_age_mutations_new.csv", collapse = ""), row.names = FALSE) return(tmp) } results <- lapply(projects, age_mut, clinical = clinical) names(results) <- projects results_df <- do.call(rbind, results) results_df$cancer_type <- row.names(results_df) row.names(results_df) <- NULL # clean cancer type cancer_types <- results_df$cancer_type clean_type <- function(cancer_type){ return(unlist(strsplit(cancer_type, split = "[.]"))[1]) } results_df$cancer_type <- unlist(lapply(cancer_types, clean_type)) results_df <- results_df[,c("cancer_type", "gene", "estimate", "std.error", "conf.low", "conf.high", "statistic", "odds", "odds_conf.low", "odds_conf.high", "p.value", "q.value", "Sig")] write.csv(results_df, "Analysis_results/Mutations/Summary_age_SNVs_univariate_new.csv", row.names = FALSE)
library(tm) library(caTools) library(rpart) library(rpart.plot) library(SnowballC) news = read.csv("NYTimesBlogTrain.csv", stringsAsFactors=F) news$PubDate = strptime(news$PubDate, "%Y-%m-%d %H:%M:%S") news$Weekday = news$PubDate$wday corpusControls = list(tolower=T, removePunctuation=T, stopwords=stopwords("english"), stemming=function(word) wordStem(word, language="english") ) # Headline corpusHeadline = Corpus(VectorSource(news$Headline)) dtmHeadline = DocumentTermMatrix(corpusHeadline, corpusControls) sparseHeadline = removeSparseTerms(dtmHeadline, 0.99) headline = as.data.frame(as.matrix(sparseHeadline)) colnames(headline) = make.names(colnames(headline)) # Snippet corpusSnippet= Corpus(VectorSource(news$Snippet)) dtmSnippet= DocumentTermMatrix(corpusSnippet, corpusControls) sparseSnippet= removeSparseTerms(dtmSnippet, 0.99) snippet = as.data.frame(as.matrix(sparseSnippet)) colnames(snippet) = make.names(colnames(snippet)) # Abstract corpusAbstract= Corpus(VectorSource(news$Abstract)) dtmAbstract= DocumentTermMatrix(corpusAbstract, corpusControls) sparseAbstract= removeSparseTerms(dtmAbstract, 0.99) abstract = as.data.frame(as.matrix(sparseAbstract)) colnames(abstract) = make.names(colnames(abstract)) headline$Popular = news$Popular headlinePopular = subset(headline, Popular==1) headlineUnpopular = subset(headline, Popular==0) sort(colSums(headlinePopular)) sort(colSums(headlineUnpopular)) # merge text variables # docs = cbind(headline, snippet, abstract) # # docs$Popular = news$Popular # docs$NewsDesk = news$NewsDesk # docs$SectionName = news$SectionName # docs$SubsectionName = news$SubsectionName # docs$Weekday = news$Weekday # # # exploratory data # names(docs) # docsPopular = subset(docs, Popular==1) # docsUnpopular = subset(docs, Popular==0) # # tail(sort(colSums(docsUnpopular[1:470])), 50) # tail(sort(colSums(docsPopular[1:470])), 50) # Set model spl = sample.split(docs$Popular, SplitRatio=0.7) train = subset(docs, spl==T) test = subset(docs, spl==F) # CART cart.mod = rpart(Popular ~., data=train) #cart.mod = rpart(Popular ~., data=train, method="class") prp(cart.mod)
/kaggle/2nd_try.R
no_license
sleeperbus/The_Analytic_Edge
R
false
false
2,205
r
library(tm) library(caTools) library(rpart) library(rpart.plot) library(SnowballC) news = read.csv("NYTimesBlogTrain.csv", stringsAsFactors=F) news$PubDate = strptime(news$PubDate, "%Y-%m-%d %H:%M:%S") news$Weekday = news$PubDate$wday corpusControls = list(tolower=T, removePunctuation=T, stopwords=stopwords("english"), stemming=function(word) wordStem(word, language="english") ) # Headline corpusHeadline = Corpus(VectorSource(news$Headline)) dtmHeadline = DocumentTermMatrix(corpusHeadline, corpusControls) sparseHeadline = removeSparseTerms(dtmHeadline, 0.99) headline = as.data.frame(as.matrix(sparseHeadline)) colnames(headline) = make.names(colnames(headline)) # Snippet corpusSnippet= Corpus(VectorSource(news$Snippet)) dtmSnippet= DocumentTermMatrix(corpusSnippet, corpusControls) sparseSnippet= removeSparseTerms(dtmSnippet, 0.99) snippet = as.data.frame(as.matrix(sparseSnippet)) colnames(snippet) = make.names(colnames(snippet)) # Abstract corpusAbstract= Corpus(VectorSource(news$Abstract)) dtmAbstract= DocumentTermMatrix(corpusAbstract, corpusControls) sparseAbstract= removeSparseTerms(dtmAbstract, 0.99) abstract = as.data.frame(as.matrix(sparseAbstract)) colnames(abstract) = make.names(colnames(abstract)) headline$Popular = news$Popular headlinePopular = subset(headline, Popular==1) headlineUnpopular = subset(headline, Popular==0) sort(colSums(headlinePopular)) sort(colSums(headlineUnpopular)) # merge text variables # docs = cbind(headline, snippet, abstract) # # docs$Popular = news$Popular # docs$NewsDesk = news$NewsDesk # docs$SectionName = news$SectionName # docs$SubsectionName = news$SubsectionName # docs$Weekday = news$Weekday # # # exploratory data # names(docs) # docsPopular = subset(docs, Popular==1) # docsUnpopular = subset(docs, Popular==0) # # tail(sort(colSums(docsUnpopular[1:470])), 50) # tail(sort(colSums(docsPopular[1:470])), 50) # Set model spl = sample.split(docs$Popular, SplitRatio=0.7) train = subset(docs, spl==T) test = subset(docs, spl==F) # CART cart.mod = rpart(Popular ~., data=train) #cart.mod = rpart(Popular ~., data=train, method="class") prp(cart.mod)
setwd("G:\\Education\\Amirkabir University\\Neural Network\\projects\\4\\data set") library(devtools) library(nnet) source("createsampledata.R") #source_url('https://gist.githubusercontent.com/fawda123/7471137/raw/466c1474d0a505ff044412703516c34f1a4684a5/nnet_plot_update.r') #source_url('https://gist.github.com/fawda123/7471137/raw/cd6e6a0b0bdb4e065c597e52165e5ac887f5fe95/nnet_plot_update.r') data_csv <- read.csv("coc81.csv") # net <- with(train1_data,nnet(formula=actual ~ time_factor+rely_factor+data_factor+cplx_factor+stor_factor+virt_factor+turn_factor+acap_factor+aexp_factor+pcap_factor+vexp_factor+lexp_factor+modp_factor+tool_factor+sced_factor+dev_mode_factor,size=23))#,x=loc,y=loc train_data <- create_train_data(data_csv) test_data <- create_test_data(data_csv) results <- matrix(ncol=6) applyNet <- function(train_data_item,i){ # estimated_values0 <- data.frame(dimnames = (list(c(),c("pr1","pr2","pr3","pr4","pr5"))), stringsAsFactors=F) estimated_values0 <- data.frame(pr1=character(),pr2=character(),pr3=character(),pr4=character(),pr5=character(), stringsAsFactors=F) # names(estimated_values0) <- c("pr1","pr2","pr3","pr4","pr5") estimated_values <- matrix(ncol=0,nrow=nrow(test_data[[i]])) estimated_values2 <- list() for(j in 1:5){ net <- nnet(formula=actual_log ~ time_factor+rely_factor+data_factor+ cplx_factor+stor_factor+virt_factor+turn_factor+ acap_factor+aexp_factor+pcap_factor+vexp_factor+ lexp_factor+modp_factor+tool_factor+sced_factor+ loc_log+dev_mode_factor,size=23, data = train_data_item, linout=T, maxit = 300,trace=F) # net <- nnet(formula=actual_log ~ time+rely+data+ # cplx+stor+virt+turn+ # acap+aexp+pcap+vexp+ # lexp+modp+tool+sced+ # loc_log+dev_mode,size=23, data = train1_data, linout=T)#,x=loc,y=loc # print(net) # print(i) # print("------------------------------------------") pr <- predict(net,test_data[i],type="raw") # print(nrow(pr)) # print(ncol(pr)) # print(test_data[i]) # print(i) # f <- test_data[[1]] # print(f) # print(test_data[[1]]$project_id) col_name <- paste("pr", j,sep="") # col_name2 <- paste("estimated2", j,sep="") # if(nrow(estimated_values) == 0) estimated_values <- data.frame(pr) # else estimated_values <- cbind(pr,estimated_values) # estimated_values0$"pr2" <- pr # results$ # rbind(estimated_values2, 10 ^ pr) # cbind(test_data[[i]],col_name) # cbind(test_data[[i]],col_name2) # test_data[[i]][,col_name] <- pr # test_data[[i]][,col_name2] <- 10 ^ pr # test_data[[i]]$col_name <- pr plot(pr, pch = 19) dir_name <- paste("figures\\",i,sep = "") if(!file.exists(dir_name)) dir.create(dir_name) plot_name <- paste(j, ".png") plot_name <- paste(dir_name,"\\", plot_name,sep = "") dev.copy(png,plot_name,width=480,height=480) dev.off() } # estimated_values0[,] <- estimated_values estimated_values <- cbind(estimated_values, test_data[[i]]$actual_log) # print(estimated_values) # print(results) # data.frame(estimated_values) # colnames(estimated_values) <- c("pr1","pr2","pr3","pr4","pr5","actual_log") # print(estimated_values) # results <<- estimated_values results <<- rbind(results,estimated_values) # estimated_values # test_data[[i]] <- c(test_data[i], estimated_values) # cbind(test_data[[i]], estimated_values) # print(nrow(results)) # if(nrow(results) == 0){ # print("e") # results <<- test_data[i] # rbind(test_data[i],results) # } # else{ # rbind(test_data[i],results) # } # cbind(test_data[[i]],estimated_values2) } x <- mapply(applyNet,train_data,seq_along(train_data),SIMPLIFY = F) results <- data.frame(results,row.names=NULL) colnames(results) <- c("pr1","pr2","pr3","pr4","pr5","actual_log") # print(x[1]) # df <- data.frame(x[1:3],stringsAsFactors = F)
/buildneuralnet__.R
no_license
jrihanna/NeuralNet_FinalProject
R
false
false
4,860
r
setwd("G:\\Education\\Amirkabir University\\Neural Network\\projects\\4\\data set") library(devtools) library(nnet) source("createsampledata.R") #source_url('https://gist.githubusercontent.com/fawda123/7471137/raw/466c1474d0a505ff044412703516c34f1a4684a5/nnet_plot_update.r') #source_url('https://gist.github.com/fawda123/7471137/raw/cd6e6a0b0bdb4e065c597e52165e5ac887f5fe95/nnet_plot_update.r') data_csv <- read.csv("coc81.csv") # net <- with(train1_data,nnet(formula=actual ~ time_factor+rely_factor+data_factor+cplx_factor+stor_factor+virt_factor+turn_factor+acap_factor+aexp_factor+pcap_factor+vexp_factor+lexp_factor+modp_factor+tool_factor+sced_factor+dev_mode_factor,size=23))#,x=loc,y=loc train_data <- create_train_data(data_csv) test_data <- create_test_data(data_csv) results <- matrix(ncol=6) applyNet <- function(train_data_item,i){ # estimated_values0 <- data.frame(dimnames = (list(c(),c("pr1","pr2","pr3","pr4","pr5"))), stringsAsFactors=F) estimated_values0 <- data.frame(pr1=character(),pr2=character(),pr3=character(),pr4=character(),pr5=character(), stringsAsFactors=F) # names(estimated_values0) <- c("pr1","pr2","pr3","pr4","pr5") estimated_values <- matrix(ncol=0,nrow=nrow(test_data[[i]])) estimated_values2 <- list() for(j in 1:5){ net <- nnet(formula=actual_log ~ time_factor+rely_factor+data_factor+ cplx_factor+stor_factor+virt_factor+turn_factor+ acap_factor+aexp_factor+pcap_factor+vexp_factor+ lexp_factor+modp_factor+tool_factor+sced_factor+ loc_log+dev_mode_factor,size=23, data = train_data_item, linout=T, maxit = 300,trace=F) # net <- nnet(formula=actual_log ~ time+rely+data+ # cplx+stor+virt+turn+ # acap+aexp+pcap+vexp+ # lexp+modp+tool+sced+ # loc_log+dev_mode,size=23, data = train1_data, linout=T)#,x=loc,y=loc # print(net) # print(i) # print("------------------------------------------") pr <- predict(net,test_data[i],type="raw") # print(nrow(pr)) # print(ncol(pr)) # print(test_data[i]) # print(i) # f <- test_data[[1]] # print(f) # print(test_data[[1]]$project_id) col_name <- paste("pr", j,sep="") # col_name2 <- paste("estimated2", j,sep="") # if(nrow(estimated_values) == 0) estimated_values <- data.frame(pr) # else estimated_values <- cbind(pr,estimated_values) # estimated_values0$"pr2" <- pr # results$ # rbind(estimated_values2, 10 ^ pr) # cbind(test_data[[i]],col_name) # cbind(test_data[[i]],col_name2) # test_data[[i]][,col_name] <- pr # test_data[[i]][,col_name2] <- 10 ^ pr # test_data[[i]]$col_name <- pr plot(pr, pch = 19) dir_name <- paste("figures\\",i,sep = "") if(!file.exists(dir_name)) dir.create(dir_name) plot_name <- paste(j, ".png") plot_name <- paste(dir_name,"\\", plot_name,sep = "") dev.copy(png,plot_name,width=480,height=480) dev.off() } # estimated_values0[,] <- estimated_values estimated_values <- cbind(estimated_values, test_data[[i]]$actual_log) # print(estimated_values) # print(results) # data.frame(estimated_values) # colnames(estimated_values) <- c("pr1","pr2","pr3","pr4","pr5","actual_log") # print(estimated_values) # results <<- estimated_values results <<- rbind(results,estimated_values) # estimated_values # test_data[[i]] <- c(test_data[i], estimated_values) # cbind(test_data[[i]], estimated_values) # print(nrow(results)) # if(nrow(results) == 0){ # print("e") # results <<- test_data[i] # rbind(test_data[i],results) # } # else{ # rbind(test_data[i],results) # } # cbind(test_data[[i]],estimated_values2) } x <- mapply(applyNet,train_data,seq_along(train_data),SIMPLIFY = F) results <- data.frame(results,row.names=NULL) colnames(results) <- c("pr1","pr2","pr3","pr4","pr5","actual_log") # print(x[1]) # df <- data.frame(x[1:3],stringsAsFactors = F)
/2_Merge_feesdata_navizfa.R
no_license
Alicja1990/doktorat
R
false
false
1,556
r
\name{progModelCV} \alias{progModelCV} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Cross Validate the performance of Integrated Prognosis Prediction Models } \description{ Cross Validate the performance of Integrated Prognosis Prediction Models } \usage{ progModelCV(mRNA.ID, cli.ID, sur.ID, model.train, model.predict, ci.list.size, ci.sample.size, xlist = c("mitotic", "mt", "ls"), clist, cv.fold = 100, train.par = NULL, predict.par = NULL) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{mRNA.ID}{ %% ~~Describe \code{mRNA.ID} here~~ } \item{cli.ID}{ %% ~~Describe \code{cli.ID} here~~ } \item{sur.ID}{ %% ~~Describe \code{sur.ID} here~~ } \item{model.train}{ %% ~~Describe \code{model.train} here~~ } \item{model.predict}{ %% ~~Describe \code{model.predict} here~~ } \item{ci.list.size}{ %% ~~Describe \code{ci.list.size} here~~ } \item{ci.sample.size}{ %% ~~Describe \code{ci.sample.size} here~~ } \item{xlist}{ %% ~~Describe \code{xlist} here~~ } \item{clist}{ %% ~~Describe \code{clist} here~~ } \item{cv.fold}{ %% ~~Describe \code{cv.fold} here~~ } \item{train.par}{ %% ~~Describe \code{train.par} here~~ } \item{predict.par}{ %% ~~Describe \code{predict.par} here~~ } } \details{ %% ~~ If necessary, more details than the description above ~~ } \value{ %% ~Describe the value returned %% If it is a LIST, use %% \item{comp1 }{Description of 'comp1'} %% \item{comp2 }{Description of 'comp2'} %% ... } \references{ %% ~put references to the literature/web site here ~ } \author{ Tai-Hsien Ou Yang } \note{ %% ~~further notes~~ } %% ~Make other sections like Warning with \section{Warning }{....} ~ \seealso{ %% ~~objects to See Also as \code{\link{help}}, ~~~ } \examples{ ##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. synapseLogin() lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", gbm.train, gbm.predict, 100, 100, xlist = c("mitotic"), clist=c("age","stage"), cv.fold = 100) lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", gbm.train, gbm.predict, 100, 100, xlist = c("mt","ls"), clist=c("age","stage"), cv.fold = 100) lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", gbm.train, gbm.predict, 100, 100, xlist = NULL, clist=c("age","stage"), cv.fold = 100) lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", single.train, single.predict, 100, 100, xlist = c("mitotic"), clist=NULL, cv.fold = 100) ci.submit<-list("gisl[modelname]"="Mitotic Only","gisl[ci]"=round(lusc.cv["mean"],6),"gisl[std]"=round(lusc.cv["std"],6),"gisl[ctype]"="LUSC","gisl[date]"="04032013","gisl[desc]"="Mitotic Only Tai-Hsien" ) postToHost("128.59.65.84","/gisls",ci.submit,port=2013) ## The function is currently defined as function (mRNA.ID, cli.ID, sur.ID, model.train, model.predict, ci.list.size, ci.sample.size, xlist = c("mitotic", "mt", "ls"), clist, cv.fold = 100, train.par = NULL, predict.par = NULL) { cat("Downloading Synapse Entities...\n") syn = loadEntity(mRNA.ID) cli = loadEntity(cli.ID) sur = loadEntity(sur.ID) cat("Loading mRNA Datasets...\n") ge = load.exp(file.path(syn$cacheDir, syn$files[[1]][1])) ge = t(ge) cat("Imputing Expression data...\n") for (i in 1:nrow(ge)) { ge[i, is.na(ge[i, ])] <- mean(ge[i, ], na.rm = TRUE) } rn.ge = rownames(ge) rn.ge = substr(rn.ge, 6, nchar(rn.ge)) rownames(ge) = rn.ge data(attractome.minimalist) rn.ge = as.matrix(rn.ge) dim(rn.ge) = c(length(rn.ge), 1) colnames(rn.ge) = "Gene.Symbol" rownames(rn.ge) = rn.ge metagene = CreateMetageneSpace(ge, attractome.minimalist, rn.ge)$metaSpace cat("Loading Clinical Data...\n") clnc = load.clnc(file.path(cli$cacheDir, cli$files[[1]][1])) clnc.imputed = lazyImputeDFClncOslo(clnc) cat("Loading Survival Data...\n") survival.ge = load.exp(file.path(sur$cacheDir, sur$files[[1]][1])) ci.list = matrix(0, 1:ci.list.size) cat("Generating Cross Validation Sample Sets...\n") sample.id = replicate(ci.list.size, sample(1:ncol(ge), ncol(ge), replace = TRUE)) test.id = replicate(ci.list.size, sample(1:ncol(ge), ncol(ge), replace = TRUE)) cat("Cross validating...\n") for (i in 1:cv.fold) { sample.list = colnames(ge)[sample.id[1:ci.sample.size, i]] Surv.train = Surv(survival.ge[sample.list, "OS_OS"], survival.ge[sample.list, "OS_vital_status"]) X.train = cbind(t(metagene[xlist, sample.list]), clnc.imputed[sample.list, clist]) trainmodel <- match.fun(model.train) trainedmodel = trainmodel(X.train, Surv.train, train.par) X.test = cbind(t(metagene[xlist, test.id[, i]]), clnc.imputed[test.id[, i], clist]) predictmodel <- match.fun(model.predict) p1 = predictmodel(trainedmodel, X.test, predict.par) ci.list[i] = concordance.index(p1, survival.ge[test.id[, i], "OS_OS"], survival.ge[test.id[, i], "OS_vital_status"])$c.index if (i\%\%100 == 0) { setTxtProgressBar(txtProgressBar(style = 3), i/cv.fold) } } ci.mean = mean(ci.list, na.rm = T) ci.std = sd(ci.list, na.rm = T) cat("Done!\n") cat("MEAN=", ci.mean, "STD=", ci.std, "\n") return(c(mean = ci.mean, std = ci.std)) } } % Add one or more standard keywords, see file 'KEYWORDS' in the % R documentation directory. \keyword{ ~kwd1 } \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
/man/progModelCV.Rd
no_license
th86/progEval
R
false
false
5,827
rd
\name{progModelCV} \alias{progModelCV} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Cross Validate the performance of Integrated Prognosis Prediction Models } \description{ Cross Validate the performance of Integrated Prognosis Prediction Models } \usage{ progModelCV(mRNA.ID, cli.ID, sur.ID, model.train, model.predict, ci.list.size, ci.sample.size, xlist = c("mitotic", "mt", "ls"), clist, cv.fold = 100, train.par = NULL, predict.par = NULL) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{mRNA.ID}{ %% ~~Describe \code{mRNA.ID} here~~ } \item{cli.ID}{ %% ~~Describe \code{cli.ID} here~~ } \item{sur.ID}{ %% ~~Describe \code{sur.ID} here~~ } \item{model.train}{ %% ~~Describe \code{model.train} here~~ } \item{model.predict}{ %% ~~Describe \code{model.predict} here~~ } \item{ci.list.size}{ %% ~~Describe \code{ci.list.size} here~~ } \item{ci.sample.size}{ %% ~~Describe \code{ci.sample.size} here~~ } \item{xlist}{ %% ~~Describe \code{xlist} here~~ } \item{clist}{ %% ~~Describe \code{clist} here~~ } \item{cv.fold}{ %% ~~Describe \code{cv.fold} here~~ } \item{train.par}{ %% ~~Describe \code{train.par} here~~ } \item{predict.par}{ %% ~~Describe \code{predict.par} here~~ } } \details{ %% ~~ If necessary, more details than the description above ~~ } \value{ %% ~Describe the value returned %% If it is a LIST, use %% \item{comp1 }{Description of 'comp1'} %% \item{comp2 }{Description of 'comp2'} %% ... } \references{ %% ~put references to the literature/web site here ~ } \author{ Tai-Hsien Ou Yang } \note{ %% ~~further notes~~ } %% ~Make other sections like Warning with \section{Warning }{....} ~ \seealso{ %% ~~objects to See Also as \code{\link{help}}, ~~~ } \examples{ ##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. synapseLogin() lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", gbm.train, gbm.predict, 100, 100, xlist = c("mitotic"), clist=c("age","stage"), cv.fold = 100) lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", gbm.train, gbm.predict, 100, 100, xlist = c("mt","ls"), clist=c("age","stage"), cv.fold = 100) lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", gbm.train, gbm.predict, 100, 100, xlist = NULL, clist=c("age","stage"), cv.fold = 100) lusc.cv=progModelCV("syn1710382", "syn1715826", "syn1710384", single.train, single.predict, 100, 100, xlist = c("mitotic"), clist=NULL, cv.fold = 100) ci.submit<-list("gisl[modelname]"="Mitotic Only","gisl[ci]"=round(lusc.cv["mean"],6),"gisl[std]"=round(lusc.cv["std"],6),"gisl[ctype]"="LUSC","gisl[date]"="04032013","gisl[desc]"="Mitotic Only Tai-Hsien" ) postToHost("128.59.65.84","/gisls",ci.submit,port=2013) ## The function is currently defined as function (mRNA.ID, cli.ID, sur.ID, model.train, model.predict, ci.list.size, ci.sample.size, xlist = c("mitotic", "mt", "ls"), clist, cv.fold = 100, train.par = NULL, predict.par = NULL) { cat("Downloading Synapse Entities...\n") syn = loadEntity(mRNA.ID) cli = loadEntity(cli.ID) sur = loadEntity(sur.ID) cat("Loading mRNA Datasets...\n") ge = load.exp(file.path(syn$cacheDir, syn$files[[1]][1])) ge = t(ge) cat("Imputing Expression data...\n") for (i in 1:nrow(ge)) { ge[i, is.na(ge[i, ])] <- mean(ge[i, ], na.rm = TRUE) } rn.ge = rownames(ge) rn.ge = substr(rn.ge, 6, nchar(rn.ge)) rownames(ge) = rn.ge data(attractome.minimalist) rn.ge = as.matrix(rn.ge) dim(rn.ge) = c(length(rn.ge), 1) colnames(rn.ge) = "Gene.Symbol" rownames(rn.ge) = rn.ge metagene = CreateMetageneSpace(ge, attractome.minimalist, rn.ge)$metaSpace cat("Loading Clinical Data...\n") clnc = load.clnc(file.path(cli$cacheDir, cli$files[[1]][1])) clnc.imputed = lazyImputeDFClncOslo(clnc) cat("Loading Survival Data...\n") survival.ge = load.exp(file.path(sur$cacheDir, sur$files[[1]][1])) ci.list = matrix(0, 1:ci.list.size) cat("Generating Cross Validation Sample Sets...\n") sample.id = replicate(ci.list.size, sample(1:ncol(ge), ncol(ge), replace = TRUE)) test.id = replicate(ci.list.size, sample(1:ncol(ge), ncol(ge), replace = TRUE)) cat("Cross validating...\n") for (i in 1:cv.fold) { sample.list = colnames(ge)[sample.id[1:ci.sample.size, i]] Surv.train = Surv(survival.ge[sample.list, "OS_OS"], survival.ge[sample.list, "OS_vital_status"]) X.train = cbind(t(metagene[xlist, sample.list]), clnc.imputed[sample.list, clist]) trainmodel <- match.fun(model.train) trainedmodel = trainmodel(X.train, Surv.train, train.par) X.test = cbind(t(metagene[xlist, test.id[, i]]), clnc.imputed[test.id[, i], clist]) predictmodel <- match.fun(model.predict) p1 = predictmodel(trainedmodel, X.test, predict.par) ci.list[i] = concordance.index(p1, survival.ge[test.id[, i], "OS_OS"], survival.ge[test.id[, i], "OS_vital_status"])$c.index if (i\%\%100 == 0) { setTxtProgressBar(txtProgressBar(style = 3), i/cv.fold) } } ci.mean = mean(ci.list, na.rm = T) ci.std = sd(ci.list, na.rm = T) cat("Done!\n") cat("MEAN=", ci.mean, "STD=", ci.std, "\n") return(c(mean = ci.mean, std = ci.std)) } } % Add one or more standard keywords, see file 'KEYWORDS' in the % R documentation directory. \keyword{ ~kwd1 } \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
#' gislason #' @description #' gislason natural mortality relatoinship estimate M as a function of length. #' M=a*length^b; #' #' @param length mass at which M is to be predicted #' @param params \code{FLPar} with two values; i.e. a equal to M at unit mass #' and b a power term; defaults are a=0.3 and b=-0.288 #' @param a 0.55 #' @param b 1.44 #' @param c -1.61 #' @param ... any other arguments #' #' @aliases gislason gislason-method #' gislason,FLQuant,FLPar-method #' gislason,FLQuant,missing-method #' gislason,FLQuant,numeric-method #' #' @export #' @docType methods #' @rdname gislason #' #' @seealso \code{\link{lorenzen}} #' #' @examples #' \dontrun{ #' params=lhPar(FLPar(linf=111)) #' len=FLQuant(c( 1.90, 4.23, 7.47,11.48,16.04,20.96,26.07,31.22, #' 36.28,41.17,45.83,50.20,54.27,58.03,61.48,64.62), #' dimnames=list(age=1:16)) #' gislason(length,params) #' } setMethod('gislason', signature(length='FLQuant',params='numeric'), function(length,params,a=0.55,b=1.44,c=-1.61,...) { res=gislasonFn(length,params) res@units='yr^-1' res}) setMethod('gislason', signature(length='FLQuant',params='FLPar'), function(length,params,a=0.55,b=1.44,c=-1.61,...){ res=gislasonFn(length,params) res@units='yr^-1' res}) gislasonFn<-function(length,params,a=0.55,b=1.44,c=-1.61) { # log(M)=a+b*log(L)+c*log(Linf)+log(k) # Natural mortality parameters from Model 2, Table 1 gislason 2010 if (!all(c("m1","m2")%in%dimnames(params)$params)){ m1=FLPar(m1= a*(params["linf"]^b)%*%params["k"], iter=dims(params)$iter) m2=FLPar(m2=c , iter=dims(params)$iter) params=rbind(params,m1,m2) } params["m1"]%*%(exp(log(length)%*%params["m2"]))}
/R/backup/gislason.R
no_license
shfischer/FLife
R
false
false
1,847
r
#' gislason #' @description #' gislason natural mortality relatoinship estimate M as a function of length. #' M=a*length^b; #' #' @param length mass at which M is to be predicted #' @param params \code{FLPar} with two values; i.e. a equal to M at unit mass #' and b a power term; defaults are a=0.3 and b=-0.288 #' @param a 0.55 #' @param b 1.44 #' @param c -1.61 #' @param ... any other arguments #' #' @aliases gislason gislason-method #' gislason,FLQuant,FLPar-method #' gislason,FLQuant,missing-method #' gislason,FLQuant,numeric-method #' #' @export #' @docType methods #' @rdname gislason #' #' @seealso \code{\link{lorenzen}} #' #' @examples #' \dontrun{ #' params=lhPar(FLPar(linf=111)) #' len=FLQuant(c( 1.90, 4.23, 7.47,11.48,16.04,20.96,26.07,31.22, #' 36.28,41.17,45.83,50.20,54.27,58.03,61.48,64.62), #' dimnames=list(age=1:16)) #' gislason(length,params) #' } setMethod('gislason', signature(length='FLQuant',params='numeric'), function(length,params,a=0.55,b=1.44,c=-1.61,...) { res=gislasonFn(length,params) res@units='yr^-1' res}) setMethod('gislason', signature(length='FLQuant',params='FLPar'), function(length,params,a=0.55,b=1.44,c=-1.61,...){ res=gislasonFn(length,params) res@units='yr^-1' res}) gislasonFn<-function(length,params,a=0.55,b=1.44,c=-1.61) { # log(M)=a+b*log(L)+c*log(Linf)+log(k) # Natural mortality parameters from Model 2, Table 1 gislason 2010 if (!all(c("m1","m2")%in%dimnames(params)$params)){ m1=FLPar(m1= a*(params["linf"]^b)%*%params["k"], iter=dims(params)$iter) m2=FLPar(m2=c , iter=dims(params)$iter) params=rbind(params,m1,m2) } params["m1"]%*%(exp(log(length)%*%params["m2"]))}
# parameters are ordered as cell mean (length=j), alpha(length=i), beta(length=i) and cell var(length=i*j) # cell var is ordered by row, i.e. i,j={1,1},{1,2},{1,3}... # , where mu_batch.i = alpha_batch.i + beta_batch.i * mu_batch.base # X.sum.mat and X2.sum.mat with dim=c(i,j) are sum over X_i,j and X_i,j^2 for batch i and celltype j # count.tab, with dim=c(i,j), is the total number of cells of batch i and celltype j log.likelihood <- function (parameters, X.sum.mat, X2.sum.mat, count.tab, base.batch.idx){ I <- nrow(count.tab) J <- ncol(count.tab) mu <- parameters[1:J] alpha <- parameters[(J+1):(J+I)] sigma2 <- (X2.sum.mat / count.tab) - (X.sum.mat/count.tab)^2 log.lik <- 0 # this is minus logLik for(i in 1:I){ for (j in 1:J){ n.i.j <- count.tab[i,j] if(n.i.j>0){ X.sum.i.j <- X.sum.mat[i,j] X2.sum.i.j <- X2.sum.mat[i,j] mu.transformed.i.j <- alpha[i] + mu[j] sigma2.i.j <- X2.sum.i.j/n.i.j - 2* mu.transformed.i.j * X.sum.i.j/n.i.j + mu.transformed.i.j^2 # always set sigma to MLE #compute minus logLik log.lik <- log.lik + 0.5* n.i.j * log(sigma2.i.j) + (X2.sum.i.j - 2* X.sum.i.j * mu.transformed.i.j + (mu.transformed.i.j^2) * n.i.j) / (2 * sigma2.i.j) } } } log.lik } log.likelihood.grad <- function (parameters, X.sum.mat, X2.sum.mat, count.tab, base.batch.idx){ I <- nrow(count.tab) J <- ncol(count.tab) mu <- parameters[1:J] alpha <- parameters[(J+1):(J+I)] grad.mu <- rep(0,J) grad.alpha <- rep(0,I) for(i in 1:I){ for (j in 1:J){ n.i.j <- count.tab[i,j] if(n.i.j > 0){ X.sum.i.j <- X.sum.mat[i,j] X2.sum.i.j <- X2.sum.mat[i,j] mu.transformed.i.j <- alpha[i] + mu[j] sigma2.i.j <- X2.sum.i.j/n.i.j - 2* mu.transformed.i.j * X.sum.i.j/n.i.j + mu.transformed.i.j^2 # always set sigma to MLE shared.term.i.j <- (- X.sum.i.j + n.i.j* mu.transformed.i.j) / sigma2.i.j grad.mu[j] <- grad.mu[j] + shared.term.i.j grad.alpha[i] <- grad.alpha[i] + shared.term.i.j } } if(i == base.batch.idx) grad.alpha[i] <- 0 } return(c(grad.mu, grad.alpha)) } initial.param <- function(X.sum.mat, X2.sum.mat, count.tab, base.batch.idx){ I <- nrow(count.tab) J <- ncol(count.tab) mu.all <- apply(X.sum.mat,2,sum)/apply(count.tab,2,sum) mu.base <- X.sum.mat[base.batch.idx,] / count.tab[base.batch.idx,] mu.ini <- as.numeric(lm( mu.base - mu.all ~ 1 )$coefficients[1]) + mu.all alpha.ini <- c() for(i in 1:I){ if(i== base.batch.idx) { alpha.ini <- c(alpha.ini,0) } else{ mu.i <- X.sum.mat[i,] / count.tab[i,] lm.i <- lm(mu.i - mu.base ~ 1) alpha.i <- as.numeric(lm.i$coefficients[1]) alpha.ini <- c(alpha.ini, alpha.i ) } } return(as.numeric(c(mu.ini, alpha.ini))) } estimate_sf <- function(ref.dat, cell.type.labels, batch.labels, opt.control=list(trace=1, maxit= 200)){ cell.type.labels <- as.character(cell.type.labels) batch.labels <- as.character(batch.labels) #get total and log2(total) library size for each cell cell.tot <- apply(ref.dat,1,sum) tot.log <- log2(cell.tot) #generate batch by cell type count matrix count.tab <- as.matrix(table(cbind.data.frame(batch.labels,cell.type.labels))) #select batch with the most complete cell types (if tie, then order by the total number of cells) as the base batch (scaling factor=1) batch.tot.cell.type.count <- apply(count.tab>0,1,sum) batch.tot.cell.count <- apply(count.tab,1,sum) base.batch.idx <- order(batch.tot.cell.type.count, batch.tot.cell.count, decreasing=T)[1] I <- nrow(count.tab) J <- ncol(count.tab) X.sum.mat <- matrix(0,nrow=nrow(count.tab),ncol=ncol(count.tab)) X2.sum.mat <- matrix(0,nrow=nrow(count.tab),ncol=ncol(count.tab)) for(i in 1:I){ for (j in 1:J){ if(count.tab[i,j] < 2){ #clean up entry with fewer than 2 cells count.tab[i,j] <- 0 } else{ tot.log.i.j <- tot.log[batch.labels ==rownames(count.tab)[i] & cell.type.labels== colnames(count.tab)[j]] X.sum.mat[i,j] <- sum(tot.log.i.j) X2.sum.mat[i,j] <- sum(tot.log.i.j^2) } } } #initialize parameters ini.param <- initial.param (X.sum.mat= X.sum.mat, X2.sum.mat=X2.sum.mat, count.tab= count.tab, base.batch.idx= base.batch.idx) #minimize minus log likelihood opt.param <- optim(par= ini.param, fn= log.likelihood, gr= log.likelihood.grad, method="BFGS", control= opt.control, X.sum.mat= X.sum.mat, X2.sum.mat=X2.sum.mat, count.tab= count.tab, base.batch.idx= base.batch.idx)$par mu.log <- opt.param[1:ncol(count.tab)] mu.log <- mu.log - median(mu.log) mu <- 2^ mu.log names(mu) <- colnames(count.tab) mu } convert.theta.mat <- function(theta.mat, cell.sf){ cell.sf.matched <- as.numeric(cell.sf [match(colnames(theta.mat),names(cell.sf))]) t(apply(theta.mat,1,function(theta.mat.i){ theta.mat.i.converted <- theta.mat.i/cell.sf.matched theta.mat.i.converted <- theta.mat.i.converted/sum(theta.mat.i.converted) theta.mat.i.converted} )) } convert.cell.fraction <- function(ted.obj, cell.sf){ first.gibbs.theta <- ted.obj$res$first.gibbs.res$theta.merged final.gibbs.theta <- ted.obj$res$final.gibbs.theta first.gibbs.cell.fraction <- convert.theta.mat (first.gibbs.theta,cell.sf) print("first.gibbs.cell.fraction:") percentage.tab<-apply(first.gibbs.cell.fraction,2,summary) print(round(percentage.tab,3)) ted.obj$res$first.gibbs.res$first.gibbs.cell.fraction <- first.gibbs.cell.fraction if(!is.null(final.gibbs.theta)){ final.gibbs.cell.fraction <- convert.theta.mat (final.gibbs.theta,cell.sf) print("final.gibbs.cell.fraction:") percentage.tab<-apply(final.gibbs.cell.fraction,2,summary) print(round(percentage.tab,3)) ted.obj$res$final.gibbs.cell.fraction <- final.gibbs.cell.fraction } ted.obj }
/TED/R/estimate_cell_fraction.R
no_license
Danko-Lab/TED
R
false
false
6,140
r
# parameters are ordered as cell mean (length=j), alpha(length=i), beta(length=i) and cell var(length=i*j) # cell var is ordered by row, i.e. i,j={1,1},{1,2},{1,3}... # , where mu_batch.i = alpha_batch.i + beta_batch.i * mu_batch.base # X.sum.mat and X2.sum.mat with dim=c(i,j) are sum over X_i,j and X_i,j^2 for batch i and celltype j # count.tab, with dim=c(i,j), is the total number of cells of batch i and celltype j log.likelihood <- function (parameters, X.sum.mat, X2.sum.mat, count.tab, base.batch.idx){ I <- nrow(count.tab) J <- ncol(count.tab) mu <- parameters[1:J] alpha <- parameters[(J+1):(J+I)] sigma2 <- (X2.sum.mat / count.tab) - (X.sum.mat/count.tab)^2 log.lik <- 0 # this is minus logLik for(i in 1:I){ for (j in 1:J){ n.i.j <- count.tab[i,j] if(n.i.j>0){ X.sum.i.j <- X.sum.mat[i,j] X2.sum.i.j <- X2.sum.mat[i,j] mu.transformed.i.j <- alpha[i] + mu[j] sigma2.i.j <- X2.sum.i.j/n.i.j - 2* mu.transformed.i.j * X.sum.i.j/n.i.j + mu.transformed.i.j^2 # always set sigma to MLE #compute minus logLik log.lik <- log.lik + 0.5* n.i.j * log(sigma2.i.j) + (X2.sum.i.j - 2* X.sum.i.j * mu.transformed.i.j + (mu.transformed.i.j^2) * n.i.j) / (2 * sigma2.i.j) } } } log.lik } log.likelihood.grad <- function (parameters, X.sum.mat, X2.sum.mat, count.tab, base.batch.idx){ I <- nrow(count.tab) J <- ncol(count.tab) mu <- parameters[1:J] alpha <- parameters[(J+1):(J+I)] grad.mu <- rep(0,J) grad.alpha <- rep(0,I) for(i in 1:I){ for (j in 1:J){ n.i.j <- count.tab[i,j] if(n.i.j > 0){ X.sum.i.j <- X.sum.mat[i,j] X2.sum.i.j <- X2.sum.mat[i,j] mu.transformed.i.j <- alpha[i] + mu[j] sigma2.i.j <- X2.sum.i.j/n.i.j - 2* mu.transformed.i.j * X.sum.i.j/n.i.j + mu.transformed.i.j^2 # always set sigma to MLE shared.term.i.j <- (- X.sum.i.j + n.i.j* mu.transformed.i.j) / sigma2.i.j grad.mu[j] <- grad.mu[j] + shared.term.i.j grad.alpha[i] <- grad.alpha[i] + shared.term.i.j } } if(i == base.batch.idx) grad.alpha[i] <- 0 } return(c(grad.mu, grad.alpha)) } initial.param <- function(X.sum.mat, X2.sum.mat, count.tab, base.batch.idx){ I <- nrow(count.tab) J <- ncol(count.tab) mu.all <- apply(X.sum.mat,2,sum)/apply(count.tab,2,sum) mu.base <- X.sum.mat[base.batch.idx,] / count.tab[base.batch.idx,] mu.ini <- as.numeric(lm( mu.base - mu.all ~ 1 )$coefficients[1]) + mu.all alpha.ini <- c() for(i in 1:I){ if(i== base.batch.idx) { alpha.ini <- c(alpha.ini,0) } else{ mu.i <- X.sum.mat[i,] / count.tab[i,] lm.i <- lm(mu.i - mu.base ~ 1) alpha.i <- as.numeric(lm.i$coefficients[1]) alpha.ini <- c(alpha.ini, alpha.i ) } } return(as.numeric(c(mu.ini, alpha.ini))) } estimate_sf <- function(ref.dat, cell.type.labels, batch.labels, opt.control=list(trace=1, maxit= 200)){ cell.type.labels <- as.character(cell.type.labels) batch.labels <- as.character(batch.labels) #get total and log2(total) library size for each cell cell.tot <- apply(ref.dat,1,sum) tot.log <- log2(cell.tot) #generate batch by cell type count matrix count.tab <- as.matrix(table(cbind.data.frame(batch.labels,cell.type.labels))) #select batch with the most complete cell types (if tie, then order by the total number of cells) as the base batch (scaling factor=1) batch.tot.cell.type.count <- apply(count.tab>0,1,sum) batch.tot.cell.count <- apply(count.tab,1,sum) base.batch.idx <- order(batch.tot.cell.type.count, batch.tot.cell.count, decreasing=T)[1] I <- nrow(count.tab) J <- ncol(count.tab) X.sum.mat <- matrix(0,nrow=nrow(count.tab),ncol=ncol(count.tab)) X2.sum.mat <- matrix(0,nrow=nrow(count.tab),ncol=ncol(count.tab)) for(i in 1:I){ for (j in 1:J){ if(count.tab[i,j] < 2){ #clean up entry with fewer than 2 cells count.tab[i,j] <- 0 } else{ tot.log.i.j <- tot.log[batch.labels ==rownames(count.tab)[i] & cell.type.labels== colnames(count.tab)[j]] X.sum.mat[i,j] <- sum(tot.log.i.j) X2.sum.mat[i,j] <- sum(tot.log.i.j^2) } } } #initialize parameters ini.param <- initial.param (X.sum.mat= X.sum.mat, X2.sum.mat=X2.sum.mat, count.tab= count.tab, base.batch.idx= base.batch.idx) #minimize minus log likelihood opt.param <- optim(par= ini.param, fn= log.likelihood, gr= log.likelihood.grad, method="BFGS", control= opt.control, X.sum.mat= X.sum.mat, X2.sum.mat=X2.sum.mat, count.tab= count.tab, base.batch.idx= base.batch.idx)$par mu.log <- opt.param[1:ncol(count.tab)] mu.log <- mu.log - median(mu.log) mu <- 2^ mu.log names(mu) <- colnames(count.tab) mu } convert.theta.mat <- function(theta.mat, cell.sf){ cell.sf.matched <- as.numeric(cell.sf [match(colnames(theta.mat),names(cell.sf))]) t(apply(theta.mat,1,function(theta.mat.i){ theta.mat.i.converted <- theta.mat.i/cell.sf.matched theta.mat.i.converted <- theta.mat.i.converted/sum(theta.mat.i.converted) theta.mat.i.converted} )) } convert.cell.fraction <- function(ted.obj, cell.sf){ first.gibbs.theta <- ted.obj$res$first.gibbs.res$theta.merged final.gibbs.theta <- ted.obj$res$final.gibbs.theta first.gibbs.cell.fraction <- convert.theta.mat (first.gibbs.theta,cell.sf) print("first.gibbs.cell.fraction:") percentage.tab<-apply(first.gibbs.cell.fraction,2,summary) print(round(percentage.tab,3)) ted.obj$res$first.gibbs.res$first.gibbs.cell.fraction <- first.gibbs.cell.fraction if(!is.null(final.gibbs.theta)){ final.gibbs.cell.fraction <- convert.theta.mat (final.gibbs.theta,cell.sf) print("final.gibbs.cell.fraction:") percentage.tab<-apply(final.gibbs.cell.fraction,2,summary) print(round(percentage.tab,3)) ted.obj$res$final.gibbs.cell.fraction <- final.gibbs.cell.fraction } ted.obj }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/EPFR.r \name{proc.count} \alias{proc.count} \title{proc.count} \usage{ proc.count(x = 10) } \arguments{ \item{x}{= number of records to return (0 = everything)} } \description{ returns top <x> processes by number running } \seealso{ Other proc: \code{\link{proc.kill}} } \keyword{proc.count}
/man/proc.count.Rd
no_license
vsrimurthy/EPFR
R
false
true
370
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/EPFR.r \name{proc.count} \alias{proc.count} \title{proc.count} \usage{ proc.count(x = 10) } \arguments{ \item{x}{= number of records to return (0 = everything)} } \description{ returns top <x> processes by number running } \seealso{ Other proc: \code{\link{proc.kill}} } \keyword{proc.count}
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.3195431108689e-309, 1.37366939144078e-231, 2.5118954719337e+180, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:3)) result <- do.call(CNull:::communities_individual_based_sampling_beta_interleaved_matrices,testlist) str(result)
/CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615840036-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
285
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.3195431108689e-309, 1.37366939144078e-231, 2.5118954719337e+180, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:3)) result <- do.call(CNull:::communities_individual_based_sampling_beta_interleaved_matrices,testlist) str(result)
# Intrinio API # # Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://docs.intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner. # # OpenAPI spec version: 2.45.0 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' OptionIntervalsMoversResult Class #' #' @field open_time #' @field close_time #' @field size #' @field intervals #' #' @importFrom R6 R6Class #' @importFrom jsonlite fromJSON toJSON #' @export OptionIntervalsMoversResult <- R6::R6Class( 'OptionIntervalsMoversResult', public = list( `open_time` = NA, `close_time` = NA, `size` = NA, `intervals` = NA, `intervals_data_frame` = NULL, initialize = function(`open_time`, `close_time`, `size`, `intervals`){ if (!missing(`open_time`)) { self$`open_time` <- `open_time` } if (!missing(`close_time`)) { self$`close_time` <- `close_time` } if (!missing(`size`)) { self$`size` <- `size` } if (!missing(`intervals`)) { self$`intervals` <- `intervals` } }, toJSON = function() { OptionIntervalsMoversResultObject <- list() if (!is.null(self$`open_time`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`open_time`) && ((length(self$`open_time`) == 0) || ((length(self$`open_time`) != 0 && R6::is.R6(self$`open_time`[[1]]))))) { OptionIntervalsMoversResultObject[['open_time']] <- lapply(self$`open_time`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['open_time']] <- jsonlite::toJSON(self$`open_time`, auto_unbox = TRUE) } } if (!is.null(self$`close_time`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`close_time`) && ((length(self$`close_time`) == 0) || ((length(self$`close_time`) != 0 && R6::is.R6(self$`close_time`[[1]]))))) { OptionIntervalsMoversResultObject[['close_time']] <- lapply(self$`close_time`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['close_time']] <- jsonlite::toJSON(self$`close_time`, auto_unbox = TRUE) } } if (!is.null(self$`size`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`size`) && ((length(self$`size`) == 0) || ((length(self$`size`) != 0 && R6::is.R6(self$`size`[[1]]))))) { OptionIntervalsMoversResultObject[['size']] <- lapply(self$`size`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['size']] <- jsonlite::toJSON(self$`size`, auto_unbox = TRUE) } } if (!is.null(self$`intervals`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`intervals`) && ((length(self$`intervals`) == 0) || ((length(self$`intervals`) != 0 && R6::is.R6(self$`intervals`[[1]]))))) { OptionIntervalsMoversResultObject[['intervals']] <- lapply(self$`intervals`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['intervals']] <- jsonlite::toJSON(self$`intervals`, auto_unbox = TRUE) } } OptionIntervalsMoversResultObject }, fromJSON = function(OptionIntervalsMoversResultJson) { OptionIntervalsMoversResultObject <- jsonlite::fromJSON(OptionIntervalsMoversResultJson) if (!is.null(OptionIntervalsMoversResultObject$`open_time`)) { self$`open_time` <- OptionIntervalsMoversResultObject$`open_time` } if (!is.null(OptionIntervalsMoversResultObject$`close_time`)) { self$`close_time` <- OptionIntervalsMoversResultObject$`close_time` } if (!is.null(OptionIntervalsMoversResultObject$`size`)) { self$`size` <- OptionIntervalsMoversResultObject$`size` } if (!is.null(OptionIntervalsMoversResultObject$`intervals`)) { self$`intervals` <- OptionIntervalsMoversResultObject$`intervals` } }, toJSONString = function() { jsonlite::toJSON(self$toJSON(), auto_unbox = TRUE, pretty = TRUE) }, fromJSONString = function(OptionIntervalsMoversResultJson) { OptionIntervalsMoversResultObject <- jsonlite::fromJSON(OptionIntervalsMoversResultJson, simplifyDataFrame = FALSE) self$setFromList(OptionIntervalsMoversResultObject) }, setFromList = function(listObject) { if (!is.null(listObject$`open_time`)) { self$`open_time` <- as.POSIXct(listObject$`open_time`, tz = "GMT", "%Y-%m-%dT%H:%M:%OS") } else { self$`open_time` <- NA } if (!is.null(listObject$`close_time`)) { self$`close_time` <- as.POSIXct(listObject$`close_time`, tz = "GMT", "%Y-%m-%dT%H:%M:%OS") } else { self$`close_time` <- NA } if (!is.null(listObject$`size`)) { self$`size` <- listObject$`size` } else { self$`size` <- NA } self$`intervals` <- lapply(listObject$`intervals`, function(x) { OptionIntervalMoverObject <- OptionIntervalMover$new() OptionIntervalMoverObject$setFromList(x) return(OptionIntervalMoverObject) }) intervals_list <- lapply(self$`intervals`, function(x) { return(x$getAsList()) }) self$`intervals_data_frame` <- do.call(rbind, lapply(intervals_list, data.frame)) }, getAsList = function() { listObject = list() listObject[["open_time"]] <- self$`open_time` listObject[["close_time"]] <- self$`close_time` listObject[["size"]] <- self$`size` # listObject[["intervals"]] <- lapply(self$`intervals`, function(o) { # return(o$getAsList()) # }) return(listObject) } ) )
/R/OptionIntervalsMoversResult.r
no_license
intrinio/r-sdk
R
false
false
6,155
r
# Intrinio API # # Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://docs.intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner. # # OpenAPI spec version: 2.45.0 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' OptionIntervalsMoversResult Class #' #' @field open_time #' @field close_time #' @field size #' @field intervals #' #' @importFrom R6 R6Class #' @importFrom jsonlite fromJSON toJSON #' @export OptionIntervalsMoversResult <- R6::R6Class( 'OptionIntervalsMoversResult', public = list( `open_time` = NA, `close_time` = NA, `size` = NA, `intervals` = NA, `intervals_data_frame` = NULL, initialize = function(`open_time`, `close_time`, `size`, `intervals`){ if (!missing(`open_time`)) { self$`open_time` <- `open_time` } if (!missing(`close_time`)) { self$`close_time` <- `close_time` } if (!missing(`size`)) { self$`size` <- `size` } if (!missing(`intervals`)) { self$`intervals` <- `intervals` } }, toJSON = function() { OptionIntervalsMoversResultObject <- list() if (!is.null(self$`open_time`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`open_time`) && ((length(self$`open_time`) == 0) || ((length(self$`open_time`) != 0 && R6::is.R6(self$`open_time`[[1]]))))) { OptionIntervalsMoversResultObject[['open_time']] <- lapply(self$`open_time`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['open_time']] <- jsonlite::toJSON(self$`open_time`, auto_unbox = TRUE) } } if (!is.null(self$`close_time`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`close_time`) && ((length(self$`close_time`) == 0) || ((length(self$`close_time`) != 0 && R6::is.R6(self$`close_time`[[1]]))))) { OptionIntervalsMoversResultObject[['close_time']] <- lapply(self$`close_time`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['close_time']] <- jsonlite::toJSON(self$`close_time`, auto_unbox = TRUE) } } if (!is.null(self$`size`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`size`) && ((length(self$`size`) == 0) || ((length(self$`size`) != 0 && R6::is.R6(self$`size`[[1]]))))) { OptionIntervalsMoversResultObject[['size']] <- lapply(self$`size`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['size']] <- jsonlite::toJSON(self$`size`, auto_unbox = TRUE) } } if (!is.null(self$`intervals`)) { # If the object is an empty list or a list of R6 Objects if (is.list(self$`intervals`) && ((length(self$`intervals`) == 0) || ((length(self$`intervals`) != 0 && R6::is.R6(self$`intervals`[[1]]))))) { OptionIntervalsMoversResultObject[['intervals']] <- lapply(self$`intervals`, function(x) x$toJSON()) } else { OptionIntervalsMoversResultObject[['intervals']] <- jsonlite::toJSON(self$`intervals`, auto_unbox = TRUE) } } OptionIntervalsMoversResultObject }, fromJSON = function(OptionIntervalsMoversResultJson) { OptionIntervalsMoversResultObject <- jsonlite::fromJSON(OptionIntervalsMoversResultJson) if (!is.null(OptionIntervalsMoversResultObject$`open_time`)) { self$`open_time` <- OptionIntervalsMoversResultObject$`open_time` } if (!is.null(OptionIntervalsMoversResultObject$`close_time`)) { self$`close_time` <- OptionIntervalsMoversResultObject$`close_time` } if (!is.null(OptionIntervalsMoversResultObject$`size`)) { self$`size` <- OptionIntervalsMoversResultObject$`size` } if (!is.null(OptionIntervalsMoversResultObject$`intervals`)) { self$`intervals` <- OptionIntervalsMoversResultObject$`intervals` } }, toJSONString = function() { jsonlite::toJSON(self$toJSON(), auto_unbox = TRUE, pretty = TRUE) }, fromJSONString = function(OptionIntervalsMoversResultJson) { OptionIntervalsMoversResultObject <- jsonlite::fromJSON(OptionIntervalsMoversResultJson, simplifyDataFrame = FALSE) self$setFromList(OptionIntervalsMoversResultObject) }, setFromList = function(listObject) { if (!is.null(listObject$`open_time`)) { self$`open_time` <- as.POSIXct(listObject$`open_time`, tz = "GMT", "%Y-%m-%dT%H:%M:%OS") } else { self$`open_time` <- NA } if (!is.null(listObject$`close_time`)) { self$`close_time` <- as.POSIXct(listObject$`close_time`, tz = "GMT", "%Y-%m-%dT%H:%M:%OS") } else { self$`close_time` <- NA } if (!is.null(listObject$`size`)) { self$`size` <- listObject$`size` } else { self$`size` <- NA } self$`intervals` <- lapply(listObject$`intervals`, function(x) { OptionIntervalMoverObject <- OptionIntervalMover$new() OptionIntervalMoverObject$setFromList(x) return(OptionIntervalMoverObject) }) intervals_list <- lapply(self$`intervals`, function(x) { return(x$getAsList()) }) self$`intervals_data_frame` <- do.call(rbind, lapply(intervals_list, data.frame)) }, getAsList = function() { listObject = list() listObject[["open_time"]] <- self$`open_time` listObject[["close_time"]] <- self$`close_time` listObject[["size"]] <- self$`size` # listObject[["intervals"]] <- lapply(self$`intervals`, function(o) { # return(o$getAsList()) # }) return(listObject) } ) )
library(RCurl) library(rjson) library(RODBC) setwd("E:\\R\\MyStudy\\") #从新浪 header=c("User-Agent"="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0", "Accept"="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language"="zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3", "Connection"="keep-alive", "Accept-Charset"="GB2312,utf-8;q=0.7,*;q=0.7" ) GetInfo <- function (url){ page <- getURL(url, httpHeader=header) # "/*<script>location.href='//sina.com';</script>*/\nFDC_DC.theTableData([{\"code\":0 temp <- substring(page,71); jsonData <- fromJSON(temp) #jsonData$code #jsonData$fields #jsonData$count pageData <- data.frame() for(item in jsonData$items){ temp <- as.data.frame(item, stringsAsFactors=FALSE) names(temp) <- jsonData$fields pageData <- rbind(pageData, temp) } pageData } #old:URLhttp://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?page=1&num=80&sort=symbol&asc=1&node=hs_a&symbol=&_s_r_a=init hs_a <- data.frame() for(i in c(1:40)){ url <- paste("http://money.finance.sina.com.cn/d/api/openapi_proxy.php/?__s=[[%22hq%22,%22hs_a%22,%22%22,0,",i,",80]]&callback=FDC_DC.theTableData",sep="") print(url) hs_a <- rbind(hs_a,GetInfo(url)) } hs_a$trade <-as.numeric(hs_a$trade) hs_a$pricechange <-as.numeric(hs_a$pricechange) hs_a$changepercent <-as.numeric(hs_a$changepercent) hs_a$buy <-as.numeric(hs_a$buy) hs_a$sell <-as.numeric(hs_a$sell) hs_a$settlement <-as.numeric(hs_a$settlement) hs_a$open <-as.numeric(hs_a$open) hs_a$high <-as.numeric(hs_a$high) hs_a$low <-as.numeric(hs_a$low) hs_a$volume <-as.numeric(hs_a$volume) hs_a$amount <-as.numeric(hs_a$amount) hs_a$nta <-as.numeric(hs_a$nta) hs_a$date <- as.character(Sys.Date()) #write.csv(hs_a, paste("HQ",Sys.Date(),sep="")) #Store the data into MySQL DB. channel_hs<-odbcConnect("MySQL",uid="root",pwd="123456") sqlDrop(channel_hs,"stock_dw.hq_staging") sqlSave(channel_hs,hs_a, "stock_dw.hq_staging", rownames = FALSE) sqlstr <- "call insert_hq_hist()" sqlQuery(channel_hs,sqlstr) odbcClose(channel_hs)
/Get_HQ_Data.R
no_license
simiden/StockAnalysisDW
R
false
false
2,183
r
library(RCurl) library(rjson) library(RODBC) setwd("E:\\R\\MyStudy\\") #从新浪 header=c("User-Agent"="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0", "Accept"="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language"="zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3", "Connection"="keep-alive", "Accept-Charset"="GB2312,utf-8;q=0.7,*;q=0.7" ) GetInfo <- function (url){ page <- getURL(url, httpHeader=header) # "/*<script>location.href='//sina.com';</script>*/\nFDC_DC.theTableData([{\"code\":0 temp <- substring(page,71); jsonData <- fromJSON(temp) #jsonData$code #jsonData$fields #jsonData$count pageData <- data.frame() for(item in jsonData$items){ temp <- as.data.frame(item, stringsAsFactors=FALSE) names(temp) <- jsonData$fields pageData <- rbind(pageData, temp) } pageData } #old:URLhttp://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?page=1&num=80&sort=symbol&asc=1&node=hs_a&symbol=&_s_r_a=init hs_a <- data.frame() for(i in c(1:40)){ url <- paste("http://money.finance.sina.com.cn/d/api/openapi_proxy.php/?__s=[[%22hq%22,%22hs_a%22,%22%22,0,",i,",80]]&callback=FDC_DC.theTableData",sep="") print(url) hs_a <- rbind(hs_a,GetInfo(url)) } hs_a$trade <-as.numeric(hs_a$trade) hs_a$pricechange <-as.numeric(hs_a$pricechange) hs_a$changepercent <-as.numeric(hs_a$changepercent) hs_a$buy <-as.numeric(hs_a$buy) hs_a$sell <-as.numeric(hs_a$sell) hs_a$settlement <-as.numeric(hs_a$settlement) hs_a$open <-as.numeric(hs_a$open) hs_a$high <-as.numeric(hs_a$high) hs_a$low <-as.numeric(hs_a$low) hs_a$volume <-as.numeric(hs_a$volume) hs_a$amount <-as.numeric(hs_a$amount) hs_a$nta <-as.numeric(hs_a$nta) hs_a$date <- as.character(Sys.Date()) #write.csv(hs_a, paste("HQ",Sys.Date(),sep="")) #Store the data into MySQL DB. channel_hs<-odbcConnect("MySQL",uid="root",pwd="123456") sqlDrop(channel_hs,"stock_dw.hq_staging") sqlSave(channel_hs,hs_a, "stock_dw.hq_staging", rownames = FALSE) sqlstr <- "call insert_hq_hist()" sqlQuery(channel_hs,sqlstr) odbcClose(channel_hs)
# Exercise 1: creating and operating on vectors # Create a vector `names` that contains your name and the names of 2 people # next to you. Print the vector. name <- c('Peng', 'Jiaming', 'Xinyi') # Use the colon operator : to create a vector `n` of numbers from 10:49 n <- 10:49 # Use the `length()` function to get the number of elements in `n` length(n) # Add 1 to each element in `n` and print the result print(n+1) # Create a vector `m` that contains the numbers 10 to 1 (in that order). # Hint: use the `seq()` function m <- seq(10,1) # Subtract `m` FROM `n`. Note the recycling! n-m # Use the `seq()` function to produce a range of numbers from -5 to 10 in `0.1` # increments. Store it in a variable `x_range` x_range <- seq(-5,10,0.1) # Create a vector `sin_wave` by calling the `sin()` function on each element # in `x_range`. sin_wave <- sin(x_range) # Create a vector `cos_wave` by calling the `cos()` function on each element # in `x_range`. cos_wave <- cos(x_range) # Create a vector `wave` by multiplying `sin_wave` and `cos_wave` together, then # adding `sin_wave` to the product wave <- sin_wave * cos_wave +sin_wave # Use the `plot()` function to plot your `wave`! plot(wave)
/chapter-07-exercises/exercise-1/exercise.R
permissive
cp62233/book-exercises
R
false
false
1,206
r
# Exercise 1: creating and operating on vectors # Create a vector `names` that contains your name and the names of 2 people # next to you. Print the vector. name <- c('Peng', 'Jiaming', 'Xinyi') # Use the colon operator : to create a vector `n` of numbers from 10:49 n <- 10:49 # Use the `length()` function to get the number of elements in `n` length(n) # Add 1 to each element in `n` and print the result print(n+1) # Create a vector `m` that contains the numbers 10 to 1 (in that order). # Hint: use the `seq()` function m <- seq(10,1) # Subtract `m` FROM `n`. Note the recycling! n-m # Use the `seq()` function to produce a range of numbers from -5 to 10 in `0.1` # increments. Store it in a variable `x_range` x_range <- seq(-5,10,0.1) # Create a vector `sin_wave` by calling the `sin()` function on each element # in `x_range`. sin_wave <- sin(x_range) # Create a vector `cos_wave` by calling the `cos()` function on each element # in `x_range`. cos_wave <- cos(x_range) # Create a vector `wave` by multiplying `sin_wave` and `cos_wave` together, then # adding `sin_wave` to the product wave <- sin_wave * cos_wave +sin_wave # Use the `plot()` function to plot your `wave`! plot(wave)
rm(list = ls());gc() options(scipen = 999) library(data.table) library(tidyverse) library(harmonizePNAD) library(Hmisc) setwd("C:/Dropbox/Rogerio/Bancos_Dados/PNADs/") anos <- c(1973, 1976:1979,1981:1990,1992, 1993, 1995:1999, 2001:2009, 2011:2015) ano_i = 2015 # Abrindo arquivos for(ano_i in c(2001:2009,2011:2015)){ print(ano_i) arquivo = paste0("PNAD ", ano_i,"/pnad.pes_", ano_i,".csv") assign(x = paste0("p_", ano_i), value = fread(arquivo) %>% prepare_to_harmonize(type = "pnad", year = ano_i)) gc() } # Harmonizacoes - testes de variaveis especificas for(ano_i in c(2001:2009,2011:2015)){ print(ano_i) assign(x = paste0("p_", ano_i), value = get(paste0(paste0("p_", ano_i))) %>% build_identification_year() %>% build_identification_wgt() %>% build_work_occupationalStatus() ) gc();Sys.sleep(.3);gc() } gc() dados_existentes <- ls()[grep(x = ls(), pattern="p_[[:digit:]]{4}")] dados_stack = data_frame() for(dado_i in dados_existentes){ print(dado_i) dados_stack <- bind_rows(dados_stack, get(dado_i) %>% select(year, occupationalStatus, fweight) %>% filter(complete.cases(.)) ) } dados_stack <- data.table(dados_stack) freq = dados_stack[ , questionr::wtd.table(x = occupationalStatus, y = year, weights = fweight)] round(prop.table(freq,margin = 2)*100, 2) # Harmonizacoes completas for(ano_i in anos){ print(ano_i) assign(x = paste0("p_", ano_i), value = get(paste0(paste0("p_", ano_i))) %>% harmonize_identification() %>% harmonize_demographics() %>% harmonize_geography() %>% harmonize_education() %>% harmonize_work() ) } # Estatísticas map_df(.x = anos, .f = function(ano_i){ age_i = get(paste0("p_", ano_i), envir = .GlobalEnv)[, wtd.mean(x = age, weights = fweight)] if(ano_i == 1973){ yearsSchooling_i = NA }else{ yearsSchooling_i = get(paste0("p_", ano_i), envir = .GlobalEnv)[, wtd.mean(x = yearsSchooling, weights = fweight)] } tibble(year = ano_i, age = age_i, yearsSchooling = yearsSchooling_i) } ) map(.x = anos, .f = function(ano_i){ freq_uf <- get(paste0("p_", ano_i), envir = .GlobalEnv)[, table(x = regionMCA)] dados <- data.table(as.numeric(freq_uf)) rownames(dados) <- names(freq_uf) names(dados) <- paste0("ano",ano_i) dados }) %>% reduce(.f = bind_cols) vars_to_harmonize_ordered_list <- vars_to_harmonize() write.csv2(vars_to_harmonize_ordered_list, file = "C:/Users/Rogerio/Google Drive/RCodes/PacotesR/harmonizePNAD/inst/extdata/vars_to_harmonize_ordered_list.csv", row.names = F)
/R/tmp/Testando_funções.R
no_license
arthurwelle/harmonizePNAD
R
false
false
3,318
r
rm(list = ls());gc() options(scipen = 999) library(data.table) library(tidyverse) library(harmonizePNAD) library(Hmisc) setwd("C:/Dropbox/Rogerio/Bancos_Dados/PNADs/") anos <- c(1973, 1976:1979,1981:1990,1992, 1993, 1995:1999, 2001:2009, 2011:2015) ano_i = 2015 # Abrindo arquivos for(ano_i in c(2001:2009,2011:2015)){ print(ano_i) arquivo = paste0("PNAD ", ano_i,"/pnad.pes_", ano_i,".csv") assign(x = paste0("p_", ano_i), value = fread(arquivo) %>% prepare_to_harmonize(type = "pnad", year = ano_i)) gc() } # Harmonizacoes - testes de variaveis especificas for(ano_i in c(2001:2009,2011:2015)){ print(ano_i) assign(x = paste0("p_", ano_i), value = get(paste0(paste0("p_", ano_i))) %>% build_identification_year() %>% build_identification_wgt() %>% build_work_occupationalStatus() ) gc();Sys.sleep(.3);gc() } gc() dados_existentes <- ls()[grep(x = ls(), pattern="p_[[:digit:]]{4}")] dados_stack = data_frame() for(dado_i in dados_existentes){ print(dado_i) dados_stack <- bind_rows(dados_stack, get(dado_i) %>% select(year, occupationalStatus, fweight) %>% filter(complete.cases(.)) ) } dados_stack <- data.table(dados_stack) freq = dados_stack[ , questionr::wtd.table(x = occupationalStatus, y = year, weights = fweight)] round(prop.table(freq,margin = 2)*100, 2) # Harmonizacoes completas for(ano_i in anos){ print(ano_i) assign(x = paste0("p_", ano_i), value = get(paste0(paste0("p_", ano_i))) %>% harmonize_identification() %>% harmonize_demographics() %>% harmonize_geography() %>% harmonize_education() %>% harmonize_work() ) } # Estatísticas map_df(.x = anos, .f = function(ano_i){ age_i = get(paste0("p_", ano_i), envir = .GlobalEnv)[, wtd.mean(x = age, weights = fweight)] if(ano_i == 1973){ yearsSchooling_i = NA }else{ yearsSchooling_i = get(paste0("p_", ano_i), envir = .GlobalEnv)[, wtd.mean(x = yearsSchooling, weights = fweight)] } tibble(year = ano_i, age = age_i, yearsSchooling = yearsSchooling_i) } ) map(.x = anos, .f = function(ano_i){ freq_uf <- get(paste0("p_", ano_i), envir = .GlobalEnv)[, table(x = regionMCA)] dados <- data.table(as.numeric(freq_uf)) rownames(dados) <- names(freq_uf) names(dados) <- paste0("ano",ano_i) dados }) %>% reduce(.f = bind_cols) vars_to_harmonize_ordered_list <- vars_to_harmonize() write.csv2(vars_to_harmonize_ordered_list, file = "C:/Users/Rogerio/Google Drive/RCodes/PacotesR/harmonizePNAD/inst/extdata/vars_to_harmonize_ordered_list.csv", row.names = F)
#정준상관분석 install.packages("CCA") library(CCA) str(HBAT) ccMat <- HBAT[,19:26] str(ccMat) summary(ccMat) SIY <- ccMat[,5:8] OCX <- ccMat[,1:4] print(matcor(OCX, SIY), digits=3) #상관계수행렬(CCA패키지) #독립변수군의 상관계수행렬, 종속변수군의 상관계수행렬, 전체상관계수행렬 cc1 <- cc(OCX, SIY) #정준상관분석 cc1[1] #정준상관계수 #제1, 제2, 제3, 제4 변수군의 관계가 양의 관계 cc1[3:4] #정준변수계수 u1 u2 v1 v2 cc2 <- comput(OCX, SIY, cc1) #정준상관분석 추가계산 cc2[3:6] #변수와 정준변수 간의 상관계수 cc3 <- comput(SIY, OCX, cc1) cc3[3:6] # 표준화 정준변수 cov.OCX <- cov(OCX) #OC의 공분산행렬 sd.OCX <- sqrt(diag(cov.OCX)) #OC1, OC2, OC3, OC4의 표준편차 S.X <- diag(sd.OCX) #OC1, OC2, OC3, OC4의 표준편차 대각행렬 S.X S.X%*%cc1$xcoef #OCX의 표준화 정준변수계수 = 원변수들의 표준편차 * 원변수의 정준변수계수 cov.SIY <- cov(SIY) #SI의 공분산행렬 sd.SIY <- sqrt(diag(cov.SIY)) #SI1, SI2, SI3, SI4의 표준편차 S.Y <- diag(sd.SIY) #SI1, SI2, SI3, SI4의 표준편차 대각행렬 S.Y S.Y%*%cc1$ycoef #SIY의 표준화 정준변수계수 par(mfrow=c(2, 2)) U1 <- cc1$scores$xscores[,1] #첫 번째 정준변수(U1, V1) V1 <- cc1$scores$yscores[,1] plot(U1, V1, pch=18, main="First Canonical Plot") U2 <- cc1$scores$xscores[,2] #두 번째 정준변수(U2, V2) V2 <- cc1$scores$yscores[,2] plot(U2, V2, pch=18, main="Second Canonical Plot") U3 <- cc1$scores$xscores[,3] #세 번째 정준변수(U3, V3) V3 <- cc1$scores$yscores[,3] plot(U3, V3, pch=18, main="Third Canonical Plot") U4 <- cc1$scores$xscores[,4] #네 번째 정준변수(U4, V4) V4 <- cc1$scores$yscores[,4] plot(U4, V4, pch=18, main="Fourth Canonical Plot") par(mfrow=c(1, 1)) plt.cc(cc1, type="v", var.label = TRUE) plt.cc(cc1, type="i", var.label = TRUE) mtc <- matcor(OCX, SIY) print(mtc, digits=3) img.matcor(mtc, type=1) #상관계수행렬 그래프 img.matcor(mtc, type = 2) #상관계수행렬 그래프(변수군별, 변수군간) # 상관성에 대한 검정 alpha <- 0.05 #유의수준 n <- dim(ccMat)[1] #표본수 p <- dim(OCX)[2] #확률변수군 OC의 변수 수 q <- dim(SIY)[2] #확률변수군 SI의 변수 수 lambda1 <- prod(1-cc1[[1]]^2) #람다1 검정통계량 chi2 <- (-(n-(p+q+3)/2))*log(lambda1) #카이스퀘어 검정통계량 lambda1; chi2 1-pchisq(chi2, 16) #p-value qchisq(1-alpha, p*q) #임계값 alpha <- 0.05 #유의수준 n <- dim(ccMat)[1] #표본수 p <- dim(OCX)[2] #확률변수군 OC의 변수 수 q <- dim(SIY)[2] #확률변수군 SI의 변수 수 #정준상관계수의 유의검정 det(cor(ccMat))/det(cor(OCX))*det(cor(SIY)) (-396-0.5*(8+3))*log(0.007142162) 1-pchisq(1984.109, 16) #정준상관계수의 개수에 관한 검정 cca <- cancor(OCX, SIY) -(n-0.5*(p+3))*sum(log(1-(cca$cor[1:4])^2)) #검정통계량값 1-pchisq(131.574, 16) #p-value #귀무가설 기각, 정준상관변수 유의미하다. -(n-0.5*(p+3))*sum(log(1-(cca$cor[2:4])^2)) #검정통계량값 1-pchisq(5.349644, 16) #p-value #다변량 정규성 평가 n <- dim(SIY)[1] #표본수 p <- dim(SIY)[2] #변수의 수 m <- colMeans(SIY) #평균벡터 s <- cov(SIY) #공분산행렬 solve(s) #공분산행렬의 역행렬 d2 <- mahalanobis(SIY, m, s) #마할라노비스 거리 d2 <- sort(d2) i <- 1:n #순서 edf <- (i-0.5)/n #경험적 분포 q <- qchisq(edf, p) #x2(p) 분위수 #마할라노비스 거리 순서통계량과 카이제곱분포 cbind(i, d2, edf, q) plot(q, d2, pch=19, main="Chisquare plot for Staying Intentions", xlab = "x2 quantile", ylab = "ordered Mahalanobis d2") #카이제곱그림 abline(0, 1) #다변량 정규성 평가 n <- dim(OCX)[1] #표본수 p <- dim(OCX)[2] #변수의 수 m <- colMeans(OCX) #평균벡터 s <- cov(OCX) #공분산행렬 solve(s) #공분산행렬의 역행렬 d2 <- mahalanobis(OCX, m, s) #마할라노비스 거리 d2 <- sort(d2) i <- 1:n #순서 edf <- (i-0.5)/n #경험적 분포 q <- qchisq(edf, p) #x2(p) 분위수 #마할라노비스 거리 순서통계량과 카이제곱분포 cbind(i, d2, edf, q) plot(q, d2, pch=19, main="Chisquare plot for Organizational Commitment", xlab = "x2 quantile", ylab = "ordered Mahalanobis d2") #카이제곱그림 abline(0, 1) install.packages("MVN") library(MVN) mvn(SIY) mvn(OCX) boxplot(SIY) boxplot(OCX)
/CC.R
no_license
SungjiCho/R
R
false
false
4,486
r
#정준상관분석 install.packages("CCA") library(CCA) str(HBAT) ccMat <- HBAT[,19:26] str(ccMat) summary(ccMat) SIY <- ccMat[,5:8] OCX <- ccMat[,1:4] print(matcor(OCX, SIY), digits=3) #상관계수행렬(CCA패키지) #독립변수군의 상관계수행렬, 종속변수군의 상관계수행렬, 전체상관계수행렬 cc1 <- cc(OCX, SIY) #정준상관분석 cc1[1] #정준상관계수 #제1, 제2, 제3, 제4 변수군의 관계가 양의 관계 cc1[3:4] #정준변수계수 u1 u2 v1 v2 cc2 <- comput(OCX, SIY, cc1) #정준상관분석 추가계산 cc2[3:6] #변수와 정준변수 간의 상관계수 cc3 <- comput(SIY, OCX, cc1) cc3[3:6] # 표준화 정준변수 cov.OCX <- cov(OCX) #OC의 공분산행렬 sd.OCX <- sqrt(diag(cov.OCX)) #OC1, OC2, OC3, OC4의 표준편차 S.X <- diag(sd.OCX) #OC1, OC2, OC3, OC4의 표준편차 대각행렬 S.X S.X%*%cc1$xcoef #OCX의 표준화 정준변수계수 = 원변수들의 표준편차 * 원변수의 정준변수계수 cov.SIY <- cov(SIY) #SI의 공분산행렬 sd.SIY <- sqrt(diag(cov.SIY)) #SI1, SI2, SI3, SI4의 표준편차 S.Y <- diag(sd.SIY) #SI1, SI2, SI3, SI4의 표준편차 대각행렬 S.Y S.Y%*%cc1$ycoef #SIY의 표준화 정준변수계수 par(mfrow=c(2, 2)) U1 <- cc1$scores$xscores[,1] #첫 번째 정준변수(U1, V1) V1 <- cc1$scores$yscores[,1] plot(U1, V1, pch=18, main="First Canonical Plot") U2 <- cc1$scores$xscores[,2] #두 번째 정준변수(U2, V2) V2 <- cc1$scores$yscores[,2] plot(U2, V2, pch=18, main="Second Canonical Plot") U3 <- cc1$scores$xscores[,3] #세 번째 정준변수(U3, V3) V3 <- cc1$scores$yscores[,3] plot(U3, V3, pch=18, main="Third Canonical Plot") U4 <- cc1$scores$xscores[,4] #네 번째 정준변수(U4, V4) V4 <- cc1$scores$yscores[,4] plot(U4, V4, pch=18, main="Fourth Canonical Plot") par(mfrow=c(1, 1)) plt.cc(cc1, type="v", var.label = TRUE) plt.cc(cc1, type="i", var.label = TRUE) mtc <- matcor(OCX, SIY) print(mtc, digits=3) img.matcor(mtc, type=1) #상관계수행렬 그래프 img.matcor(mtc, type = 2) #상관계수행렬 그래프(변수군별, 변수군간) # 상관성에 대한 검정 alpha <- 0.05 #유의수준 n <- dim(ccMat)[1] #표본수 p <- dim(OCX)[2] #확률변수군 OC의 변수 수 q <- dim(SIY)[2] #확률변수군 SI의 변수 수 lambda1 <- prod(1-cc1[[1]]^2) #람다1 검정통계량 chi2 <- (-(n-(p+q+3)/2))*log(lambda1) #카이스퀘어 검정통계량 lambda1; chi2 1-pchisq(chi2, 16) #p-value qchisq(1-alpha, p*q) #임계값 alpha <- 0.05 #유의수준 n <- dim(ccMat)[1] #표본수 p <- dim(OCX)[2] #확률변수군 OC의 변수 수 q <- dim(SIY)[2] #확률변수군 SI의 변수 수 #정준상관계수의 유의검정 det(cor(ccMat))/det(cor(OCX))*det(cor(SIY)) (-396-0.5*(8+3))*log(0.007142162) 1-pchisq(1984.109, 16) #정준상관계수의 개수에 관한 검정 cca <- cancor(OCX, SIY) -(n-0.5*(p+3))*sum(log(1-(cca$cor[1:4])^2)) #검정통계량값 1-pchisq(131.574, 16) #p-value #귀무가설 기각, 정준상관변수 유의미하다. -(n-0.5*(p+3))*sum(log(1-(cca$cor[2:4])^2)) #검정통계량값 1-pchisq(5.349644, 16) #p-value #다변량 정규성 평가 n <- dim(SIY)[1] #표본수 p <- dim(SIY)[2] #변수의 수 m <- colMeans(SIY) #평균벡터 s <- cov(SIY) #공분산행렬 solve(s) #공분산행렬의 역행렬 d2 <- mahalanobis(SIY, m, s) #마할라노비스 거리 d2 <- sort(d2) i <- 1:n #순서 edf <- (i-0.5)/n #경험적 분포 q <- qchisq(edf, p) #x2(p) 분위수 #마할라노비스 거리 순서통계량과 카이제곱분포 cbind(i, d2, edf, q) plot(q, d2, pch=19, main="Chisquare plot for Staying Intentions", xlab = "x2 quantile", ylab = "ordered Mahalanobis d2") #카이제곱그림 abline(0, 1) #다변량 정규성 평가 n <- dim(OCX)[1] #표본수 p <- dim(OCX)[2] #변수의 수 m <- colMeans(OCX) #평균벡터 s <- cov(OCX) #공분산행렬 solve(s) #공분산행렬의 역행렬 d2 <- mahalanobis(OCX, m, s) #마할라노비스 거리 d2 <- sort(d2) i <- 1:n #순서 edf <- (i-0.5)/n #경험적 분포 q <- qchisq(edf, p) #x2(p) 분위수 #마할라노비스 거리 순서통계량과 카이제곱분포 cbind(i, d2, edf, q) plot(q, d2, pch=19, main="Chisquare plot for Organizational Commitment", xlab = "x2 quantile", ylab = "ordered Mahalanobis d2") #카이제곱그림 abline(0, 1) install.packages("MVN") library(MVN) mvn(SIY) mvn(OCX) boxplot(SIY) boxplot(OCX)
rm(list=ls()) bd<-as.data.frame(USArrests) bd #obtener la descomposicion espectral de<-eigen(cor(bd)) L<-de$vectors delta<-diag(de$values) delta L L%*%delta%*%t(L) cov(bd) cor(bd) L[,1:2]%*%delta[1:2,1:2]%*%t(L[,1:2]) L[,1:3]%*%delta[1:3,1:3]%*%t(L[,1:3]) prop.table(de$values) cumsum(prop.table(de$values)) L%*%t(L) #Componentes como un indicador #indicador de crimen crcov<-eigen(cov(bd[,c(1,2,4)])) crcor<-eigen(cor(bd[,c(1,2,4)])) prop.table(crcov$values) prop.table(crcor$values) crcov$vectors[,1] bd$icr<-as.matrix(bd[,c(1,2,4)])%*%crcor$vectors[,1] head(bd) View(bd[order(bd$icr),]) plot(bd$Rape,bd$icr)
/code/clase_4mar.R
no_license
AlvaroLimber/EST-384
R
false
false
618
r
rm(list=ls()) bd<-as.data.frame(USArrests) bd #obtener la descomposicion espectral de<-eigen(cor(bd)) L<-de$vectors delta<-diag(de$values) delta L L%*%delta%*%t(L) cov(bd) cor(bd) L[,1:2]%*%delta[1:2,1:2]%*%t(L[,1:2]) L[,1:3]%*%delta[1:3,1:3]%*%t(L[,1:3]) prop.table(de$values) cumsum(prop.table(de$values)) L%*%t(L) #Componentes como un indicador #indicador de crimen crcov<-eigen(cov(bd[,c(1,2,4)])) crcor<-eigen(cor(bd[,c(1,2,4)])) prop.table(crcov$values) prop.table(crcor$values) crcov$vectors[,1] bd$icr<-as.matrix(bd[,c(1,2,4)])%*%crcor$vectors[,1] head(bd) View(bd[order(bd$icr),]) plot(bd$Rape,bd$icr)
# Exercise 1: writing and executing functions # Define a function `AddThree` that takes a single argument and # returns a value 3 greater than that input AddThree <- function(x) { return(3 + x) } # Create a variable `ten` that is the result of passing 7 to your `AddThree` function ten <- AddThree(7) # Define a function `ImperialToMetric` that takes in two arguments: a number of feet # and a number of inches # The function should return the total length in meters ImperialToMetric <- function(num.of.feet, num.of.inch) { return((num.of.feet * 0.3048) + (num.of.inch * 0.0254)) } # Create a variable `height.in.meters` by passing your height in imperial to the # `ImperialToMetric` function height.in.meters <- ImperialToMetric(5, 3)
/exercise-1/exercise.R
permissive
soobkwon/module6-functions
R
false
false
746
r
# Exercise 1: writing and executing functions # Define a function `AddThree` that takes a single argument and # returns a value 3 greater than that input AddThree <- function(x) { return(3 + x) } # Create a variable `ten` that is the result of passing 7 to your `AddThree` function ten <- AddThree(7) # Define a function `ImperialToMetric` that takes in two arguments: a number of feet # and a number of inches # The function should return the total length in meters ImperialToMetric <- function(num.of.feet, num.of.inch) { return((num.of.feet * 0.3048) + (num.of.inch * 0.0254)) } # Create a variable `height.in.meters` by passing your height in imperial to the # `ImperialToMetric` function height.in.meters <- ImperialToMetric(5, 3)
library(meteoland) ### Name: SpatialPixelsMeteorology-class ### Title: Class '"SpatialPixelsMeteorology"' ### Aliases: SpatialPixelsMeteorology-class ### [,SpatialPixelsMeteorology,ANY,ANY,ANY-method ### show,SpatialPixelsMeteorology-method ### Keywords: classes ### ** Examples #Structure of the S4 object showClass("SpatialPixelsMeteorology")
/data/genthat_extracted_code/meteoland/examples/SpatialPixelsMeteorology-class.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
356
r
library(meteoland) ### Name: SpatialPixelsMeteorology-class ### Title: Class '"SpatialPixelsMeteorology"' ### Aliases: SpatialPixelsMeteorology-class ### [,SpatialPixelsMeteorology,ANY,ANY,ANY-method ### show,SpatialPixelsMeteorology-method ### Keywords: classes ### ** Examples #Structure of the S4 object showClass("SpatialPixelsMeteorology")
\name{geom_bar} \alias{geom_bar} \title{Bars, rectangles with bases on x-axis} \usage{ geom_bar(mapping = NULL, data = NULL, stat = "bin", position = "stack", ...) } \arguments{ \item{mapping}{The aesthetic mapping, usually constructed with \code{\link{aes}} or \code{\link{aes_string}}. Only needs to be set at the layer level if you are overriding the plot defaults.} \item{data}{A layer specific dataset - only needed if you want to override the plot defaults.} \item{stat}{The statistical transformation to use on the data for this layer.} \item{position}{The position adjustment to use for overlappling points on this layer} \item{...}{other arguments passed on to \code{\link{layer}}. This can include aesthetics whose values you want to set, not map. See \code{\link{layer}} for more details.} } \description{ The bar geom is used to produce 1d area plots: bar charts for categorical x, and histograms for continuous y. stat_bin explains the details of these summaries in more detail. In particular, you can use the \code{weight} aesthetic to create weighted histograms and barcharts where the height of the bar no longer represent a count of observations, but a sum over some other variable. See the examples for a practical example. } \details{ The heights of the bars commonly represent one of two things: either a count of cases in each group, or the values in a column of the data frame. By default, \code{geom_bar} uses \code{stat="bin"}. This makes the height of each bar equal to the number of cases in each group, and it is incompatible with mapping values to the \code{y} aesthetic. If you want the heights of the bars to represent values in the data, use \code{stat="identity"} and map a value to the \code{y} aesthetic. By default, multiple x's occuring in the same place will be stacked a top one another by position_stack. If you want them to be dodged from side-to-side, see \code{\link{position_dodge}}. Finally, \code{\link{position_fill}} shows relative propotions at each x by stacking the bars and then stretching or squashing to the same height. Sometimes, bar charts are used not as a distributional summary, but instead of a dotplot. Generally, it's preferable to use a dotplot (see \code{geom_point}) as it has a better data-ink ratio. However, if you do want to create this type of plot, you can set y to the value you have calculated, and use \code{stat='identity'} A bar chart maps the height of the bar to a variable, and so the base of the bar must always been shown to produce a valid visual comparison. Naomi Robbins has a nice \href{http://www.b-eye-network.com/view/index.php?cid=2468}{article on this topic}. This is the reason it doesn't make sense to use a log-scaled y axis with a bar chart } \section{Aesthetics}{ \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "bar")} } \examples{ \donttest{ # Generate data c <- ggplot(mtcars, aes(factor(cyl))) # By default, uses stat="bin", which gives the count in each category c + geom_bar() c + geom_bar(width=.5) c + geom_bar() + coord_flip() c + geom_bar(fill="white", colour="darkgreen") # Use qplot qplot(factor(cyl), data=mtcars, geom="bar") qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(cyl)) # When the data contains y values in a column, use stat="identity" library(plyr) # Calculate the mean mpg for each level of cyl mm <- ddply(mtcars, "cyl", summarise, mmpg = mean(mpg)) ggplot(mm, aes(x = factor(cyl), y = mmpg)) + geom_bar(stat = "identity") # Stacked bar charts qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(vs)) qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(gear)) # Stacked bar charts are easy in ggplot2, but not effective visually, # particularly when there are many different things being stacked ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar() ggplot(diamonds, aes(color, fill=cut)) + geom_bar() + coord_flip() # Faceting is a good alternative: ggplot(diamonds, aes(clarity)) + geom_bar() + facet_wrap(~ cut) # If the x axis is ordered, using a line instead of bars is another # possibility: ggplot(diamonds, aes(clarity)) + geom_freqpoly(aes(group = cut, colour = cut)) # Dodged bar charts ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar(position="dodge") # compare with ggplot(diamonds, aes(cut, fill=cut)) + geom_bar() + facet_grid(. ~ clarity) # But again, probably better to use frequency polygons instead: ggplot(diamonds, aes(clarity, colour=cut)) + geom_freqpoly(aes(group = cut)) # Often we don't want the height of the bar to represent the # count of observations, but the sum of some other variable. # For example, the following plot shows the number of diamonds # of each colour qplot(color, data=diamonds, geom="bar") # If, however, we want to see the total number of carats in each colour # we need to weight by the carat variable qplot(color, data=diamonds, geom="bar", weight=carat, ylab="carat") # A bar chart used to display means meanprice <- tapply(diamonds$price, diamonds$cut, mean) cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut)) qplot(cut, meanprice) qplot(cut, meanprice, geom="bar", stat="identity") qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50")) # Another stacked bar chart example k <- ggplot(mpg, aes(manufacturer, fill=class)) k + geom_bar() # Use scales to change aesthetics defaults k + geom_bar() + scale_fill_brewer() k + geom_bar() + scale_fill_grey() # To change plot order of class varible # use factor() to change order of levels mpg$class <- factor(mpg$class, levels = c("midsize", "minivan", "suv", "compact", "2seater", "subcompact", "pickup")) m <- ggplot(mpg, aes(manufacturer, fill=class)) m + geom_bar() } } \seealso{ \code{\link{stat_bin}} for more details of the binning alogirithm, \code{\link{position_dodge}} for creating side-by-side barcharts, \code{\link{position_stack}} for more info on stacking, }
/man/geom_bar.Rd
no_license
ThierryO/ggplot2
R
false
false
6,013
rd
\name{geom_bar} \alias{geom_bar} \title{Bars, rectangles with bases on x-axis} \usage{ geom_bar(mapping = NULL, data = NULL, stat = "bin", position = "stack", ...) } \arguments{ \item{mapping}{The aesthetic mapping, usually constructed with \code{\link{aes}} or \code{\link{aes_string}}. Only needs to be set at the layer level if you are overriding the plot defaults.} \item{data}{A layer specific dataset - only needed if you want to override the plot defaults.} \item{stat}{The statistical transformation to use on the data for this layer.} \item{position}{The position adjustment to use for overlappling points on this layer} \item{...}{other arguments passed on to \code{\link{layer}}. This can include aesthetics whose values you want to set, not map. See \code{\link{layer}} for more details.} } \description{ The bar geom is used to produce 1d area plots: bar charts for categorical x, and histograms for continuous y. stat_bin explains the details of these summaries in more detail. In particular, you can use the \code{weight} aesthetic to create weighted histograms and barcharts where the height of the bar no longer represent a count of observations, but a sum over some other variable. See the examples for a practical example. } \details{ The heights of the bars commonly represent one of two things: either a count of cases in each group, or the values in a column of the data frame. By default, \code{geom_bar} uses \code{stat="bin"}. This makes the height of each bar equal to the number of cases in each group, and it is incompatible with mapping values to the \code{y} aesthetic. If you want the heights of the bars to represent values in the data, use \code{stat="identity"} and map a value to the \code{y} aesthetic. By default, multiple x's occuring in the same place will be stacked a top one another by position_stack. If you want them to be dodged from side-to-side, see \code{\link{position_dodge}}. Finally, \code{\link{position_fill}} shows relative propotions at each x by stacking the bars and then stretching or squashing to the same height. Sometimes, bar charts are used not as a distributional summary, but instead of a dotplot. Generally, it's preferable to use a dotplot (see \code{geom_point}) as it has a better data-ink ratio. However, if you do want to create this type of plot, you can set y to the value you have calculated, and use \code{stat='identity'} A bar chart maps the height of the bar to a variable, and so the base of the bar must always been shown to produce a valid visual comparison. Naomi Robbins has a nice \href{http://www.b-eye-network.com/view/index.php?cid=2468}{article on this topic}. This is the reason it doesn't make sense to use a log-scaled y axis with a bar chart } \section{Aesthetics}{ \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "bar")} } \examples{ \donttest{ # Generate data c <- ggplot(mtcars, aes(factor(cyl))) # By default, uses stat="bin", which gives the count in each category c + geom_bar() c + geom_bar(width=.5) c + geom_bar() + coord_flip() c + geom_bar(fill="white", colour="darkgreen") # Use qplot qplot(factor(cyl), data=mtcars, geom="bar") qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(cyl)) # When the data contains y values in a column, use stat="identity" library(plyr) # Calculate the mean mpg for each level of cyl mm <- ddply(mtcars, "cyl", summarise, mmpg = mean(mpg)) ggplot(mm, aes(x = factor(cyl), y = mmpg)) + geom_bar(stat = "identity") # Stacked bar charts qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(vs)) qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(gear)) # Stacked bar charts are easy in ggplot2, but not effective visually, # particularly when there are many different things being stacked ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar() ggplot(diamonds, aes(color, fill=cut)) + geom_bar() + coord_flip() # Faceting is a good alternative: ggplot(diamonds, aes(clarity)) + geom_bar() + facet_wrap(~ cut) # If the x axis is ordered, using a line instead of bars is another # possibility: ggplot(diamonds, aes(clarity)) + geom_freqpoly(aes(group = cut, colour = cut)) # Dodged bar charts ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar(position="dodge") # compare with ggplot(diamonds, aes(cut, fill=cut)) + geom_bar() + facet_grid(. ~ clarity) # But again, probably better to use frequency polygons instead: ggplot(diamonds, aes(clarity, colour=cut)) + geom_freqpoly(aes(group = cut)) # Often we don't want the height of the bar to represent the # count of observations, but the sum of some other variable. # For example, the following plot shows the number of diamonds # of each colour qplot(color, data=diamonds, geom="bar") # If, however, we want to see the total number of carats in each colour # we need to weight by the carat variable qplot(color, data=diamonds, geom="bar", weight=carat, ylab="carat") # A bar chart used to display means meanprice <- tapply(diamonds$price, diamonds$cut, mean) cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut)) qplot(cut, meanprice) qplot(cut, meanprice, geom="bar", stat="identity") qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50")) # Another stacked bar chart example k <- ggplot(mpg, aes(manufacturer, fill=class)) k + geom_bar() # Use scales to change aesthetics defaults k + geom_bar() + scale_fill_brewer() k + geom_bar() + scale_fill_grey() # To change plot order of class varible # use factor() to change order of levels mpg$class <- factor(mpg$class, levels = c("midsize", "minivan", "suv", "compact", "2seater", "subcompact", "pickup")) m <- ggplot(mpg, aes(manufacturer, fill=class)) m + geom_bar() } } \seealso{ \code{\link{stat_bin}} for more details of the binning alogirithm, \code{\link{position_dodge}} for creating side-by-side barcharts, \code{\link{position_stack}} for more info on stacking, }
# ** WGCNA pipeline part 1: ** # remove genes with too many missing values, or low variance # build sample tree with kept genes to detect outliers # ###### input: ########################################################### # datExpr: normalized gene expression data (rownames--genes, colnames--samples) # datTrait: trait data of all the samples (rownames--samples, colnames--trait) ########################################################################### ## module load R/3.6.1 # .libPaths("/u/juxiao/R/x86_64-pc-linux-gnu-library/3.6" ) # .libPaths() cat("\n *********************************\n ********* WGCNA part1 *********\n ******* Sample clustering *******\n *********************************\n\n\n") ############### take parameters from bash command ############# directory = commandArgs(trailingOnly=TRUE)[1] fileExpr = commandArgs(trailingOnly=TRUE)[2] fileTraits = commandArgs(trailingOnly=TRUE)[3] log.base = commandArgs(trailingOnly=TRUE)[4] log.add = commandArgs(trailingOnly=TRUE)[5] library(ggplot2) library(gplots) library(reshape2) library(doParallel) library(WGCNA) options(stringsAsFactors = FALSE) ################## load input files ########################### cat("\n **** Expression data :", fileExpr ) cat("\n-------------Loading expression data -----------\n") while (!file.exists(fileExpr)) { cat("File doesn't exist. Enter path of the expression data : ") fileExpr <<- readLines("stdin", 1) print(fileExpr) } datExpr <- read.delim(fileExpr,header=TRUE, row.names=1) dim(datExpr) cat("\n **** Trait data :", fileTraits) cat("\n-------------Loading trait data -----------------\n") while (!file.exists(fileTraits)) { cat("File doesn't exist. Enter path of the trait data : ") fileTraits <<- readLines("stdin", 1) print(fileTraits) } datTraits <- read.delim(fileTraits, header = TRUE, row.names = 1) dim(datTraits) ## set output directory cat("\n **** Output directory :", directory, "\n" ) dir.create(file.path(directory), showWarnings = FALSE) setwd(file.path(directory)) # getwd() ## Log transformation if (!is.na(log.base)){ cat("\n **** Log transformation: log", log.base, "(x+", log.add,")" ) log.base = as.numeric(log.base) log.add = as.numeric(log.add) datExpr = log(datExpr+log.add, base=log.base) } datExpr1 <- t(datExpr) ################### data verification ################################ cat("\n---------------------Remove no good genes --------------------\n") # verify expression data gsg = goodSamplesGenes(datExpr1, verbose = 3) gsg$allOK ## remove no good genes if (!gsg$allOK) { if (sum(!gsg$goodGenes)>0) printFlush(paste("Removing genes:", paste(colnames(datExpr1)[!gsg$goodGenes], collapse = ", "))); if (sum(!gsg$goodSamples)>0) printFlush(paste("Removing samples:", paste(rownames(datExpr1)[!gsg$goodSamples], collapse = ", "))); datExpr1 = datExpr1[gsg$goodSamples, gsg$goodGenes] } cat("\n----------------- Build sample tree --------------------------\n") sampleTree = hclust(dist(datExpr1, method = "euclidean"), method = "average") # png("Part1_SampleClustering.png", width=1000, height=500) # par(mar = c(1,6,2,1)) # plot(sampleTree, main = "Sample clustering to detect outliers", sub="", xlab="", cex.lab = 1.5, # cex.axis = 1.2, cex.main = 2) pdf("Part1_SampleClustering.pdf", width=12, height=8) par(mar = c(1,6,2,1)) plot(sampleTree, main = "Sample clustering to detect outliers", sub="", xlab="", cex.lab = 1.5, cex.axis = 1.2, cex.main = 2) invisible(dev.off()) save(datExpr1, datTraits, sampleTree, file = "sampleTree.Rdata") cat("\n------------------- Part1 Done ------------------------------\n")
/pipeline_bash/WGCNA_part1.R
permissive
RyanXJu/WGCNA
R
false
false
3,673
r
# ** WGCNA pipeline part 1: ** # remove genes with too many missing values, or low variance # build sample tree with kept genes to detect outliers # ###### input: ########################################################### # datExpr: normalized gene expression data (rownames--genes, colnames--samples) # datTrait: trait data of all the samples (rownames--samples, colnames--trait) ########################################################################### ## module load R/3.6.1 # .libPaths("/u/juxiao/R/x86_64-pc-linux-gnu-library/3.6" ) # .libPaths() cat("\n *********************************\n ********* WGCNA part1 *********\n ******* Sample clustering *******\n *********************************\n\n\n") ############### take parameters from bash command ############# directory = commandArgs(trailingOnly=TRUE)[1] fileExpr = commandArgs(trailingOnly=TRUE)[2] fileTraits = commandArgs(trailingOnly=TRUE)[3] log.base = commandArgs(trailingOnly=TRUE)[4] log.add = commandArgs(trailingOnly=TRUE)[5] library(ggplot2) library(gplots) library(reshape2) library(doParallel) library(WGCNA) options(stringsAsFactors = FALSE) ################## load input files ########################### cat("\n **** Expression data :", fileExpr ) cat("\n-------------Loading expression data -----------\n") while (!file.exists(fileExpr)) { cat("File doesn't exist. Enter path of the expression data : ") fileExpr <<- readLines("stdin", 1) print(fileExpr) } datExpr <- read.delim(fileExpr,header=TRUE, row.names=1) dim(datExpr) cat("\n **** Trait data :", fileTraits) cat("\n-------------Loading trait data -----------------\n") while (!file.exists(fileTraits)) { cat("File doesn't exist. Enter path of the trait data : ") fileTraits <<- readLines("stdin", 1) print(fileTraits) } datTraits <- read.delim(fileTraits, header = TRUE, row.names = 1) dim(datTraits) ## set output directory cat("\n **** Output directory :", directory, "\n" ) dir.create(file.path(directory), showWarnings = FALSE) setwd(file.path(directory)) # getwd() ## Log transformation if (!is.na(log.base)){ cat("\n **** Log transformation: log", log.base, "(x+", log.add,")" ) log.base = as.numeric(log.base) log.add = as.numeric(log.add) datExpr = log(datExpr+log.add, base=log.base) } datExpr1 <- t(datExpr) ################### data verification ################################ cat("\n---------------------Remove no good genes --------------------\n") # verify expression data gsg = goodSamplesGenes(datExpr1, verbose = 3) gsg$allOK ## remove no good genes if (!gsg$allOK) { if (sum(!gsg$goodGenes)>0) printFlush(paste("Removing genes:", paste(colnames(datExpr1)[!gsg$goodGenes], collapse = ", "))); if (sum(!gsg$goodSamples)>0) printFlush(paste("Removing samples:", paste(rownames(datExpr1)[!gsg$goodSamples], collapse = ", "))); datExpr1 = datExpr1[gsg$goodSamples, gsg$goodGenes] } cat("\n----------------- Build sample tree --------------------------\n") sampleTree = hclust(dist(datExpr1, method = "euclidean"), method = "average") # png("Part1_SampleClustering.png", width=1000, height=500) # par(mar = c(1,6,2,1)) # plot(sampleTree, main = "Sample clustering to detect outliers", sub="", xlab="", cex.lab = 1.5, # cex.axis = 1.2, cex.main = 2) pdf("Part1_SampleClustering.pdf", width=12, height=8) par(mar = c(1,6,2,1)) plot(sampleTree, main = "Sample clustering to detect outliers", sub="", xlab="", cex.lab = 1.5, cex.axis = 1.2, cex.main = 2) invisible(dev.off()) save(datExpr1, datTraits, sampleTree, file = "sampleTree.Rdata") cat("\n------------------- Part1 Done ------------------------------\n")
# This script produces the matrix plots with the scores, coloured according to the model's # performance as well as their statistical significance. # See "functions_source.R" for the plotting function (to change colours, thresholds, labels, etc) # Significance testing/colouring: # 1- If Sig=TRUE: A significant change can be either towards better/worse # Two things can happen: Only the score changes (no change in category) or the score changes so much that there's also a change in category # -> colour only the steps sig improving from step 1 PLUS with a change in category towards better # if sig=T, check for categories in st1,2,3 -> only keep colour categ if they change towards better (4 to 1) # 2- No significant change from st1 to st2 # sig=FALSE & step=2 -> convert z_val in step 2 to NA # 3- No significant change from st2 to st3 # sig=FALSE & step=3 -> convert z_val in step 3 to NA # Use Kageyama 2020 (cp-2019-169) regions: # ### definition of the regions: latitude range, longitude range # 'Globe':[(-90,90,'cc'),(-180,180,'cc')], # Tropics':[(-30,30,'cc'),(-180,180,'cc')], # NAtlEurope':[(30,50,'cc'),(-45,45,'cc')], # NorthAtlantic':[(30,50,'cc'),(-60,-10,'cc')], # Europe':[(35,70,'cc'),(-10,60,'cc')], # WesternEurope':[(35,70,'cc'),(-10,30,'cc')], # NWAmerica':[(20,50,'cc'),(-125,-105,'cc')], # NEAmerica':[(20,50,'cc'),(-105,-50,'cc')], # Africa':[(-35,35,'cc'),(-10,50,'cc'),], # WestAfrica':[(5,30,'cc'),(-17,30,'cc'),], # NAmerica':[(20,50,'cc'),(-140,-60,'cc'),], # SHextratropics':[(-90,-30,'cc'),(-180,180,'cc')], # NHextratropics':[(30,90,'cc'),(-180,180,'cc')], # NTropics':[(0,30,'cc'),(-180,180,'cc')], # ExtratropicalAsia':[(30,75,'cc'),(60,135,'cc')], # TropicalAsia':[(8,30,'cc'),(60,120,'cc')], # TropicalAmericas':[(-30,30,'cc'),(-120,-35,'cc')], # Created by Laia Comas-Bru in November 2020 # Last modified: February 2021 ##### SET STUFF ################################################################################ ## uncomment below to run just one region (in this case N America) # region_ls <- rbind(c("NAmerica", 20,50,-140,-60)) %>% # as.data.frame (.) %>% # dplyr::rename (reg_name = V1, min_lat = V2, max_lat = V3, min_lon = V4, max_lon = V5) ## uncomment below to run all regions at once (as in Kageyama et al., 2020 CP in review) region_ls <- rbind( c("global", -90,90,-180,180),c("NH", 0,90,-180,180),c("NHextratropics", 30,90,-180,180), c("NTropics", 0,30,-180,180),c("NAmerica", 20,50,-140,-60), c("TropicalAmericas", -30,30,-120,-35), c("WesternEurope", 35,70,-10,30),#c("TropicalAsia",8,30,60,120), c("ExtratropicalAsia", 30,75,60,135), c("Africa",-35,35,-10,50)) %>% as.data.frame (.) %>% dplyr::rename (reg_name = V1, min_lat = V2, max_lat = V3, min_lon = V4, max_lon = V5) source_ls <- c ("CL", "CL_min", "CL_max") #"B", "B_min", "B_max") steps = c(1, 2, 3) ##### OPEN AND MANIPULATE SCORES DATA ########################################################### for (source in source_ls) { for (region in region_ls$reg_name) { df_tbl <- #load all csv files in directory and rbind them list.files( "output_scores/", pattern = paste ("*", source, "_", region, ".csv", sep = ""), full.names = TRUE ) %>% map_df( ~ read.csv(.)) %>% `colnames<-`( c( "X1","varname","mean_null","random_null","AWI1","AWI2","CCSM4", "CESM12","CESM21","Had-GL","Had-IC","iLOVE-GL","iLOVE-IC", "INM","IPSL","MIROC","MPI" ) ) # chose step and prepare data for (st in steps) { #process data df <- as.data.frame (df_tbl) df <- df %>% filter (df$X1 == paste("step", st, sep = "")) df_data <- df [, 5:ncol(df)] rownames(df_data) <- lapply(df$varname, FUN = trim_mode_name) df$varname <- lapply(df$varname, FUN = trim_mode_name) # rename variables according to what they are prior to rbind if (sjmisc::str_contains(source, "min", ignore.case = T)) { df_models <- round(df[, 3:4], 2) %>% dplyr::rename (mean_min = mean_null, rand_min = random_null) df_models$var = rownames(df_data) df2 <- round(df_data, 2) %>% as.matrix() %>% melt(., value.name = "score_min", varnames = c("var", "model")) %>% mutate (step = st) } else if (sjmisc::str_contains(source, "max", ignore.case = T)) { df_models <- round(df[, 3:4], 2) %>% dplyr::rename (mean_max = mean_null, rand_max = random_null) df_models$var = rownames(df_data) df2 <- round(df_data, 2) %>% as.matrix() %>% melt(., value.name = "score_max", varnames = c("var", "model")) %>% mutate (step = st) } else { df_models <- round(df[, 3:4], 2) %>% dplyr::rename (mean_raw = mean_null, rand_raw = random_null) df_models$var = rownames(df_data) df2 <- round(df_data, 2) %>% as.matrix() %>% melt(., value.name = "score_raw", varnames = c("var", "model")) %>% mutate (step = st) } # merge all steps/sources with rbind if (st == 1) { data <- df2 df_mod <- df_models %>% mutate (step = st) } else { data <- rbind (data, df2) df_mod <- rbind(df_mod, df_models %>% mutate (step = st)) } } data <- join( data, df_mod, by = c("var", "step") , type = "left", match = "all" ) assign(paste("data", source, region, sep = "_"), data) } } #rm(list=ls(pattern="^df")) # clean environment #refs_ls <- c("B", "CL") ##### ASSIGN COLOURS FOR EACH SCORE (see plot legend) ################################################################################ refs <- "CL" # min/max already used. #for (refs in refs_ls) {} # loop needed if more than one source (ie B and CL) for (region in region_ls$reg_name) { data <- join( get(paste ("data", refs, "max", region, sep = "_")) %>% dplyr::select (var, model, step, score_max), get(paste ("data", refs, "min", region, sep = "_")) %>% dplyr::select (var, model, step, score_min), by = c("var", "model", "step") ,type = "left",match = "all") %>% join (., get(paste ("data", refs, region, sep = "_")) %>% dplyr::select (var, model, step, mean_raw, rand_raw, score_raw), by = c("var", "model", "step") , type = "left",match = "all") %>% mutate (min = pmin(score_max, score_raw, score_min), max = pmax(score_max, score_raw, score_min)) %>% dplyr::select (var, model, step, mean_raw, rand_raw, score_raw, min, max) %>% dplyr::rename (mean_null = mean_raw, rand_null = rand_raw, val = score_raw) %>% mutate (z_val = NA,z_min = NA,z_max = NA) #assign values for colours for (k in 1:dim(data)[1]) { rand <- data$rand_null[k] mn <- data$mean_null[k] y <- data[k, (ncol(data) - 5):(ncol(data) - 3)] x <- data[k, (ncol(data) - 2):ncol(data)] # x [(condition == TRUE),] <- 1 x [, ((y <= mn - ((25 / 100) * mn)) == TRUE)] <- 1 x [, ((y > mn - ((25 / 100) * mn) & y <= mn) == TRUE)] <- 2 x [, ((y > mn & y < rand) == TRUE)] <- 3 x [, ((y >= rand) == TRUE)] <- 4 data[k, (ncol(data) - 2):ncol(data)] <- x } rm(ls="x","y", "mn", "k", "rand") # are ranges overlapping -> not significant???? if so, convert z back to NA # Use DescTools::Overlap # steps are cumulative (1 to 2 and then 2 to 3) data <- data %>% mutate (sig = NA) for (k in 1:dim(data)[1]) { if (data[k, "step"] == 1) { int2 <- data %>% filter (step == 2, var == data[k, "var"], model == data[k, "model"]) data[which(data$step == 2)[which(data$step == 2) %in% which(data$var == data[k, "var"] & data$model == data[k, "model"])], "sig"] <- c(data[k, "min"], data[k, "max"]) %overlaps% c(int2[, "min"], int2[, "max"]) rm(ls = "int2") } else if (data[k, "step"] == 2) { int3 <- data %>% filter (step == 3, var == data[k, "var"], model == data[k, "model"]) data[which(data$step == 3)[which(data$step == 3) %in% which(data$var == data[k, "var"] & data$model == data[k, "model"])], "sig"] <- c(data[k, "min"], data[k, "max"]) %overlaps% c(int3[, "min"], int3[, "max"]) rm(ls = "int3") } } rm(ls="k") assign(paste ("df", refs, region, sep = "_"), data) } rm(ls="st", "source", "region") variab_ls <- as.character(unique(data$var)) model_ls <- as.character(unique (data$model)) rm(list=ls(pattern="^data")) # clean environment ##### APPLY SIGNIFICANCE TO THE COLOURING, CREATE AND SAVE PLOT ############## # choose wich scores to colour and scores to remain white acc to significance #for (refs in refs_ls){} # loop needed only if more than one source (ie B and CL) for (region in region_ls$reg_name) { data <- get (paste ("df", refs, region, sep = "_")) data[which(data$sig == FALSE), "sig"] <- 999 data[which(data$sig == 1), "sig"] <- 0 data[which(data$sig == 999), "sig"] <- 1 data$sig <- as.logical (data$sig) filename_output_jpeg <- paste (plotpath,"DM_scores/", refs, "_", region, "_scores_plot.jpg", sep = "") for (mod in model_ls) { for (variab in variab_ls) { x <- data[which(data$var == variab & data$model == mod),] # 1a. signif change in scores from st2 to st3 if (x[which(x$step == 3), "sig"]) { # different category towards better -> pass1 = TRUE if (x[which(x$step == 3), "z_val"] >= x[which(x$step == 2), "z_val"]) { # remove colour for scores not changing categ significantly data[which(data$var == variab & data$model == mod & data$step == 3), "z_val"] <- 5 } } # 1b. signif change in scores from st1 to st2 if (x[which(x$step == 2), "sig"]) { # different category towards better -> pass1 = TRUE if (x[which(x$step == 2), "z_val"] >= x[which(x$step == 1), "z_val"]) { # remove colour for scores not changing categ significantly data[which(data$var == variab & data$model == mod & data$step == 2), "z_val"] <- 5 } } # 2.No significant change from st1 to st2 if (x[which(x$step == 2), "sig"] == FALSE) { # -> convert z_val in step 2 to NA data[which(data$var == variab & data$model == mod & data$step == 2), "z_val"] <- 5 } # 3.No significant change from st2 to st3 if (x[which(x$step == 3), "sig"] == FALSE) { # -> convert z_val in step 2 to NA data[which(data$var == variab & data$model == mod & data$step == 3), "z_val"] <- 5 } rm ("x") } } #here whe have a data file with NA in z_val for changes that are not significant # matrixplot is a function in functions_source.R fig <- ggarrange ( matrixplot(1) + rremove("x.text"), matrixplot(2) + rremove("x.text"), matrixplot(3), ncol = 1, common.legend = TRUE, legend = "top" ) fig <- annotate_figure(fig, top = text_grob( paste ("Target: ", refs, ". Region: ", region, sep = ""), color = "black", face = "bold", size = 16 )) ggsave(fig, file = filename_output_jpeg, width = 12, height = 13) } graphics.off()
/DM4_plot_scores.R
no_license
vedereka/PMIP4_Benchm_proj
R
false
false
12,161
r
# This script produces the matrix plots with the scores, coloured according to the model's # performance as well as their statistical significance. # See "functions_source.R" for the plotting function (to change colours, thresholds, labels, etc) # Significance testing/colouring: # 1- If Sig=TRUE: A significant change can be either towards better/worse # Two things can happen: Only the score changes (no change in category) or the score changes so much that there's also a change in category # -> colour only the steps sig improving from step 1 PLUS with a change in category towards better # if sig=T, check for categories in st1,2,3 -> only keep colour categ if they change towards better (4 to 1) # 2- No significant change from st1 to st2 # sig=FALSE & step=2 -> convert z_val in step 2 to NA # 3- No significant change from st2 to st3 # sig=FALSE & step=3 -> convert z_val in step 3 to NA # Use Kageyama 2020 (cp-2019-169) regions: # ### definition of the regions: latitude range, longitude range # 'Globe':[(-90,90,'cc'),(-180,180,'cc')], # Tropics':[(-30,30,'cc'),(-180,180,'cc')], # NAtlEurope':[(30,50,'cc'),(-45,45,'cc')], # NorthAtlantic':[(30,50,'cc'),(-60,-10,'cc')], # Europe':[(35,70,'cc'),(-10,60,'cc')], # WesternEurope':[(35,70,'cc'),(-10,30,'cc')], # NWAmerica':[(20,50,'cc'),(-125,-105,'cc')], # NEAmerica':[(20,50,'cc'),(-105,-50,'cc')], # Africa':[(-35,35,'cc'),(-10,50,'cc'),], # WestAfrica':[(5,30,'cc'),(-17,30,'cc'),], # NAmerica':[(20,50,'cc'),(-140,-60,'cc'),], # SHextratropics':[(-90,-30,'cc'),(-180,180,'cc')], # NHextratropics':[(30,90,'cc'),(-180,180,'cc')], # NTropics':[(0,30,'cc'),(-180,180,'cc')], # ExtratropicalAsia':[(30,75,'cc'),(60,135,'cc')], # TropicalAsia':[(8,30,'cc'),(60,120,'cc')], # TropicalAmericas':[(-30,30,'cc'),(-120,-35,'cc')], # Created by Laia Comas-Bru in November 2020 # Last modified: February 2021 ##### SET STUFF ################################################################################ ## uncomment below to run just one region (in this case N America) # region_ls <- rbind(c("NAmerica", 20,50,-140,-60)) %>% # as.data.frame (.) %>% # dplyr::rename (reg_name = V1, min_lat = V2, max_lat = V3, min_lon = V4, max_lon = V5) ## uncomment below to run all regions at once (as in Kageyama et al., 2020 CP in review) region_ls <- rbind( c("global", -90,90,-180,180),c("NH", 0,90,-180,180),c("NHextratropics", 30,90,-180,180), c("NTropics", 0,30,-180,180),c("NAmerica", 20,50,-140,-60), c("TropicalAmericas", -30,30,-120,-35), c("WesternEurope", 35,70,-10,30),#c("TropicalAsia",8,30,60,120), c("ExtratropicalAsia", 30,75,60,135), c("Africa",-35,35,-10,50)) %>% as.data.frame (.) %>% dplyr::rename (reg_name = V1, min_lat = V2, max_lat = V3, min_lon = V4, max_lon = V5) source_ls <- c ("CL", "CL_min", "CL_max") #"B", "B_min", "B_max") steps = c(1, 2, 3) ##### OPEN AND MANIPULATE SCORES DATA ########################################################### for (source in source_ls) { for (region in region_ls$reg_name) { df_tbl <- #load all csv files in directory and rbind them list.files( "output_scores/", pattern = paste ("*", source, "_", region, ".csv", sep = ""), full.names = TRUE ) %>% map_df( ~ read.csv(.)) %>% `colnames<-`( c( "X1","varname","mean_null","random_null","AWI1","AWI2","CCSM4", "CESM12","CESM21","Had-GL","Had-IC","iLOVE-GL","iLOVE-IC", "INM","IPSL","MIROC","MPI" ) ) # chose step and prepare data for (st in steps) { #process data df <- as.data.frame (df_tbl) df <- df %>% filter (df$X1 == paste("step", st, sep = "")) df_data <- df [, 5:ncol(df)] rownames(df_data) <- lapply(df$varname, FUN = trim_mode_name) df$varname <- lapply(df$varname, FUN = trim_mode_name) # rename variables according to what they are prior to rbind if (sjmisc::str_contains(source, "min", ignore.case = T)) { df_models <- round(df[, 3:4], 2) %>% dplyr::rename (mean_min = mean_null, rand_min = random_null) df_models$var = rownames(df_data) df2 <- round(df_data, 2) %>% as.matrix() %>% melt(., value.name = "score_min", varnames = c("var", "model")) %>% mutate (step = st) } else if (sjmisc::str_contains(source, "max", ignore.case = T)) { df_models <- round(df[, 3:4], 2) %>% dplyr::rename (mean_max = mean_null, rand_max = random_null) df_models$var = rownames(df_data) df2 <- round(df_data, 2) %>% as.matrix() %>% melt(., value.name = "score_max", varnames = c("var", "model")) %>% mutate (step = st) } else { df_models <- round(df[, 3:4], 2) %>% dplyr::rename (mean_raw = mean_null, rand_raw = random_null) df_models$var = rownames(df_data) df2 <- round(df_data, 2) %>% as.matrix() %>% melt(., value.name = "score_raw", varnames = c("var", "model")) %>% mutate (step = st) } # merge all steps/sources with rbind if (st == 1) { data <- df2 df_mod <- df_models %>% mutate (step = st) } else { data <- rbind (data, df2) df_mod <- rbind(df_mod, df_models %>% mutate (step = st)) } } data <- join( data, df_mod, by = c("var", "step") , type = "left", match = "all" ) assign(paste("data", source, region, sep = "_"), data) } } #rm(list=ls(pattern="^df")) # clean environment #refs_ls <- c("B", "CL") ##### ASSIGN COLOURS FOR EACH SCORE (see plot legend) ################################################################################ refs <- "CL" # min/max already used. #for (refs in refs_ls) {} # loop needed if more than one source (ie B and CL) for (region in region_ls$reg_name) { data <- join( get(paste ("data", refs, "max", region, sep = "_")) %>% dplyr::select (var, model, step, score_max), get(paste ("data", refs, "min", region, sep = "_")) %>% dplyr::select (var, model, step, score_min), by = c("var", "model", "step") ,type = "left",match = "all") %>% join (., get(paste ("data", refs, region, sep = "_")) %>% dplyr::select (var, model, step, mean_raw, rand_raw, score_raw), by = c("var", "model", "step") , type = "left",match = "all") %>% mutate (min = pmin(score_max, score_raw, score_min), max = pmax(score_max, score_raw, score_min)) %>% dplyr::select (var, model, step, mean_raw, rand_raw, score_raw, min, max) %>% dplyr::rename (mean_null = mean_raw, rand_null = rand_raw, val = score_raw) %>% mutate (z_val = NA,z_min = NA,z_max = NA) #assign values for colours for (k in 1:dim(data)[1]) { rand <- data$rand_null[k] mn <- data$mean_null[k] y <- data[k, (ncol(data) - 5):(ncol(data) - 3)] x <- data[k, (ncol(data) - 2):ncol(data)] # x [(condition == TRUE),] <- 1 x [, ((y <= mn - ((25 / 100) * mn)) == TRUE)] <- 1 x [, ((y > mn - ((25 / 100) * mn) & y <= mn) == TRUE)] <- 2 x [, ((y > mn & y < rand) == TRUE)] <- 3 x [, ((y >= rand) == TRUE)] <- 4 data[k, (ncol(data) - 2):ncol(data)] <- x } rm(ls="x","y", "mn", "k", "rand") # are ranges overlapping -> not significant???? if so, convert z back to NA # Use DescTools::Overlap # steps are cumulative (1 to 2 and then 2 to 3) data <- data %>% mutate (sig = NA) for (k in 1:dim(data)[1]) { if (data[k, "step"] == 1) { int2 <- data %>% filter (step == 2, var == data[k, "var"], model == data[k, "model"]) data[which(data$step == 2)[which(data$step == 2) %in% which(data$var == data[k, "var"] & data$model == data[k, "model"])], "sig"] <- c(data[k, "min"], data[k, "max"]) %overlaps% c(int2[, "min"], int2[, "max"]) rm(ls = "int2") } else if (data[k, "step"] == 2) { int3 <- data %>% filter (step == 3, var == data[k, "var"], model == data[k, "model"]) data[which(data$step == 3)[which(data$step == 3) %in% which(data$var == data[k, "var"] & data$model == data[k, "model"])], "sig"] <- c(data[k, "min"], data[k, "max"]) %overlaps% c(int3[, "min"], int3[, "max"]) rm(ls = "int3") } } rm(ls="k") assign(paste ("df", refs, region, sep = "_"), data) } rm(ls="st", "source", "region") variab_ls <- as.character(unique(data$var)) model_ls <- as.character(unique (data$model)) rm(list=ls(pattern="^data")) # clean environment ##### APPLY SIGNIFICANCE TO THE COLOURING, CREATE AND SAVE PLOT ############## # choose wich scores to colour and scores to remain white acc to significance #for (refs in refs_ls){} # loop needed only if more than one source (ie B and CL) for (region in region_ls$reg_name) { data <- get (paste ("df", refs, region, sep = "_")) data[which(data$sig == FALSE), "sig"] <- 999 data[which(data$sig == 1), "sig"] <- 0 data[which(data$sig == 999), "sig"] <- 1 data$sig <- as.logical (data$sig) filename_output_jpeg <- paste (plotpath,"DM_scores/", refs, "_", region, "_scores_plot.jpg", sep = "") for (mod in model_ls) { for (variab in variab_ls) { x <- data[which(data$var == variab & data$model == mod),] # 1a. signif change in scores from st2 to st3 if (x[which(x$step == 3), "sig"]) { # different category towards better -> pass1 = TRUE if (x[which(x$step == 3), "z_val"] >= x[which(x$step == 2), "z_val"]) { # remove colour for scores not changing categ significantly data[which(data$var == variab & data$model == mod & data$step == 3), "z_val"] <- 5 } } # 1b. signif change in scores from st1 to st2 if (x[which(x$step == 2), "sig"]) { # different category towards better -> pass1 = TRUE if (x[which(x$step == 2), "z_val"] >= x[which(x$step == 1), "z_val"]) { # remove colour for scores not changing categ significantly data[which(data$var == variab & data$model == mod & data$step == 2), "z_val"] <- 5 } } # 2.No significant change from st1 to st2 if (x[which(x$step == 2), "sig"] == FALSE) { # -> convert z_val in step 2 to NA data[which(data$var == variab & data$model == mod & data$step == 2), "z_val"] <- 5 } # 3.No significant change from st2 to st3 if (x[which(x$step == 3), "sig"] == FALSE) { # -> convert z_val in step 2 to NA data[which(data$var == variab & data$model == mod & data$step == 3), "z_val"] <- 5 } rm ("x") } } #here whe have a data file with NA in z_val for changes that are not significant # matrixplot is a function in functions_source.R fig <- ggarrange ( matrixplot(1) + rremove("x.text"), matrixplot(2) + rremove("x.text"), matrixplot(3), ncol = 1, common.legend = TRUE, legend = "top" ) fig <- annotate_figure(fig, top = text_grob( paste ("Target: ", refs, ". Region: ", region, sep = ""), color = "black", face = "bold", size = 16 )) ggsave(fig, file = filename_output_jpeg, width = 12, height = 13) } graphics.off()
#set working directory and load packages setwd("C:/temp/noncanonical_amino_acids_r_processing/protein_and_peptide") library(tidyverse) #load and filter MQ output files untagged <- read.delim("proteinGroupsUntagged.txt", stringsAsFactors = F) aha_e <- read.delim("proteinGroupsEnrichedAHA.txt", stringsAsFactors = F) aha_u <- read.delim("proteinGroupsunenrichedAHA.txt", stringsAsFactors = F) hpg_e <- read.delim("proteinGroupsEnrichedHPG.txt", stringsAsFactors = F) hpg_u <- read.delim("proteinGroupsUnenrichedHPG.txt", stringsAsFactors = F) #clean and tidy data untagged_low_conf <- untagged %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.19.45.01 > 0 & Intensity.NT.19.45.04 > 0) | (Intensity.NT.19.45.01 > 0 & Intensity.NT.19.45.07 > 0) | (Intensity.NT.19.45.04 > 0 & Intensity.NT.19.45.07 > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) aha_e_low_conf <- aha_e %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.20.92.2A > 0 & Intensity.NT.20.21.23A > 0) | (Intensity.NT.20.92.2A > 0 & Intensity.NT.20.21.24A > 0) | (Intensity.NT.20.21.23A > 0 & Intensity.NT.20.21.24A > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) aha_u_low_conf <- aha_u %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.19.47.1 > 0 & Intensity.NT.19.47.4 > 0) | (Intensity.NT.19.47.1 > 0 & Intensity.NT.19.47.7 > 0) | (Intensity.NT.19.47.4 > 0 & Intensity.NT.19.47.7 > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) hpg_e_low_conf <- hpg_e %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.20.21.25A > 0 & Intensity.NT.20.21.26A > 0) | (Intensity.NT.20.21.25A > 0 & Intensity.NT.20.21.27A > 0) | (Intensity.NT.20.21.26A > 0 & Intensity.NT.20.21.27A > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) hpg_u_low_conf <- hpg_u %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.19.47.10 > 0 & Intensity.NT.19.47.13 > 0) | (Intensity.NT.19.47.10 > 0 & Intensity.NT.19.47.16 > 0) | (Intensity.NT.19.47.13 > 0 & Intensity.NT.19.47.16 > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) #make one low confidence protein df and then turn it into a vector, splitting protein groups into idividual IDs low_conf <- rbind(aha_e_low_conf, aha_u_low_conf, hpg_e_low_conf, hpg_u_low_conf, untagged_low_conf) write_csv(low_conf, "low_confidence_proteins_combined.csv") #the low confidence list is manually curated to find if the low confidence proteins were identified in any other analysis #the resulting curated list is read back in as low_conf2 and used to make a vector which can be used to filter the relevant tables low_conf2 <- read_csv("low_confidence_proteins_combined_2.csv") l <- strsplit(as.character(low_conf2$Protein.IDs), ';') low_conf_V <- unique(unlist(l)) #make sure the high confidence protein list doesn't contain any low confidence proteins high_conf <- read_csv("high_confidence_proteins.csv") %>% filter(prot %in% low_conf_V) #make sure the HPG labelled protein list doesn't contain any low confidence proteins hLabelled4 <- filter(hLabelled3, prot %in% low_conf_V) #find the low confidence proteins in the supp tables so they can be lablled as such S2 <- read_csv("S2.csv") %>% filter(str_detect(`Protein group`, paste(low_conf_V, collapse = "|"))) S3 <- read_csv("S3.csv") %>% filter(str_detect(`Protein group`, paste(low_conf_V, collapse = "|"))) S4 <- read_csv("S4.csv") %>% filter(firstID %in% low_conf_V) S5 <- read_csv("S5.csv") %>% filter(firstID %in% low_conf_V) S6 <- read_csv("S6.csv") %>% filter(prot %in% low_conf_V) S10 <- read_csv("S10.csv") %>% filter(firstID %in% low_conf_V)
/only_modified_peptides.R
no_license
ndtivendale/ncaa
R
false
false
4,105
r
#set working directory and load packages setwd("C:/temp/noncanonical_amino_acids_r_processing/protein_and_peptide") library(tidyverse) #load and filter MQ output files untagged <- read.delim("proteinGroupsUntagged.txt", stringsAsFactors = F) aha_e <- read.delim("proteinGroupsEnrichedAHA.txt", stringsAsFactors = F) aha_u <- read.delim("proteinGroupsunenrichedAHA.txt", stringsAsFactors = F) hpg_e <- read.delim("proteinGroupsEnrichedHPG.txt", stringsAsFactors = F) hpg_u <- read.delim("proteinGroupsUnenrichedHPG.txt", stringsAsFactors = F) #clean and tidy data untagged_low_conf <- untagged %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.19.45.01 > 0 & Intensity.NT.19.45.04 > 0) | (Intensity.NT.19.45.01 > 0 & Intensity.NT.19.45.07 > 0) | (Intensity.NT.19.45.04 > 0 & Intensity.NT.19.45.07 > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) aha_e_low_conf <- aha_e %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.20.92.2A > 0 & Intensity.NT.20.21.23A > 0) | (Intensity.NT.20.92.2A > 0 & Intensity.NT.20.21.24A > 0) | (Intensity.NT.20.21.23A > 0 & Intensity.NT.20.21.24A > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) aha_u_low_conf <- aha_u %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.19.47.1 > 0 & Intensity.NT.19.47.4 > 0) | (Intensity.NT.19.47.1 > 0 & Intensity.NT.19.47.7 > 0) | (Intensity.NT.19.47.4 > 0 & Intensity.NT.19.47.7 > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) hpg_e_low_conf <- hpg_e %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.20.21.25A > 0 & Intensity.NT.20.21.26A > 0) | (Intensity.NT.20.21.25A > 0 & Intensity.NT.20.21.27A > 0) | (Intensity.NT.20.21.26A > 0 & Intensity.NT.20.21.27A > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) hpg_u_low_conf <- hpg_u %>% filter(Reverse != "+" & Potential.contaminant != "+") %>% filter((Intensity.NT.19.47.10 > 0 & Intensity.NT.19.47.13 > 0) | (Intensity.NT.19.47.10 > 0 & Intensity.NT.19.47.16 > 0) | (Intensity.NT.19.47.13 > 0 & Intensity.NT.19.47.16 > 0)) %>% filter(Score < 0) %>% select(c("Protein.IDs", "Score", "Q.value", "Only.identified.by.site")) #make one low confidence protein df and then turn it into a vector, splitting protein groups into idividual IDs low_conf <- rbind(aha_e_low_conf, aha_u_low_conf, hpg_e_low_conf, hpg_u_low_conf, untagged_low_conf) write_csv(low_conf, "low_confidence_proteins_combined.csv") #the low confidence list is manually curated to find if the low confidence proteins were identified in any other analysis #the resulting curated list is read back in as low_conf2 and used to make a vector which can be used to filter the relevant tables low_conf2 <- read_csv("low_confidence_proteins_combined_2.csv") l <- strsplit(as.character(low_conf2$Protein.IDs), ';') low_conf_V <- unique(unlist(l)) #make sure the high confidence protein list doesn't contain any low confidence proteins high_conf <- read_csv("high_confidence_proteins.csv") %>% filter(prot %in% low_conf_V) #make sure the HPG labelled protein list doesn't contain any low confidence proteins hLabelled4 <- filter(hLabelled3, prot %in% low_conf_V) #find the low confidence proteins in the supp tables so they can be lablled as such S2 <- read_csv("S2.csv") %>% filter(str_detect(`Protein group`, paste(low_conf_V, collapse = "|"))) S3 <- read_csv("S3.csv") %>% filter(str_detect(`Protein group`, paste(low_conf_V, collapse = "|"))) S4 <- read_csv("S4.csv") %>% filter(firstID %in% low_conf_V) S5 <- read_csv("S5.csv") %>% filter(firstID %in% low_conf_V) S6 <- read_csv("S6.csv") %>% filter(prot %in% low_conf_V) S10 <- read_csv("S10.csv") %>% filter(firstID %in% low_conf_V)
##################################################################################### # Script id: 15 # Description: This script creates the coefficient plot of the main results # Author: GIGA team # Last update: 24.04.2021 ##################################################################################### ##-- Libraries rm(list = ls()) library(dplyr) library(lmtest) library(sandwich) library(ggplot2) library(tidyr) library(mfx) library(sampleSelection) library(broom) library(socviz) load("C:/Users/Stefano/Desktop/GIGA_Project/Data_for_analysis.RData") ##---- PROBIT FIRST PANEL EVALUATION ---- # Estimation mod_1st <- probitmfx(Grant ~ Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_prox_team + Blau_index_team + Network_team_panel + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_ratio_panel + Publication_stock_log_panel + Panel_size_log + Age_log_panel + Project_panel_ratio_log + Shanghai_top100_ratio_panel + Domain + ProjectYear, data = dat_1st, robust = T, clustervar1 = "Scheme") # Formating out_conf <- tidy(mod_1st, conf.int = TRUE) out_conf %>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Cognitive_dist_team", "Blau_index_team", "Network_team_panel", "Shanghai_top100_team", "Already_success_past_team", "Number_countries_log", "Panel_size_log", "Project_panel_ratio_log")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Cognitive_dist_team", "Cognitive Proximity", ifelse(term == "Blau_index_team", "Research Diversity", ifelse(term == "Network_team_panel", "Network Proximity", ifelse(term == "Shanghai_top100_team", "Shanghai Ranking", ifelse(term == "Already_success_past_team", "Past EUROCORES Grant", ifelse(term == "Number_countries_log", "Number of Countries", ifelse(term == "Panel_size_log", "Panel Size", "Panel Workload"))))))))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "1st Stage" p_1st <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) ##---- REVIEWERS EVALUATION (SCORES) ---- # Model 1st stage mod2 <- glm(Grant ~ Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_prox_team + Blau_index_team + Network_team_panel + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_ratio_panel + Publication_stock_log_panel + Panel_size_log + Age_log_panel + Project_panel_ratio_log + Shanghai_top100_ratio_panel + Domain + ProjectYear, family = binomial( link = "probit" ), data = dat_1st) dat_1st$IMR1_mod2 <- invMillsRatio(mod2)$IMR1 # Get Inverse Mill's Ratio mills_ratio <- dat_1st %>% dplyr::select(ProjectNumber_FP, IMR1_mod2) dat_2nd <- left_join(dat_2nd, mills_ratio, by = c("ProjectNumber_FP")) # Estimation mod_2nd <- lm(Qavg ~ IMR1_mod2 + Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_prox_team_reviewers + Blau_index_team + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_reviewers + Publication_stock_log_reviewers + Age_log_reviewers + Shanghai_top100_reviewers + Domain + ProjectYear + Scheme, dat = dat_2nd) mod_2nd <- coeftest(mod_2nd, vcov=vcovHC(mod_2nd, type = "HC0", cluster = "Scheme")) # Formating out_conf <- tidy(mod_2nd, conf.int = TRUE) out_conf%>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Publication_stock_log_team", "Star_scientist_99_team", "Cognitive_dist_team_reviewers", "Publication_stock_log_reviewers")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Star_scientist_99_team", "Star Scientist", ifelse(term == "Publication_stock_log_team", "Productivity", ifelse(term == "Cognitive_dist_team_reviewers", "Cognitive Proximity", "Productivity Reviewer"))))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "2nd Stage [Scores]" p_2nd <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) ##---- REVIEWERS EVALUATION (SENTIMENTS) ---- # Estimation mod_2nd <- lm(vader ~ IMR1_mod2 + Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_dist_team_reviewers + Blau_index_team + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_reviewers + Publication_stock_log_reviewers + Age_log_reviewers + Shanghai_top100_reviewers + Domain + ProjectYear + Scheme, dat = dat_2nd) mod_2nd <- coeftest(mod_2nd, vcov=vcovHC(mod_2nd, type = "HC0", cluster = "Scheme")) # Formating out_conf <- tidy(mod_2nd, conf.int = TRUE) out_conf %>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Publication_stock_log_reviewers", "Age_log_reviewers")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Publication_stock_log_reviewers", "Productivity Reviewer", "Age Reviewer"))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "2nd Stage [Sentim.]" p_2nd_sent <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) ##---- PROBIT SECOND PANEL EVALUATION ---- # Estimation mod_3rd <- probitmfx(ESFDecision ~ Female_ratio + Gender_balanced_team + Qavg_reviewers_mean + Qavg_reviewers_var + Publication_stock_log_team + Star_scientist_99_team + Cognitive_dist_team + Blau_index_team + Network_team_panel + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_ratio_panel + Publication_stock_log_panel + Panel_size_log + Age_log_panel + Project_panel_ratio_log + Shanghai_top100_ratio_panel + Domain + ProjectYear, data = dat_3rd, robust = T, clustervar1 = "Scheme") # Formating out_conf <- tidy(mod_3rd, conf.int = TRUE) out_conf %>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Qavg_reviewers_mean", "Network_team_panel", "Panel_size_log", "Project_panel_ratio_log")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Qavg_reviewers_mean", "Reviewers Scores", ifelse(term == "Network_team_panel", "Network Proximity", ifelse(term == "Panel_size_log", "Panel Size", "Panel Workload"))))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "3rd Stage" p_3rd <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) # Attach the four plots require(gridExtra) grid.arrange(p_1st, p_2nd, p_2nd_sent, p_3rd, ncol=4)
/Codes_gitHub/5.Statistical_Analysis/ID15_Plot_Coefficients.R
no_license
merlino-sb/GIGA-Gender-Bias-in-Grant-Allocation-
R
false
false
9,929
r
##################################################################################### # Script id: 15 # Description: This script creates the coefficient plot of the main results # Author: GIGA team # Last update: 24.04.2021 ##################################################################################### ##-- Libraries rm(list = ls()) library(dplyr) library(lmtest) library(sandwich) library(ggplot2) library(tidyr) library(mfx) library(sampleSelection) library(broom) library(socviz) load("C:/Users/Stefano/Desktop/GIGA_Project/Data_for_analysis.RData") ##---- PROBIT FIRST PANEL EVALUATION ---- # Estimation mod_1st <- probitmfx(Grant ~ Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_prox_team + Blau_index_team + Network_team_panel + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_ratio_panel + Publication_stock_log_panel + Panel_size_log + Age_log_panel + Project_panel_ratio_log + Shanghai_top100_ratio_panel + Domain + ProjectYear, data = dat_1st, robust = T, clustervar1 = "Scheme") # Formating out_conf <- tidy(mod_1st, conf.int = TRUE) out_conf %>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Cognitive_dist_team", "Blau_index_team", "Network_team_panel", "Shanghai_top100_team", "Already_success_past_team", "Number_countries_log", "Panel_size_log", "Project_panel_ratio_log")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Cognitive_dist_team", "Cognitive Proximity", ifelse(term == "Blau_index_team", "Research Diversity", ifelse(term == "Network_team_panel", "Network Proximity", ifelse(term == "Shanghai_top100_team", "Shanghai Ranking", ifelse(term == "Already_success_past_team", "Past EUROCORES Grant", ifelse(term == "Number_countries_log", "Number of Countries", ifelse(term == "Panel_size_log", "Panel Size", "Panel Workload"))))))))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "1st Stage" p_1st <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) ##---- REVIEWERS EVALUATION (SCORES) ---- # Model 1st stage mod2 <- glm(Grant ~ Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_prox_team + Blau_index_team + Network_team_panel + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_ratio_panel + Publication_stock_log_panel + Panel_size_log + Age_log_panel + Project_panel_ratio_log + Shanghai_top100_ratio_panel + Domain + ProjectYear, family = binomial( link = "probit" ), data = dat_1st) dat_1st$IMR1_mod2 <- invMillsRatio(mod2)$IMR1 # Get Inverse Mill's Ratio mills_ratio <- dat_1st %>% dplyr::select(ProjectNumber_FP, IMR1_mod2) dat_2nd <- left_join(dat_2nd, mills_ratio, by = c("ProjectNumber_FP")) # Estimation mod_2nd <- lm(Qavg ~ IMR1_mod2 + Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_prox_team_reviewers + Blau_index_team + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_reviewers + Publication_stock_log_reviewers + Age_log_reviewers + Shanghai_top100_reviewers + Domain + ProjectYear + Scheme, dat = dat_2nd) mod_2nd <- coeftest(mod_2nd, vcov=vcovHC(mod_2nd, type = "HC0", cluster = "Scheme")) # Formating out_conf <- tidy(mod_2nd, conf.int = TRUE) out_conf%>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Publication_stock_log_team", "Star_scientist_99_team", "Cognitive_dist_team_reviewers", "Publication_stock_log_reviewers")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Star_scientist_99_team", "Star Scientist", ifelse(term == "Publication_stock_log_team", "Productivity", ifelse(term == "Cognitive_dist_team_reviewers", "Cognitive Proximity", "Productivity Reviewer"))))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "2nd Stage [Scores]" p_2nd <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) ##---- REVIEWERS EVALUATION (SENTIMENTS) ---- # Estimation mod_2nd <- lm(vader ~ IMR1_mod2 + Female_ratio + Gender_balanced_team + Publication_stock_log_team + Star_scientist_99_team + Cognitive_dist_team_reviewers + Blau_index_team + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_reviewers + Publication_stock_log_reviewers + Age_log_reviewers + Shanghai_top100_reviewers + Domain + ProjectYear + Scheme, dat = dat_2nd) mod_2nd <- coeftest(mod_2nd, vcov=vcovHC(mod_2nd, type = "HC0", cluster = "Scheme")) # Formating out_conf <- tidy(mod_2nd, conf.int = TRUE) out_conf %>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Publication_stock_log_reviewers", "Age_log_reviewers")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Publication_stock_log_reviewers", "Productivity Reviewer", "Age Reviewer"))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "2nd Stage [Sentim.]" p_2nd_sent <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) ##---- PROBIT SECOND PANEL EVALUATION ---- # Estimation mod_3rd <- probitmfx(ESFDecision ~ Female_ratio + Gender_balanced_team + Qavg_reviewers_mean + Qavg_reviewers_var + Publication_stock_log_team + Star_scientist_99_team + Cognitive_dist_team + Blau_index_team + Network_team_panel + Team_size_log + Age_log_team + Shanghai_top100_team + Company_team + Already_success_past_team + BudgetR_per_indiv_log + Number_countries_log + Female_ratio_panel + Publication_stock_log_panel + Panel_size_log + Age_log_panel + Project_panel_ratio_log + Shanghai_top100_ratio_panel + Domain + ProjectYear, data = dat_3rd, robust = T, clustervar1 = "Scheme") # Formating out_conf <- tidy(mod_3rd, conf.int = TRUE) out_conf %>% round_df() # Keep significant variables out_conf <- subset(out_conf, term %in% c("Female_ratio", "Qavg_reviewers_mean", "Network_team_panel", "Panel_size_log", "Project_panel_ratio_log")) # Change labels out_conf <- out_conf %>% mutate(term = ifelse(term == "Female_ratio", "Female Ratio", ifelse(term == "Qavg_reviewers_mean", "Reviewers Scores", ifelse(term == "Network_team_panel", "Network Proximity", ifelse(term == "Panel_size_log", "Panel Size", "Panel Workload"))))) # Create the plot out_conf$nicelabs <- prefix_strip(out_conf$term, "continent") out_conf$title <- "3rd Stage" p_3rd <- ggplot(out_conf, mapping = aes(x = reorder(nicelabs, estimate), y = estimate, ymin = conf.low, ymax = conf.high)) + geom_pointrange(width=0.2, size=1, color="black", fill="orange", shape=22) + coord_flip() + labs(x="", y= "") + geom_hline(yintercept = 0, linetype ="dashed", color ="gray", size=1) + facet_grid(. ~ title) + theme_bw() + theme(legend.title=element_blank(), legend.text=element_text(size=25), text = element_text(size = 25), strip.background = element_rect(fill="azure2")) # Attach the four plots require(gridExtra) grid.arrange(p_1st, p_2nd, p_2nd_sent, p_3rd, ncol=4)
# Bayesian SVM, kernel version. # Created: "Tue Dec 11 09:23:31 2018" #+-----------Kernel function---------------+ # Input: tau: smoothness parameter; X: n by p matrix, original space; # Y: m by p matrix # Output: n-dim vector gaussian_kernel <- function(tau, X, Y){ n <- dim(X)[1] p <- dim(X)[2] f <- function(x,y) exp(-tau/(n*p)^2* t(x-y)%*%(x-y)) outer( 1:nrow(Y), 1:nrow(X), Vectorize( function(j,i) f(Y[j,], X[i,]) ) ) } #+-----------Gibbs sampler---------------+ #Input: X: data matrix; y: labels; B: number of iterations # tau: kernel parameter; lambda: prior smoothness parameter #Output: posterior samples bayes_svm_gibbs <- function(X, y, B = 5000, lambda = 1, tau = 2){ n <- dim(X)[1] #initialization beta0 <- rep(0, n) v0 <- rep(1, n) # beta <- beta0 # dim-n v <- v0 # dim-n library(statmod) # Inverse gaussian library(mvtnorm) # multi-normal # iteration tracker b <- 1 BETA <- matrix(nrow = B, ncol = n) K <- gaussian_kernel(tau, X, X) #dim n by n while(T){ Z <- y*K/sqrt(v) #dim n by n w <- (1+v)/sqrt(v) # dim-n cov_mat <- solve(t(Z)%*%Z+lambda*diag(1, nrow = n)) #dim n by n mean_vec <- cov_mat%*%t(Z)%*%w # dim-n # update beta beta <- as.numeric(rmvnorm( 1, mean_vec, cov_mat)) # update v invgauss_mean <- 1/abs(1-y*K%*%beta) v <- 1/rinvgauss(n, invgauss_mean,dispersion = 1) # dim-n # Output BETA[b,] <- beta # Control flow b <- b + 1 # if (b%%10 == 0) cat(b,'~') if (b>B) break } BETA[-(1:1000),] # Burning } #+----------------Data processing-------------+ library(SIS) data("leukemia.train") data("leukemia.test") X <- as.matrix(leukemia.train[,1:7129]) y <- leukemia.train[,7130] y <- ifelse(y==0, 1, -1 ) #+-----------------------------------------+ # Question (a) hyper_mat <- matrix(c(1,2,1,0.5,10,2,10,0.5), nrow = 4, byrow = T) post_mean <- NULL post_var <- NULL for (i in 1:4){ BETA_post <- bayes_svm_gibbs(X, y, lambda = hyper_mat[i,1], tau = hyper_mat[i,2], B = 5000) post_mean <- rbind(post_mean, apply(BETA_post,2, mean)) post_var <- rbind(post_var, apply(BETA_post,2, var) ) } # xtable::xtable(cbind(t(post_mean),t(post_var))) #+--------Question (b)-----------------+ X_test <- as.matrix(leukemia.test[,1:7129]) y_test_01 <- leukemia.test[,7130] y_test <- ifelse(y_test_01==0, 1, -1 ) hyper_mat <- matrix(c(1,2, 1,0.5, 10,2, 10,0.5), nrow = 4, byrow = T) y_pred <- NULL for (i in 1:4){ BETA_post <- bayes_svm_gibbs(X, y, lambda = hyper_mat[i,1], tau = hyper_mat[i,2], B = 5000) K_new <- gaussian_kernel(hyper_mat[i,2], X, X_test) PRED_MAT <- BETA_post%*%t(K_new) y_pred <- rbind(y_pred, apply(PRED_MAT, 2, function(x) ifelse(mean(x>0)>0.5, 1, -1))) } for (i in 1:4){ y_predict <- factor(y_pred[i,], levels = c('-1', '1')) y_true <- factor(y_test, levels = c('-1', '1')) print(table(y_predict, y_true)) } #+-------------- Question (c)----------------+ hyper_mat <- matrix(c(0.1, 2, 0.1, 4, 0.05, 2, 0.05, 4), nrow = 4, byrow = T) y_pred <- NULL for (i in 1:4){ BETA_post <- bayes_svm_gibbs(X, y, lambda = hyper_mat[i,1], tau = hyper_mat[i,2], B = 5000) K_new <- gaussian_kernel(hyper_mat[i,2], X, X_test) PRED_MAT <- BETA_post%*%t(K_new) y_pred <- rbind(y_pred, apply(PRED_MAT, 2, function(x) ifelse(mean(x>0)>0.5, 1, -1))) } for (i in 1:4){ y_predict <- factor(y_pred[i,], levels = c('-1', '1')) y_true <- factor(y_test, levels = c('-1', '1')) print(table(y_predict, y_true)) } # library(MLmetrics) # Specificity(y_true, y_predict) # Sensitivity(y_true, y_predict) # F1_Score(y_true = y_true, y_pred = y_predict )
/BayesianSVM.R
no_license
HuaiyuZhang/BayesianMethod
R
false
false
3,868
r
# Bayesian SVM, kernel version. # Created: "Tue Dec 11 09:23:31 2018" #+-----------Kernel function---------------+ # Input: tau: smoothness parameter; X: n by p matrix, original space; # Y: m by p matrix # Output: n-dim vector gaussian_kernel <- function(tau, X, Y){ n <- dim(X)[1] p <- dim(X)[2] f <- function(x,y) exp(-tau/(n*p)^2* t(x-y)%*%(x-y)) outer( 1:nrow(Y), 1:nrow(X), Vectorize( function(j,i) f(Y[j,], X[i,]) ) ) } #+-----------Gibbs sampler---------------+ #Input: X: data matrix; y: labels; B: number of iterations # tau: kernel parameter; lambda: prior smoothness parameter #Output: posterior samples bayes_svm_gibbs <- function(X, y, B = 5000, lambda = 1, tau = 2){ n <- dim(X)[1] #initialization beta0 <- rep(0, n) v0 <- rep(1, n) # beta <- beta0 # dim-n v <- v0 # dim-n library(statmod) # Inverse gaussian library(mvtnorm) # multi-normal # iteration tracker b <- 1 BETA <- matrix(nrow = B, ncol = n) K <- gaussian_kernel(tau, X, X) #dim n by n while(T){ Z <- y*K/sqrt(v) #dim n by n w <- (1+v)/sqrt(v) # dim-n cov_mat <- solve(t(Z)%*%Z+lambda*diag(1, nrow = n)) #dim n by n mean_vec <- cov_mat%*%t(Z)%*%w # dim-n # update beta beta <- as.numeric(rmvnorm( 1, mean_vec, cov_mat)) # update v invgauss_mean <- 1/abs(1-y*K%*%beta) v <- 1/rinvgauss(n, invgauss_mean,dispersion = 1) # dim-n # Output BETA[b,] <- beta # Control flow b <- b + 1 # if (b%%10 == 0) cat(b,'~') if (b>B) break } BETA[-(1:1000),] # Burning } #+----------------Data processing-------------+ library(SIS) data("leukemia.train") data("leukemia.test") X <- as.matrix(leukemia.train[,1:7129]) y <- leukemia.train[,7130] y <- ifelse(y==0, 1, -1 ) #+-----------------------------------------+ # Question (a) hyper_mat <- matrix(c(1,2,1,0.5,10,2,10,0.5), nrow = 4, byrow = T) post_mean <- NULL post_var <- NULL for (i in 1:4){ BETA_post <- bayes_svm_gibbs(X, y, lambda = hyper_mat[i,1], tau = hyper_mat[i,2], B = 5000) post_mean <- rbind(post_mean, apply(BETA_post,2, mean)) post_var <- rbind(post_var, apply(BETA_post,2, var) ) } # xtable::xtable(cbind(t(post_mean),t(post_var))) #+--------Question (b)-----------------+ X_test <- as.matrix(leukemia.test[,1:7129]) y_test_01 <- leukemia.test[,7130] y_test <- ifelse(y_test_01==0, 1, -1 ) hyper_mat <- matrix(c(1,2, 1,0.5, 10,2, 10,0.5), nrow = 4, byrow = T) y_pred <- NULL for (i in 1:4){ BETA_post <- bayes_svm_gibbs(X, y, lambda = hyper_mat[i,1], tau = hyper_mat[i,2], B = 5000) K_new <- gaussian_kernel(hyper_mat[i,2], X, X_test) PRED_MAT <- BETA_post%*%t(K_new) y_pred <- rbind(y_pred, apply(PRED_MAT, 2, function(x) ifelse(mean(x>0)>0.5, 1, -1))) } for (i in 1:4){ y_predict <- factor(y_pred[i,], levels = c('-1', '1')) y_true <- factor(y_test, levels = c('-1', '1')) print(table(y_predict, y_true)) } #+-------------- Question (c)----------------+ hyper_mat <- matrix(c(0.1, 2, 0.1, 4, 0.05, 2, 0.05, 4), nrow = 4, byrow = T) y_pred <- NULL for (i in 1:4){ BETA_post <- bayes_svm_gibbs(X, y, lambda = hyper_mat[i,1], tau = hyper_mat[i,2], B = 5000) K_new <- gaussian_kernel(hyper_mat[i,2], X, X_test) PRED_MAT <- BETA_post%*%t(K_new) y_pred <- rbind(y_pred, apply(PRED_MAT, 2, function(x) ifelse(mean(x>0)>0.5, 1, -1))) } for (i in 1:4){ y_predict <- factor(y_pred[i,], levels = c('-1', '1')) y_true <- factor(y_test, levels = c('-1', '1')) print(table(y_predict, y_true)) } # library(MLmetrics) # Specificity(y_true, y_predict) # Sensitivity(y_true, y_predict) # F1_Score(y_true = y_true, y_pred = y_predict )
## Create new file from GitHub to test.
/cachematrix.r
no_license
mayfield2018/Week3
R
false
false
41
r
## Create new file from GitHub to test.
power_consumption <- read.table("C:\\Dev Tools\\Work\\Coursera\\04_ExploratoryAnalysis\\household_power_consumption.txt", skip = 66637, nrows = 2880, header = FALSE, sep = ";", dec = ".", col.names = c("Date","Time","Global_active_power","Global_reactive_power", "Voltage","Global_intensity","Sub_metering_1","Sub_metering_2", "Sub_metering_3"), na.strings = "?" ) power_consumption$Date <- as.Date( strptime(power_consumption$Date,"%d/%m/%Y")) png("C:\\Dev Tools\\Work\\Coursera\\04_ExploratoryAnalysis\\plot1.png", width = 480, height = 480, units = "px", bg = "white") hist(power_consumption$Global_active_power, col = "Red", main = "Global Active Power", xlab = "Global Active Power (kilowatts)") dev.off()
/plot1.R
no_license
aninditode/ExData_Plotting1
R
false
false
902
r
power_consumption <- read.table("C:\\Dev Tools\\Work\\Coursera\\04_ExploratoryAnalysis\\household_power_consumption.txt", skip = 66637, nrows = 2880, header = FALSE, sep = ";", dec = ".", col.names = c("Date","Time","Global_active_power","Global_reactive_power", "Voltage","Global_intensity","Sub_metering_1","Sub_metering_2", "Sub_metering_3"), na.strings = "?" ) power_consumption$Date <- as.Date( strptime(power_consumption$Date,"%d/%m/%Y")) png("C:\\Dev Tools\\Work\\Coursera\\04_ExploratoryAnalysis\\plot1.png", width = 480, height = 480, units = "px", bg = "white") hist(power_consumption$Global_active_power, col = "Red", main = "Global Active Power", xlab = "Global Active Power (kilowatts)") dev.off()
read_fmri_mat <- function(path){ if(!require(R.matlab)){ warning('Needs R.matlab package to load the data') return(NULL) } return <- R.matlab::readMat(path) }
/functions/loading/read-fmri-mat.R
no_license
hejtmy/hcenat-fmri
R
false
false
172
r
read_fmri_mat <- function(path){ if(!require(R.matlab)){ warning('Needs R.matlab package to load the data') return(NULL) } return <- R.matlab::readMat(path) }
weighted.percentile <- function(x,w,prob,na.rm=TRUE){ df <- data.frame(x,w) if(na.rm){ df <- df[which(complete.cases(df)),] } #Sort df <- df[order(df$x),] sumw <- sum(df$w) df$cumsumw <- cumsum(df$w) #For each percentile cutList <- c() cutNames <-c() for(i in 1:length(prob)){ p <- prob[i] pStr <- paste0(round(p*100,digits=2),"%") sumwp <- sumw*p df$above.prob <- df$cumsumw>=sumwp thisCut <- df$x[which(df$above.prob==TRUE)[1]] cutList <- c(cutList,thisCut) cutNames <- c(cutNames,pStr) } names(cutList) <- cutNames return(cutList) } x <- runif(100,0,100) w <- runif(100,0,1) weighted.percentile(x,w,prob=seq(0,1,length=11))[["20%"]] weighted.percentile(x,w,prob=seq(0,1,length=11))[["50%"]]
/DevInit/R/weighted_percentile.R
no_license
akmiller01/alexm-util
R
false
false
755
r
weighted.percentile <- function(x,w,prob,na.rm=TRUE){ df <- data.frame(x,w) if(na.rm){ df <- df[which(complete.cases(df)),] } #Sort df <- df[order(df$x),] sumw <- sum(df$w) df$cumsumw <- cumsum(df$w) #For each percentile cutList <- c() cutNames <-c() for(i in 1:length(prob)){ p <- prob[i] pStr <- paste0(round(p*100,digits=2),"%") sumwp <- sumw*p df$above.prob <- df$cumsumw>=sumwp thisCut <- df$x[which(df$above.prob==TRUE)[1]] cutList <- c(cutList,thisCut) cutNames <- c(cutNames,pStr) } names(cutList) <- cutNames return(cutList) } x <- runif(100,0,100) w <- runif(100,0,1) weighted.percentile(x,w,prob=seq(0,1,length=11))[["20%"]] weighted.percentile(x,w,prob=seq(0,1,length=11))[["50%"]]
library(dplyr) vis_directionTable <- function(df, col_time) { #df_tmp <<- df #df <- df_tmp #df <- df_tmp df$vis_t_time = df[[col_time]] if (!is.numeric(df$vis_t_time)) { df <- df %>% mutate(vis_t_time = as.POSIXlt(vis_t_time, format = "%Y-%m-%d %H:%M:%OS")) hoursecs = (df$vis_t_time$hour - df$vis_t_time[1]$hour) * 60 * 60 minsecs = (df$vis_t_time$min - df$vis_t_time[1]$min) * 60 secs = (df$vis_t_time$sec - df$vis_t_time[1]$sec) df$vis_t_time = hoursecs + minsecs + secs } df_sample <- df %>% filter(Event == "Sample") # Look Summary (WorldGazeHitPositionX) df_lookbin <- df_sample %>% filter(!is.na(WorldGazeHitPositionX)) %>% mutate( looked_left_bin = ifelse(WorldGazeHitPositionX < 0,1,0), looked_left_change = ifelse(looked_left_bin != lag(looked_left_bin),1,0), looked_left_change = ifelse(is.na(looked_left_change), 0, looked_left_change), looked_left_cumsum = cumsum(looked_left_change), ) df_looktime <- df_lookbin %>% group_by(looked_left_cumsum) %>% summarise( looked_left_bin = min(looked_left_bin), looked_time_max = max(vis_t_time, na.rm=T), looked_time_min = min(vis_t_time, na.rm=T), looked_time = looked_time_max - looked_time_min ) df_looksummary <- df_looktime %>% group_by(looked_left_bin) %>% summarise( looktime = sum(looked_time) ) # Rotation Summary (HeadCameraRotEulerY) df_sample <- df_sample %>% mutate( HeadCameraRotEulerY_wrap = ifelse(HeadCameraRotEulerY >= 180, HeadCameraRotEulerY-360,HeadCameraRotEulerY) ) df_rotbin <- df_sample %>% filter(!is.na(HeadCameraRotEulerY_wrap)) %>% mutate( rotated_left_bin = ifelse(HeadCameraRotEulerY_wrap < 0,1,0), rotated_left_change = ifelse(rotated_left_bin != lag(rotated_left_bin),1,0), rotated_left_change = ifelse(is.na(rotated_left_change), 0, rotated_left_change), rotated_left_cumsum = cumsum(rotated_left_change), ) df_rottime <- df_rotbin %>% group_by(rotated_left_cumsum) %>% summarise( rotated_left_bin = min(rotated_left_bin), rotated_time_max = max(vis_t_time, na.rm=T), rotated_time_min = min(vis_t_time, na.rm=T), rotated_time = rotated_time_max - rotated_time_min ) df_rotsummary <- df_rottime %>% group_by(rotated_left_bin) %>% summarise( rottime = sum(rotated_time) ) table = data.frame(name = c("Game", "Look L", "Look R", "Rot. L", "Rot. R"), value = c(max(df$GameDuration,na.rm=T), df_looksummary$looktime[2], df_looksummary$looktime[1], df_rotsummary$rottime[1], df_rotsummary$rottime[2])) names(table) = c("Name", "Qty (secs)") # summarise( # looked_left = sum(WorldGazeHitPositionX < WallCenterX), # looked_right = sum(WorldGazeHitPositionX < WallCenterX) #) %>% View() # we measure the sampling rate. # then we count the number of occurences # then we multiply by the sampling rate #df_tmp %>% summarise( # looked_left = sum(WorldGazePositionX > Wall) #) return(table) }
/vis/vis_directiontable.R
permissive
med-material/Whack_A_Mole_RShiny
R
false
false
2,985
r
library(dplyr) vis_directionTable <- function(df, col_time) { #df_tmp <<- df #df <- df_tmp #df <- df_tmp df$vis_t_time = df[[col_time]] if (!is.numeric(df$vis_t_time)) { df <- df %>% mutate(vis_t_time = as.POSIXlt(vis_t_time, format = "%Y-%m-%d %H:%M:%OS")) hoursecs = (df$vis_t_time$hour - df$vis_t_time[1]$hour) * 60 * 60 minsecs = (df$vis_t_time$min - df$vis_t_time[1]$min) * 60 secs = (df$vis_t_time$sec - df$vis_t_time[1]$sec) df$vis_t_time = hoursecs + minsecs + secs } df_sample <- df %>% filter(Event == "Sample") # Look Summary (WorldGazeHitPositionX) df_lookbin <- df_sample %>% filter(!is.na(WorldGazeHitPositionX)) %>% mutate( looked_left_bin = ifelse(WorldGazeHitPositionX < 0,1,0), looked_left_change = ifelse(looked_left_bin != lag(looked_left_bin),1,0), looked_left_change = ifelse(is.na(looked_left_change), 0, looked_left_change), looked_left_cumsum = cumsum(looked_left_change), ) df_looktime <- df_lookbin %>% group_by(looked_left_cumsum) %>% summarise( looked_left_bin = min(looked_left_bin), looked_time_max = max(vis_t_time, na.rm=T), looked_time_min = min(vis_t_time, na.rm=T), looked_time = looked_time_max - looked_time_min ) df_looksummary <- df_looktime %>% group_by(looked_left_bin) %>% summarise( looktime = sum(looked_time) ) # Rotation Summary (HeadCameraRotEulerY) df_sample <- df_sample %>% mutate( HeadCameraRotEulerY_wrap = ifelse(HeadCameraRotEulerY >= 180, HeadCameraRotEulerY-360,HeadCameraRotEulerY) ) df_rotbin <- df_sample %>% filter(!is.na(HeadCameraRotEulerY_wrap)) %>% mutate( rotated_left_bin = ifelse(HeadCameraRotEulerY_wrap < 0,1,0), rotated_left_change = ifelse(rotated_left_bin != lag(rotated_left_bin),1,0), rotated_left_change = ifelse(is.na(rotated_left_change), 0, rotated_left_change), rotated_left_cumsum = cumsum(rotated_left_change), ) df_rottime <- df_rotbin %>% group_by(rotated_left_cumsum) %>% summarise( rotated_left_bin = min(rotated_left_bin), rotated_time_max = max(vis_t_time, na.rm=T), rotated_time_min = min(vis_t_time, na.rm=T), rotated_time = rotated_time_max - rotated_time_min ) df_rotsummary <- df_rottime %>% group_by(rotated_left_bin) %>% summarise( rottime = sum(rotated_time) ) table = data.frame(name = c("Game", "Look L", "Look R", "Rot. L", "Rot. R"), value = c(max(df$GameDuration,na.rm=T), df_looksummary$looktime[2], df_looksummary$looktime[1], df_rotsummary$rottime[1], df_rotsummary$rottime[2])) names(table) = c("Name", "Qty (secs)") # summarise( # looked_left = sum(WorldGazeHitPositionX < WallCenterX), # looked_right = sum(WorldGazeHitPositionX < WallCenterX) #) %>% View() # we measure the sampling rate. # then we count the number of occurences # then we multiply by the sampling rate #df_tmp %>% summarise( # looked_left = sum(WorldGazePositionX > Wall) #) return(table) }
library(BioMark) ### Name: spikedApples ### Title: Metabolomics data on spiked apples ### Aliases: spikedApples ### Keywords: datasets ### ** Examples data(spikedApples) ## show features identified in all apples plot(spikedApples$rt, spikedApples$mz, xlab = "Retention time (s)", ylab = "m/z", main = "Spiked apples - subset")
/data/genthat_extracted_code/BioMark/examples/spikedApples.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
344
r
library(BioMark) ### Name: spikedApples ### Title: Metabolomics data on spiked apples ### Aliases: spikedApples ### Keywords: datasets ### ** Examples data(spikedApples) ## show features identified in all apples plot(spikedApples$rt, spikedApples$mz, xlab = "Retention time (s)", ylab = "m/z", main = "Spiked apples - subset")
#' Creates a markdown document to validate linear model assumptions #' #' #' Creates a markdown document for a (named) list of linear model validations from verif_lm() function output. #' @param verif_lm_list A list object including either the result or a (named) list #' of multiple results from the verif_lm() function. #' @param mkd_path Path to the folder, where the markdown document should be stored. #' If NULL, the current path will be used. #' @param open Should the HTML output be opened immediately after saving? Default is FALSE. #' @param overwrite Should an already existing file be overwritten? Default is TRUE. #' @return Save a HTML document without returning anything. #' @details This function is also used within the verif_lm() function. #' @author Dennis Freuer #' @export #' mkd_lm_verif <- function(verif_lm_list, mkd_path=NULL, open=FALSE, overwrite=TRUE){ if(sum(names(verif_lm_list) %in% c("test_summary","plot_resid","mdl")) == 3){ verif_lm_list <- list("Regression model"=verif_lm_list) } mo <- c('--- title: "Linear regression assumptions" output: html_document --- ```{r setup, include=FALSE, message=FALSE, warning=FALSE} knitr::opts_chunk$set(echo = FALSE) ``` ```{r results="asis"} require(gridExtra) require(pander) panderOptions("table.split.table", Inf) cnt <- 1 for(i in 1:length(verif_lm_list)){ cat(paste0("## ", cnt, ". ", names(verif_lm_list)[i])) r <- verif_lm_list[[i]] cat("\\nModel:", paste(formula(r$mdl)[2],"~",formula(r$mdl)[3]), "\\n") cat(pander(r$gof, style = "rmarkdown"), " ") cat(pander(r$test_summary[1:4,], style = "rmarkdown"), " ") grid.arrange(r$plot_resid[[1]], r$plot_resid[[2]], r$plot_hist, r$plot_resid[[3]], r$plot_resid[[4]], r$plot_resid[[6]], nrow=2) cat(". \\n \\n***\\n") cnt <- cnt + 1 } ```') if(is.null(mkd_path)){ mkd_path = 'lin_regression_assumptions.html' } else{ mkd_path <- gsub("\\..*","", mkd_path) } if(! dir.exists("markdown_tmp_files")){ dir.create("markdown_tmp_files") } cat(mo, file=paste0("markdown_tmp_files/lin_regression_assumptions.Rmd")) # create a R markdown dokument rmarkdown::render(paste0("markdown_tmp_files/lin_regression_assumptions.Rmd")) # run the R markdown dokument file.copy(from=paste0("markdown_tmp_files/lin_regression_assumptions.html"), to=paste0(mkd_path,".html"), overwrite=overwrite) unlink("markdown_tmp_files", recursive=TRUE) if(open){ browseURL(paste0(mkd_path,".html")) } }
/R/mkd_lm_verif.R
no_license
freuerde/puzzle
R
false
false
2,502
r
#' Creates a markdown document to validate linear model assumptions #' #' #' Creates a markdown document for a (named) list of linear model validations from verif_lm() function output. #' @param verif_lm_list A list object including either the result or a (named) list #' of multiple results from the verif_lm() function. #' @param mkd_path Path to the folder, where the markdown document should be stored. #' If NULL, the current path will be used. #' @param open Should the HTML output be opened immediately after saving? Default is FALSE. #' @param overwrite Should an already existing file be overwritten? Default is TRUE. #' @return Save a HTML document without returning anything. #' @details This function is also used within the verif_lm() function. #' @author Dennis Freuer #' @export #' mkd_lm_verif <- function(verif_lm_list, mkd_path=NULL, open=FALSE, overwrite=TRUE){ if(sum(names(verif_lm_list) %in% c("test_summary","plot_resid","mdl")) == 3){ verif_lm_list <- list("Regression model"=verif_lm_list) } mo <- c('--- title: "Linear regression assumptions" output: html_document --- ```{r setup, include=FALSE, message=FALSE, warning=FALSE} knitr::opts_chunk$set(echo = FALSE) ``` ```{r results="asis"} require(gridExtra) require(pander) panderOptions("table.split.table", Inf) cnt <- 1 for(i in 1:length(verif_lm_list)){ cat(paste0("## ", cnt, ". ", names(verif_lm_list)[i])) r <- verif_lm_list[[i]] cat("\\nModel:", paste(formula(r$mdl)[2],"~",formula(r$mdl)[3]), "\\n") cat(pander(r$gof, style = "rmarkdown"), " ") cat(pander(r$test_summary[1:4,], style = "rmarkdown"), " ") grid.arrange(r$plot_resid[[1]], r$plot_resid[[2]], r$plot_hist, r$plot_resid[[3]], r$plot_resid[[4]], r$plot_resid[[6]], nrow=2) cat(". \\n \\n***\\n") cnt <- cnt + 1 } ```') if(is.null(mkd_path)){ mkd_path = 'lin_regression_assumptions.html' } else{ mkd_path <- gsub("\\..*","", mkd_path) } if(! dir.exists("markdown_tmp_files")){ dir.create("markdown_tmp_files") } cat(mo, file=paste0("markdown_tmp_files/lin_regression_assumptions.Rmd")) # create a R markdown dokument rmarkdown::render(paste0("markdown_tmp_files/lin_regression_assumptions.Rmd")) # run the R markdown dokument file.copy(from=paste0("markdown_tmp_files/lin_regression_assumptions.html"), to=paste0(mkd_path,".html"), overwrite=overwrite) unlink("markdown_tmp_files", recursive=TRUE) if(open){ browseURL(paste0(mkd_path,".html")) } }
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?", colClasses = "character") data$Date <- as.Date(data$Date, "%d/%m/%Y") date1 <- as.Date("2007-02-01") date2 <- as.Date("2007-02-02") data1 <- data[data$Date >= date1 & data$Date <= date2, ] data1$Global_active_power <- as.numeric(data1$Global_active_power) data1$DateTime <- strptime(paste(as.character(data1$Date), data1$Time), format = "%Y-%m-%d %H:%M:%S") plot(data1$DateTime, data1$Global_active_power, type = "l", ylab="Global Active Power (kilowatts)", xlab = "") dev.copy(png, file = "plot2.png") dev.off()
/plot2.R
no_license
dsgrt/ExData_Plotting1
R
false
false
617
r
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?", colClasses = "character") data$Date <- as.Date(data$Date, "%d/%m/%Y") date1 <- as.Date("2007-02-01") date2 <- as.Date("2007-02-02") data1 <- data[data$Date >= date1 & data$Date <= date2, ] data1$Global_active_power <- as.numeric(data1$Global_active_power) data1$DateTime <- strptime(paste(as.character(data1$Date), data1$Time), format = "%Y-%m-%d %H:%M:%S") plot(data1$DateTime, data1$Global_active_power, type = "l", ylab="Global Active Power (kilowatts)", xlab = "") dev.copy(png, file = "plot2.png") dev.off()
\name{Qr} \alias{Qr} \title{ Photoreceptor relative quantum catch} \description{ von Kries transformation. Photoreceptors are assumed to be adapted to the background. This function is used internally in colour vision models. } \usage{ Qr(R, I, Rb, C, interpolate, nm) } \arguments{ \item{R}{ Reflectance of observed object. A data frame with two columns only: first column corresponding to wavelength values and second column with reflectance values. } \item{I}{ Irradiance spectrum. A data frame with two columns only: first column corresponding to wavelength values and second column with irradiance values. Irradiance values must be in quantum flux units. } \item{Rb}{ Background reflectance. A data frame with two columns only: first column corresponding to wavelength values and second column with reflectance values. Photoreceptors are assumed to be adapted to the background reflectance. } \item{C}{ Photoreceptor sensitivity curve. A data frame with two columns only: first column corresponding to wavelength values and second column with photoreceptor absorbance values. } \item{interpolate}{ Whether data files should be interpolated before further calculations. See \code{\link{approx}}.} \item{nm}{ A sequence of numeric values specifying where interpolation is to take place. See \code{\link{approx}}.} } \details{For the von Kries transformation, first the quantum catches of the observed reflectance and the environmental background are calculated (see \code{\link{Q}}). Then: \deqn{qi = \frac{Q_i}{Q_{bi}}}{qi = Qi/Qbi} where \eqn{Q_i}{Qi} is the quantum catch arising from the observed object and \eqn{Q_{bi}}{Qbi} is the quantum catch from the background, for each one of the photoreceptor types (i). } \value{ Photoreceptor relative quantum catch. } \references{ Backhaus, W. 1991. Color opponent coding in the visual system of the honeybee. Vision Res 31:1381-1397. Chittka, L. 1992. The colour hexagon: a chromaticity diagram based on photoreceptor excitations as a generalized representation of colour opponency. J Comp Physiol A 170:533-543. Endler, J. A., and P. Mielke. 2005. Comparing entire colour patterns as birds see them. Biol J Linn Soc 86:405-431. Vorobyev, M., and D. Osorio. 1998. Receptor noise as a determinant of colour thresholds. Proceedings of the Royal Society B 265:351-358. } \author{ Felipe M. Gawryszewski \email{f.gawry@gmail.com} } \seealso{ \code{\link{CTTKmodel}}, \code{\link{EMmodel}}, \code{\link{RNLmodel}}, \code{\link{RNLthres}}, \code{\link{GENmodel}} }
/man/Qr.Rd
no_license
cran/colourvision
R
false
false
2,523
rd
\name{Qr} \alias{Qr} \title{ Photoreceptor relative quantum catch} \description{ von Kries transformation. Photoreceptors are assumed to be adapted to the background. This function is used internally in colour vision models. } \usage{ Qr(R, I, Rb, C, interpolate, nm) } \arguments{ \item{R}{ Reflectance of observed object. A data frame with two columns only: first column corresponding to wavelength values and second column with reflectance values. } \item{I}{ Irradiance spectrum. A data frame with two columns only: first column corresponding to wavelength values and second column with irradiance values. Irradiance values must be in quantum flux units. } \item{Rb}{ Background reflectance. A data frame with two columns only: first column corresponding to wavelength values and second column with reflectance values. Photoreceptors are assumed to be adapted to the background reflectance. } \item{C}{ Photoreceptor sensitivity curve. A data frame with two columns only: first column corresponding to wavelength values and second column with photoreceptor absorbance values. } \item{interpolate}{ Whether data files should be interpolated before further calculations. See \code{\link{approx}}.} \item{nm}{ A sequence of numeric values specifying where interpolation is to take place. See \code{\link{approx}}.} } \details{For the von Kries transformation, first the quantum catches of the observed reflectance and the environmental background are calculated (see \code{\link{Q}}). Then: \deqn{qi = \frac{Q_i}{Q_{bi}}}{qi = Qi/Qbi} where \eqn{Q_i}{Qi} is the quantum catch arising from the observed object and \eqn{Q_{bi}}{Qbi} is the quantum catch from the background, for each one of the photoreceptor types (i). } \value{ Photoreceptor relative quantum catch. } \references{ Backhaus, W. 1991. Color opponent coding in the visual system of the honeybee. Vision Res 31:1381-1397. Chittka, L. 1992. The colour hexagon: a chromaticity diagram based on photoreceptor excitations as a generalized representation of colour opponency. J Comp Physiol A 170:533-543. Endler, J. A., and P. Mielke. 2005. Comparing entire colour patterns as birds see them. Biol J Linn Soc 86:405-431. Vorobyev, M., and D. Osorio. 1998. Receptor noise as a determinant of colour thresholds. Proceedings of the Royal Society B 265:351-358. } \author{ Felipe M. Gawryszewski \email{f.gawry@gmail.com} } \seealso{ \code{\link{CTTKmodel}}, \code{\link{EMmodel}}, \code{\link{RNLmodel}}, \code{\link{RNLthres}}, \code{\link{GENmodel}} }
if(!require(Deriv)){install.packages("Deriv")};library(Deriv) if(!require(evd)){install.packages("evd")};library(evd) #loss function logl=expression(log(sigma)+(1+1/k)*log(1+k*(x-mu)/sigma)+(1+k*(x-mu)/sigma)^(-1/k)) # func_loss = function() #z_function func_z <- function(dmatrix,mu,u,lam,rho){ z = ifelse(abs(dmatrix %*% mu + u) > (lam/rho) , (dmatrix %*% mu) + u - sign(u + (dmatrix %*% mu)) * (lam /rho), 0) return(z) } #u_function func_u <- function(dmatrix,mu,z,u) { u <- u + (dmatrix %*% mu) - z return(u) } #dmatrix mat_func = function(n) { m = matrix(0,n-2,n) ## dmatrix : (n-2)*n for (i in 1:(n-2)) { m[i,i] = 1 m[i,i+1] = -2 m[i,i+2] = 1 } return(m) } ## gevfunction gevreg = function(x, z, ctr_list) { l2gev = function (tvec, dmatrix, rho, z_init, u_init) { # loc.vec = zz%*%tvec[1:(p+1)] loc.vec = tvec[1:n] # loglikelihood v1 = - sum(lgev(x, loc = loc.vec, scale = tvec[n+1], shape = tvec[n+2])) # lagrangian term v2 = (rho/2)*sum(((dmatrix %*% loc.vec) - z_init + u_init)^2) v = v1 + v2 return(v) } lgev = function (x, loc = 0, scale = 1, shape = 0) { if (min(scale) <= 0) return( - 1e+6) if (length(shape) != 1) stop("invalid shape") x <- (x - loc)/scale if (shape == 0) d <- log(1/scale) - x - exp(-x) else { nn <- length(x) xx <- 1 + shape * x xxpos <- xx[xx > 0 | is.na(xx)] scale <- rep(scale, length.out = nn)[xx > 0 | is.na(xx)] d <- numeric(nn) d[xx > 0 | is.na(xx)] <- log(1/scale) - xxpos^(-1/shape) - (1/shape + 1) * log(xxpos) d[xx <= 0 & !is.na(xx)] <- -(1e+6) } return(d) } est = optim(tvec, l2gev, dmatrix = dmatrix, rho=init_rho, z_init = z_init, u_init = u_init, method = "BFGS", control = ctr_list)$par return(est) }
/3_update_gev_function.R
no_license
dustjs17/admm
R
false
false
1,899
r
if(!require(Deriv)){install.packages("Deriv")};library(Deriv) if(!require(evd)){install.packages("evd")};library(evd) #loss function logl=expression(log(sigma)+(1+1/k)*log(1+k*(x-mu)/sigma)+(1+k*(x-mu)/sigma)^(-1/k)) # func_loss = function() #z_function func_z <- function(dmatrix,mu,u,lam,rho){ z = ifelse(abs(dmatrix %*% mu + u) > (lam/rho) , (dmatrix %*% mu) + u - sign(u + (dmatrix %*% mu)) * (lam /rho), 0) return(z) } #u_function func_u <- function(dmatrix,mu,z,u) { u <- u + (dmatrix %*% mu) - z return(u) } #dmatrix mat_func = function(n) { m = matrix(0,n-2,n) ## dmatrix : (n-2)*n for (i in 1:(n-2)) { m[i,i] = 1 m[i,i+1] = -2 m[i,i+2] = 1 } return(m) } ## gevfunction gevreg = function(x, z, ctr_list) { l2gev = function (tvec, dmatrix, rho, z_init, u_init) { # loc.vec = zz%*%tvec[1:(p+1)] loc.vec = tvec[1:n] # loglikelihood v1 = - sum(lgev(x, loc = loc.vec, scale = tvec[n+1], shape = tvec[n+2])) # lagrangian term v2 = (rho/2)*sum(((dmatrix %*% loc.vec) - z_init + u_init)^2) v = v1 + v2 return(v) } lgev = function (x, loc = 0, scale = 1, shape = 0) { if (min(scale) <= 0) return( - 1e+6) if (length(shape) != 1) stop("invalid shape") x <- (x - loc)/scale if (shape == 0) d <- log(1/scale) - x - exp(-x) else { nn <- length(x) xx <- 1 + shape * x xxpos <- xx[xx > 0 | is.na(xx)] scale <- rep(scale, length.out = nn)[xx > 0 | is.na(xx)] d <- numeric(nn) d[xx > 0 | is.na(xx)] <- log(1/scale) - xxpos^(-1/shape) - (1/shape + 1) * log(xxpos) d[xx <= 0 & !is.na(xx)] <- -(1e+6) } return(d) } est = optim(tvec, l2gev, dmatrix = dmatrix, rho=init_rho, z_init = z_init, u_init = u_init, method = "BFGS", control = ctr_list)$par return(est) }
pm10<- structure(list(coords = structure(c(423.481, 469.875, 437.361, 394.606, 444.299, 408.382, 376.969, 416.65, 399.228, 457.847, 383.639, 469.45, 483.16, 368.181, 433.807, 489.578, 346.8, 394.896, 489, 396.043, 454.262, 466.401, 4950.691, 4974.655, 4973.34, 5001.187, 5062.641, 4949.636, 4993.487, 4985.65, 4967.871, 4997.983, 4915.521, 5031.856, 4956.77, 4971.659, 4918.38, 4952.071, 5000.4, 4996.328, 4971.8, 4992.424, 5019.818, 5086.602), .Dim = c(22, 2), .Dimnames = list(c( "Stat1","Stat2","Stat3","Stat4","Stat5","Stat6","Stat7","Stat8","Stat9","Stat10","Stat11", "Stat12","Stat13","Stat14","Stat15","Stat16","Stat17","Stat18","Stat19","Stat20","Stat21","Stat22"),c("UTMX_km","UTMY_km"))), covariates = structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1519, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5384, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3758, 22.7955, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3758, 22.7955, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3758, 22.7955, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3402, 22.7749, 25.6344, 26.4481, 26.0742, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6442, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6753, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1975, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.546, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.5112, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8356, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4416, 21.7977, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5175, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7416, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4462, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8481, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5949, 28.2319, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5949, 28.2319, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5949, 28.2319, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5476, 28.2063, 41.2646, 42.2787, 41.814, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0308, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6464, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5919, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6272, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.1431, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6119, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.6216, 26.1617, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3347, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6445, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1959, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2496, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3856, 26.1916, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3856, 26.1916, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3856, 26.1916, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3293, 26.1676, 28.3774, 29.6141, 29.0443, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.6947, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3905, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.9367, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8296, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.5208, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.039, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.8493, 25.5518, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.2776, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9799, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3784, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3831, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7771, 18.6524, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7771, 18.6524, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7771, 18.6524, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7544, 18.642, 23.5004, 23.8938, 23.7208, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4956, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4731, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.253, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.853, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2449, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.5756, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.2073, 17.0301, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4514, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.668, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8363, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4519, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6568, 19.9953, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6568, 19.9953, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6568, 19.9953, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6333, 19.9832, 23.4429, 23.9792, 23.732, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.7792, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4518, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.3034, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3724, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8686, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4264, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.1171, 18.4173, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5687, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6919, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.702, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2582, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.883, 20.6362, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.883, 20.6362, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.883, 20.6362, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.8581, 20.6211, 39.5943, 40.1211, 39.8799, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6216, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.673, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3617, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.0246, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.1236, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.8699, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.3084, 19.011, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5548, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0729, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 40.0067, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8503, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.5534, 32.2995, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.5534, 32.2995, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.5534, 32.2995, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.4841, 32.2782, 39.9646, 41.422, 40.752, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3724, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4386, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5928, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.2569, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.2108, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8059, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.3031, 31.9249, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.027, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0833, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2494, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8271, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5697, 13.5752, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5697, 13.5752, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5697, 13.5752, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5605, 13.5701, 13.8534, 14.0694, 13.9699, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3322, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8386, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1774, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0585, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6991, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3275, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1359, 12.1263, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3285, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0884, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1114, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.766, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7561, 13.5495, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7561, 13.5495, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7561, 13.5495, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7323, 13.541, 14.4492, 14.985, 14.7376, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3968, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5617, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7676, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4678, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6947, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.1877, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5274, 13.2816, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0224, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2255, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.9019, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3358, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 24.0237, 23.0061, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 24.0237, 23.0061, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 24.0237, 23.0061, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 23.9965, 22.9878, 26.8257, 27.4222, 27.1497, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9046, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1634, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2936, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9154, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.6097, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8692, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1816, 20.1074, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5079, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2579, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 67.0139, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1923, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6793, 45.5254, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6793, 45.5254, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6793, 45.5254, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6311, 45.4948, 47.8705, 48.9161, 48.4382, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6099, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.5216, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.8002, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4192, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.5027, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.0667, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3968, 42.1455, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9383, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.5665, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4587, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2548, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2786, 24.8381, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2786, 24.8381, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2786, 24.8381, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2455, 24.8153, 29.2707, 29.9756, 29.6541, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5066, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0185, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1995, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.6964, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.4081, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9392, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.6086, 23.0953, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 36.989, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0286, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.144, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1132, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5987, 13.3224, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5987, 13.3224, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5987, 13.3224, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5841, 13.3126, 17.3799, 17.7163, 17.5624, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2458, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5571, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9709, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.435, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.932, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2642, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5908, 12.2859, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6769, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5892, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9312, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5787, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3609, 46.329, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3609, 46.329, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3609, 46.329, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3082, 46.3008, 47.3997, 48.5602, 48.0263, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7309, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.552, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3631, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.1868, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.4561, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.285, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5951, 42.4694, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.5663, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8232, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5991, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7356, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0208, 7.0193, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0208, 7.0193, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0208, 7.0193, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0193, 7.0186, 7.0379, 7.0698, 7.055, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3457, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9294, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9436, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8906, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5026, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.064, 6.0599, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2272, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3527, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6363, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.9115, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.5235, 31.1884, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.5235, 31.1884, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.5235, 31.1884, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.4905, 31.1707, 35.279, 36.0359, 35.6876, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5829, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8587, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0771, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.889, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2994, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.65, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7393, 28.3473, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.4857, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4444, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4076, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.5025, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3884, 30.35, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3884, 30.35, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3884, 30.35, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3734, 30.3441, 30.7445, 31.0487, 30.9117, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4478, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9944, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6223, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0833, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6464, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3777, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7295, 26.6612, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1716, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1074, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.2008, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 210.1764, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.8786, 167.3776, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.8786, 167.3776, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.8786, 167.3776, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.6092, 167.2087, 213.5373, 219.7492, 216.902, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.2946, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.5703, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.5733, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.4597, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.6977, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 163.8692, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 175.0754, 160.0611, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.5339, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8433, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6252, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2676, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.4067, 16.0667, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.4067, 16.0667, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.4067, 16.0667, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.3786, 16.0506, 26.8968, 27.531, 27.2403, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5798, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1357, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.787, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7497, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.5923, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.369, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.5175, 15.1225, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0394, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0584, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.6085, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.5757, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 104.0227, 103.4026, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 104.0227, 103.4026, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 104.0227, 103.4026, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 103.9008, 103.3074, 115.7636, 118.5029, 117.257, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3431, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.276, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.6972, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.8632, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.6376, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.5508, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.8656, 94.9713, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.8619, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7077, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.1223, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7897, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3511, 18.6571, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3511, 18.6571, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3511, 18.6571, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3193, 18.6374, 22.2831, 22.968, 22.6544, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8335, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2314, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8817, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.4391, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.0763, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5294, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1414, 17.3832, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.149, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8101, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5557, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5814, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9497, 9.6338, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9497, 9.6338, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9497, 9.6338, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9372, 9.6195, 13.5383, 13.6237, 13.5982, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7679, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9677, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6128, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2457, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.1123, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9665, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.3004, 8.9396, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.043, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.8618, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679), .Dim = c(8052,3), .Dimnames = list(c( "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255","256","257","258","259","260","261","262","263","264","265","266","267","268","269","270","271","272","273","274","275","276","277","278","279","280","281","282","283","284","285","286","287","288","289","290","291","292","293","294","295","296","297","298","299","300","301","302","303","304","305","306","307","308","309","310","311","312","313","314","315","316","317","318","319","320","321","322","323","324","325","326","327","328","329","330","331","332","333","334","335","336","337","338","339","340","341","342","343","344","345","346","347","348","349","350","351","352","353","354","355","356","357","358","359","360","361","362","363","364","365","366","367","368","369","370","371","372","373","374","375","376","377","378","379","380","381","382","383","384","385","386","387","388","389","390","391","392","393","394","395","396","397","398","399","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","419","420","421","422","423","424","425","426","427","428","429","430","431","432","433","434","435","436","437","438","439","440","441","442","443","444","445","446","447","448","449","450","451","452","453","454","455","456","457","458","459","460","461","462","463","464","465","466","467","468","469","470","471","472","473","474","475","476","477","478","479","480","481","482","483","484","485","486","487","488","489","490","491","492","493","494","495","496","497","498","499","500","501","502","503","504","505","506","507","508","509","510","511","512","513","514","515","516","517","518","519","520","521","522","523","524","525","526","527","528","529","530","531","532","533","534","535","536","537","538","539","540","541","542","543","544","545","546","547","548","549","550","551","552","553","554","555","556","557","558","559","560","561","562","563","564","565","566","567","568","569","570","571","572","573","574","575","576","577","578","579","580","581","582","583","584","585","586","587","588","589","590","591","592","593","594","595","596","597","598","599","600","601","602","603","604","605","606","607","608","609","610","611","612","613","614","615","616","617","618","619","620","621","622","623","624","625","626","627","628","629","630","631","632","633","634","635","636","637","638","639","640","641","642","643","644","645","646","647","648","649","650","651","652","653","654","655","656","657","658","659","660","661","662","663","664","665","666","667","668","669","670","671","672","673","674","675","676","677","678","679","680","681","682","683","684","685","686","687","688","689","690","691","692","693","694","695","696","697","698","699","700","701","702","703","704","705","706","707","708","709","710","711","712","713","714","715","716","717","718","719","720","721","722","723","724","725","726","727","728","729","730","731","732","733","734","735","736","737","738","739","740","741","742","743","744","745","746","747","748","749","750","751","752","753","754","755","756","757","758","759","760","761","762","763","764","765","766","767","768","769","770","771","772","773","774","775","776","777","778","779","780","781","782","783","784","785","786","787","788","789","790","791","792","793","794","795","796","797","798","799","800","801","802","803","804","805","806","807","808","809","810","811","812","813","814","815","816","817","818","819","820","821","822","823","824","825","826","827","828","829","830","831","832","833","834","835","836","837","838","839","840","841","842","843","844","845","846","847","848","849","850","851","852","853","854","855","856","857","858","859","860","861","862","863","864","865","866","867","868","869","870","871","872","873","874","875","876","877","878","879","880","881","882","883","884","885","886","887","888","889","890","891","892","893","894","895","896","897","898","899","900","901","902","903","904","905","906","907","908","909","910","911","912","913","914","915","916","917","918","919","920","921","922","923","924","925","926","927","928","929","930","931","932","933","934","935","936","937","938","939","940","941","942","943","944","945","946","947","948","949","950","951","952","953","954","955","956","957","958","959","960","961","962","963","964","965","966","967","968","969","970","971","972","973","974","975","976","977","978","979","980","981","982","983","984","985","986","987","988","989","990","991","992","993","994","995","996","997","998","999","1000","1001","1002","1003","1004","1005","1006","1007","1008","1009","1010","1011","1012","1013","1014","1015","1016","1017","1018","1019","1020","1021","1022","1023","1024","1025","1026","1027","1028","1029","1030","1031","1032","1033","1034","1035","1036","1037","1038","1039","1040","1041","1042","1043","1044","1045","1046","1047","1048","1049","1050","1051","1052","1053","1054","1055","1056","1057","1058","1059","1060","1061","1062","1063","1064","1065","1066","1067","1068","1069","1070","1071","1072","1073","1074","1075","1076","1077","1078","1079","1080","1081","1082","1083","1084","1085","1086","1087","1088","1089","1090","1091","1092","1093","1094","1095","1096","1097","1098","1099","1100","1101","1102","1103","1104","1105","1106","1107","1108","1109","1110","1111","1112","1113","1114","1115","1116","1117","1118","1119","1120","1121","1122","1123","1124","1125","1126","1127","1128","1129","1130","1131","1132","1133","1134","1135","1136","1137","1138","1139","1140","1141","1142","1143","1144","1145","1146","1147","1148","1149","1150","1151","1152","1153","1154","1155","1156","1157","1158","1159","1160","1161","1162","1163","1164","1165","1166","1167","1168","1169","1170","1171","1172","1173","1174","1175","1176","1177","1178","1179","1180","1181","1182","1183","1184","1185","1186","1187","1188","1189","1190","1191","1192","1193","1194","1195","1196","1197","1198","1199","1200","1201","1202","1203","1204","1205","1206","1207","1208","1209","1210","1211","1212","1213","1214","1215","1216","1217","1218","1219","1220","1221","1222","1223","1224","1225","1226","1227","1228","1229","1230","1231","1232","1233","1234","1235","1236","1237","1238","1239","1240","1241","1242","1243","1244","1245","1246","1247","1248","1249","1250","1251","1252","1253","1254","1255","1256","1257","1258","1259","1260","1261","1262","1263","1264","1265","1266","1267","1268","1269","1270","1271","1272","1273","1274","1275","1276","1277","1278","1279","1280","1281","1282","1283","1284","1285","1286","1287","1288","1289","1290","1291","1292","1293","1294","1295","1296","1297","1298","1299","1300","1301","1302","1303","1304","1305","1306","1307","1308","1309","1310","1311","1312","1313","1314","1315","1316","1317","1318","1319","1320","1321","1322","1323","1324","1325","1326","1327","1328","1329","1330","1331","1332","1333","1334","1335","1336","1337","1338","1339","1340","1341","1342","1343","1344","1345","1346","1347","1348","1349","1350","1351","1352","1353","1354","1355","1356","1357","1358","1359","1360","1361","1362","1363","1364","1365","1366","1367","1368","1369","1370","1371","1372","1373","1374","1375","1376","1377","1378","1379","1380","1381","1382","1383","1384","1385","1386","1387","1388","1389","1390","1391","1392","1393","1394","1395","1396","1397","1398","1399","1400","1401","1402","1403","1404","1405","1406","1407","1408","1409","1410","1411","1412","1413","1414","1415","1416","1417","1418","1419","1420","1421","1422","1423","1424","1425","1426","1427","1428","1429","1430","1431","1432","1433","1434","1435","1436","1437","1438","1439","1440","1441","1442","1443","1444","1445","1446","1447","1448","1449","1450","1451","1452","1453","1454","1455","1456","1457","1458","1459","1460","1461","1462","1463","1464","1465","1466","1467","1468","1469","1470","1471","1472","1473","1474","1475","1476","1477","1478","1479","1480","1481","1482","1483","1484","1485","1486","1487","1488","1489","1490","1491","1492","1493","1494","1495","1496","1497","1498","1499","1500","1501","1502","1503","1504","1505","1506","1507","1508","1509","1510","1511","1512","1513","1514","1515","1516","1517","1518","1519","1520","1521","1522","1523","1524","1525","1526","1527","1528","1529","1530","1531","1532","1533","1534","1535","1536","1537","1538","1539","1540","1541","1542","1543","1544","1545","1546","1547","1548","1549","1550","1551","1552","1553","1554","1555","1556","1557","1558","1559","1560","1561","1562","1563","1564","1565","1566","1567","1568","1569","1570","1571","1572","1573","1574","1575","1576","1577","1578","1579","1580","1581","1582","1583","1584","1585","1586","1587","1588","1589","1590","1591","1592","1593","1594","1595","1596","1597","1598","1599","1600","1601","1602","1603","1604","1605","1606","1607","1608","1609","1610","1611","1612","1613","1614","1615","1616","1617","1618","1619","1620","1621","1622","1623","1624","1625","1626","1627","1628","1629","1630","1631","1632","1633","1634","1635","1636","1637","1638","1639","1640","1641","1642","1643","1644","1645","1646","1647","1648","1649","1650","1651","1652","1653","1654","1655","1656","1657","1658","1659","1660","1661","1662","1663","1664","1665","1666","1667","1668","1669","1670","1671","1672","1673","1674","1675","1676","1677","1678","1679","1680","1681","1682","1683","1684","1685","1686","1687","1688","1689","1690","1691","1692","1693","1694","1695","1696","1697","1698","1699","1700","1701","1702","1703","1704","1705","1706","1707","1708","1709","1710","1711","1712","1713","1714","1715","1716","1717","1718","1719","1720","1721","1722","1723","1724","1725","1726","1727","1728","1729","1730","1731","1732","1733","1734","1735","1736","1737","1738","1739","1740","1741","1742","1743","1744","1745","1746","1747","1748","1749","1750","1751","1752","1753","1754","1755","1756","1757","1758","1759","1760","1761","1762","1763","1764","1765","1766","1767","1768","1769","1770","1771","1772","1773","1774","1775","1776","1777","1778","1779","1780","1781","1782","1783","1784","1785","1786","1787","1788","1789","1790","1791","1792","1793","1794","1795","1796","1797","1798","1799","1800","1801","1802","1803","1804","1805","1806","1807","1808","1809","1810","1811","1812","1813","1814","1815","1816","1817","1818","1819","1820","1821","1822","1823","1824","1825","1826","1827","1828","1829","1830","1831","1832","1833","1834","1835","1836","1837","1838","1839","1840","1841","1842","1843","1844","1845","1846","1847","1848","1849","1850","1851","1852","1853","1854","1855","1856","1857","1858","1859","1860","1861","1862","1863","1864","1865","1866","1867","1868","1869","1870","1871","1872","1873","1874","1875","1876","1877","1878","1879","1880","1881","1882","1883","1884","1885","1886","1887","1888","1889","1890","1891","1892","1893","1894","1895","1896","1897","1898","1899","1900","1901","1902","1903","1904","1905","1906","1907","1908","1909","1910","1911","1912","1913","1914","1915","1916","1917","1918","1919","1920","1921","1922","1923","1924","1925","1926","1927","1928","1929","1930","1931","1932","1933","1934","1935","1936","1937","1938","1939","1940","1941","1942","1943","1944","1945","1946","1947","1948","1949","1950","1951","1952","1953","1954","1955","1956","1957","1958","1959","1960","1961","1962","1963","1964","1965","1966","1967","1968","1969","1970","1971","1972","1973","1974","1975","1976","1977","1978","1979","1980","1981","1982","1983","1984","1985","1986","1987","1988","1989","1990","1991","1992","1993","1994","1995","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021","2022","2023","2024","2025","2026","2027","2028","2029","2030","2031","2032","2033","2034","2035","2036","2037","2038","2039","2040","2041","2042","2043","2044","2045","2046","2047","2048","2049","2050","2051","2052","2053","2054","2055","2056","2057","2058","2059","2060","2061","2062","2063","2064","2065","2066","2067","2068","2069","2070","2071","2072","2073","2074","2075","2076","2077","2078","2079","2080","2081","2082","2083","2084","2085","2086","2087","2088","2089","2090","2091","2092","2093","2094","2095","2096","2097","2098","2099","2100","2101","2102","2103","2104","2105","2106","2107","2108","2109","2110","2111","2112","2113","2114","2115","2116","2117","2118","2119","2120","2121","2122","2123","2124","2125","2126","2127","2128","2129","2130","2131","2132","2133","2134","2135","2136","2137","2138","2139","2140","2141","2142","2143","2144","2145","2146","2147","2148","2149","2150","2151","2152","2153","2154","2155","2156","2157","2158","2159","2160","2161","2162","2163","2164","2165","2166","2167","2168","2169","2170","2171","2172","2173","2174","2175","2176","2177","2178","2179","2180","2181","2182","2183","2184","2185","2186","2187","2188","2189","2190","2191","2192","2193","2194","2195","2196","2197","2198","2199","2200","2201","2202","2203","2204","2205","2206","2207","2208","2209","2210","2211","2212","2213","2214","2215","2216","2217","2218","2219","2220","2221","2222","2223","2224","2225","2226","2227","2228","2229","2230","2231","2232","2233","2234","2235","2236","2237","2238","2239","2240","2241","2242","2243","2244","2245","2246","2247","2248","2249","2250","2251","2252","2253","2254","2255","2256","2257","2258","2259","2260","2261","2262","2263","2264","2265","2266","2267","2268","2269","2270","2271","2272","2273","2274","2275","2276","2277","2278","2279","2280","2281","2282","2283","2284","2285","2286","2287","2288","2289","2290","2291","2292","2293","2294","2295","2296","2297","2298","2299","2300","2301","2302","2303","2304","2305","2306","2307","2308","2309","2310","2311","2312","2313","2314","2315","2316","2317","2318","2319","2320","2321","2322","2323","2324","2325","2326","2327","2328","2329","2330","2331","2332","2333","2334","2335","2336","2337","2338","2339","2340","2341","2342","2343","2344","2345","2346","2347","2348","2349","2350","2351","2352","2353","2354","2355","2356","2357","2358","2359","2360","2361","2362","2363","2364","2365","2366","2367","2368","2369","2370","2371","2372","2373","2374","2375","2376","2377","2378","2379","2380","2381","2382","2383","2384","2385","2386","2387","2388","2389","2390","2391","2392","2393","2394","2395","2396","2397","2398","2399","2400","2401","2402","2403","2404","2405","2406","2407","2408","2409","2410","2411","2412","2413","2414","2415","2416","2417","2418","2419","2420","2421","2422","2423","2424","2425","2426","2427","2428","2429","2430","2431","2432","2433","2434","2435","2436","2437","2438","2439","2440","2441","2442","2443","2444","2445","2446","2447","2448","2449","2450","2451","2452","2453","2454","2455","2456","2457","2458","2459","2460","2461","2462","2463","2464","2465","2466","2467","2468","2469","2470","2471","2472","2473","2474","2475","2476","2477","2478","2479","2480","2481","2482","2483","2484","2485","2486","2487","2488","2489","2490","2491","2492","2493","2494","2495","2496","2497","2498","2499","2500","2501","2502","2503","2504","2505","2506","2507","2508","2509","2510","2511","2512","2513","2514","2515","2516","2517","2518","2519","2520","2521","2522","2523","2524","2525","2526","2527","2528","2529","2530","2531","2532","2533","2534","2535","2536","2537","2538","2539","2540","2541","2542","2543","2544","2545","2546","2547","2548","2549","2550","2551","2552","2553","2554","2555","2556","2557","2558","2559","2560","2561","2562","2563","2564","2565","2566","2567","2568","2569","2570","2571","2572","2573","2574","2575","2576","2577","2578","2579","2580","2581","2582","2583","2584","2585","2586","2587","2588","2589","2590","2591","2592","2593","2594","2595","2596","2597","2598","2599","2600","2601","2602","2603","2604","2605","2606","2607","2608","2609","2610","2611","2612","2613","2614","2615","2616","2617","2618","2619","2620","2621","2622","2623","2624","2625","2626","2627","2628","2629","2630","2631","2632","2633","2634","2635","2636","2637","2638","2639","2640","2641","2642","2643","2644","2645","2646","2647","2648","2649","2650","2651","2652","2653","2654","2655","2656","2657","2658","2659","2660","2661","2662","2663","2664","2665","2666","2667","2668","2669","2670","2671","2672","2673","2674","2675","2676","2677","2678","2679","2680","2681","2682","2683","2684","2685","2686","2687","2688","2689","2690","2691","2692","2693","2694","2695","2696","2697","2698","2699","2700","2701","2702","2703","2704","2705","2706","2707","2708","2709","2710","2711","2712","2713","2714","2715","2716","2717","2718","2719","2720","2721","2722","2723","2724","2725","2726","2727","2728","2729","2730","2731","2732","2733","2734","2735","2736","2737","2738","2739","2740","2741","2742","2743","2744","2745","2746","2747","2748","2749","2750","2751","2752","2753","2754","2755","2756","2757","2758","2759","2760","2761","2762","2763","2764","2765","2766","2767","2768","2769","2770","2771","2772","2773","2774","2775","2776","2777","2778","2779","2780","2781","2782","2783","2784","2785","2786","2787","2788","2789","2790","2791","2792","2793","2794","2795","2796","2797","2798","2799","2800","2801","2802","2803","2804","2805","2806","2807","2808","2809","2810","2811","2812","2813","2814","2815","2816","2817","2818","2819","2820","2821","2822","2823","2824","2825","2826","2827","2828","2829","2830","2831","2832","2833","2834","2835","2836","2837","2838","2839","2840","2841","2842","2843","2844","2845","2846","2847","2848","2849","2850","2851","2852","2853","2854","2855","2856","2857","2858","2859","2860","2861","2862","2863","2864","2865","2866","2867","2868","2869","2870","2871","2872","2873","2874","2875","2876","2877","2878","2879","2880","2881","2882","2883","2884","2885","2886","2887","2888","2889","2890","2891","2892","2893","2894","2895","2896","2897","2898","2899","2900","2901","2902","2903","2904","2905","2906","2907","2908","2909","2910","2911","2912","2913","2914","2915","2916","2917","2918","2919","2920","2921","2922","2923","2924","2925","2926","2927","2928","2929","2930","2931","2932","2933","2934","2935","2936","2937","2938","2939","2940","2941","2942","2943","2944","2945","2946","2947","2948","2949","2950","2951","2952","2953","2954","2955","2956","2957","2958","2959","2960","2961","2962","2963","2964","2965","2966","2967","2968","2969","2970","2971","2972","2973","2974","2975","2976","2977","2978","2979","2980","2981","2982","2983","2984","2985","2986","2987","2988","2989","2990","2991","2992","2993","2994","2995","2996","2997","2998","2999","3000","3001","3002","3003","3004","3005","3006","3007","3008","3009","3010","3011","3012","3013","3014","3015","3016","3017","3018","3019","3020","3021","3022","3023","3024","3025","3026","3027","3028","3029","3030","3031","3032","3033","3034","3035","3036","3037","3038","3039","3040","3041","3042","3043","3044","3045","3046","3047","3048","3049","3050","3051","3052","3053","3054","3055","3056","3057","3058","3059","3060","3061","3062","3063","3064","3065","3066","3067","3068","3069","3070","3071","3072","3073","3074","3075","3076","3077","3078","3079","3080","3081","3082","3083","3084","3085","3086","3087","3088","3089","3090","3091","3092","3093","3094","3095","3096","3097","3098","3099","3100","3101","3102","3103","3104","3105","3106","3107","3108","3109","3110","3111","3112","3113","3114","3115","3116","3117","3118","3119","3120","3121","3122","3123","3124","3125","3126","3127","3128","3129","3130","3131","3132","3133","3134","3135","3136","3137","3138","3139","3140","3141","3142","3143","3144","3145","3146","3147","3148","3149","3150","3151","3152","3153","3154","3155","3156","3157","3158","3159","3160","3161","3162","3163","3164","3165","3166","3167","3168","3169","3170","3171","3172","3173","3174","3175","3176","3177","3178","3179","3180","3181","3182","3183","3184","3185","3186","3187","3188","3189","3190","3191","3192","3193","3194","3195","3196","3197","3198","3199","3200","3201","3202","3203","3204","3205","3206","3207","3208","3209","3210","3211","3212","3213","3214","3215","3216","3217","3218","3219","3220","3221","3222","3223","3224","3225","3226","3227","3228","3229","3230","3231","3232","3233","3234","3235","3236","3237","3238","3239","3240","3241","3242","3243","3244","3245","3246","3247","3248","3249","3250","3251","3252","3253","3254","3255","3256","3257","3258","3259","3260","3261","3262","3263","3264","3265","3266","3267","3268","3269","3270","3271","3272","3273","3274","3275","3276","3277","3278","3279","3280","3281","3282","3283","3284","3285","3286","3287","3288","3289","3290","3291","3292","3293","3294","3295","3296","3297","3298","3299","3300","3301","3302","3303","3304","3305","3306","3307","3308","3309","3310","3311","3312","3313","3314","3315","3316","3317","3318","3319","3320","3321","3322","3323","3324","3325","3326","3327","3328","3329","3330","3331","3332","3333","3334","3335","3336","3337","3338","3339","3340","3341","3342","3343","3344","3345","3346","3347","3348","3349","3350","3351","3352","3353","3354","3355","3356","3357","3358","3359","3360","3361","3362","3363","3364","3365","3366","3367","3368","3369","3370","3371","3372","3373","3374","3375","3376","3377","3378","3379","3380","3381","3382","3383","3384","3385","3386","3387","3388","3389","3390","3391","3392","3393","3394","3395","3396","3397","3398","3399","3400","3401","3402","3403","3404","3405","3406","3407","3408","3409","3410","3411","3412","3413","3414","3415","3416","3417","3418","3419","3420","3421","3422","3423","3424","3425","3426","3427","3428","3429","3430","3431","3432","3433","3434","3435","3436","3437","3438","3439","3440","3441","3442","3443","3444","3445","3446","3447","3448","3449","3450","3451","3452","3453","3454","3455","3456","3457","3458","3459","3460","3461","3462","3463","3464","3465","3466","3467","3468","3469","3470","3471","3472","3473","3474","3475","3476","3477","3478","3479","3480","3481","3482","3483","3484","3485","3486","3487","3488","3489","3490","3491","3492","3493","3494","3495","3496","3497","3498","3499","3500","3501","3502","3503","3504","3505","3506","3507","3508","3509","3510","3511","3512","3513","3514","3515","3516","3517","3518","3519","3520","3521","3522","3523","3524","3525","3526","3527","3528","3529","3530","3531","3532","3533","3534","3535","3536","3537","3538","3539","3540","3541","3542","3543","3544","3545","3546","3547","3548","3549","3550","3551","3552","3553","3554","3555","3556","3557","3558","3559","3560","3561","3562","3563","3564","3565","3566","3567","3568","3569","3570","3571","3572","3573","3574","3575","3576","3577","3578","3579","3580","3581","3582","3583","3584","3585","3586","3587","3588","3589","3590","3591","3592","3593","3594","3595","3596","3597","3598","3599","3600","3601","3602","3603","3604","3605","3606","3607","3608","3609","3610","3611","3612","3613","3614","3615","3616","3617","3618","3619","3620","3621","3622","3623","3624","3625","3626","3627","3628","3629","3630","3631","3632","3633","3634","3635","3636","3637","3638","3639","3640","3641","3642","3643","3644","3645","3646","3647","3648","3649","3650","3651","3652","3653","3654","3655","3656","3657","3658","3659","3660","3661","3662","3663","3664","3665","3666","3667","3668","3669","3670","3671","3672","3673","3674","3675","3676","3677","3678","3679","3680","3681","3682","3683","3684","3685","3686","3687","3688","3689","3690","3691","3692","3693","3694","3695","3696","3697","3698","3699","3700","3701","3702","3703","3704","3705","3706","3707","3708","3709","3710","3711","3712","3713","3714","3715","3716","3717","3718","3719","3720","3721","3722","3723","3724","3725","3726","3727","3728","3729","3730","3731","3732","3733","3734","3735","3736","3737","3738","3739","3740","3741","3742","3743","3744","3745","3746","3747","3748","3749","3750","3751","3752","3753","3754","3755","3756","3757","3758","3759","3760","3761","3762","3763","3764","3765","3766","3767","3768","3769","3770","3771","3772","3773","3774","3775","3776","3777","3778","3779","3780","3781","3782","3783","3784","3785","3786","3787","3788","3789","3790","3791","3792","3793","3794","3795","3796","3797","3798","3799","3800","3801","3802","3803","3804","3805","3806","3807","3808","3809","3810","3811","3812","3813","3814","3815","3816","3817","3818","3819","3820","3821","3822","3823","3824","3825","3826","3827","3828","3829","3830","3831","3832","3833","3834","3835","3836","3837","3838","3839","3840","3841","3842","3843","3844","3845","3846","3847","3848","3849","3850","3851","3852","3853","3854","3855","3856","3857","3858","3859","3860","3861","3862","3863","3864","3865","3866","3867","3868","3869","3870","3871","3872","3873","3874","3875","3876","3877","3878","3879","3880","3881","3882","3883","3884","3885","3886","3887","3888","3889","3890","3891","3892","3893","3894","3895","3896","3897","3898","3899","3900","3901","3902","3903","3904","3905","3906","3907","3908","3909","3910","3911","3912","3913","3914","3915","3916","3917","3918","3919","3920","3921","3922","3923","3924","3925","3926","3927","3928","3929","3930","3931","3932","3933","3934","3935","3936","3937","3938","3939","3940","3941","3942","3943","3944","3945","3946","3947","3948","3949","3950","3951","3952","3953","3954","3955","3956","3957","3958","3959","3960","3961","3962","3963","3964","3965","3966","3967","3968","3969","3970","3971","3972","3973","3974","3975","3976","3977","3978","3979","3980","3981","3982","3983","3984","3985","3986","3987","3988","3989","3990","3991","3992","3993","3994","3995","3996","3997","3998","3999","4000","4001","4002","4003","4004","4005","4006","4007","4008","4009","4010","4011","4012","4013","4014","4015","4016","4017","4018","4019","4020","4021","4022","4023","4024","4025","4026","4027","4028","4029","4030","4031","4032","4033","4034","4035","4036","4037","4038","4039","4040","4041","4042","4043","4044","4045","4046","4047","4048","4049","4050","4051","4052","4053","4054","4055","4056","4057","4058","4059","4060","4061","4062","4063","4064","4065","4066","4067","4068","4069","4070","4071","4072","4073","4074","4075","4076","4077","4078","4079","4080","4081","4082","4083","4084","4085","4086","4087","4088","4089","4090","4091","4092","4093","4094","4095","4096","4097","4098","4099","4100","4101","4102","4103","4104","4105","4106","4107","4108","4109","4110","4111","4112","4113","4114","4115","4116","4117","4118","4119","4120","4121","4122","4123","4124","4125","4126","4127","4128","4129","4130","4131","4132","4133","4134","4135","4136","4137","4138","4139","4140","4141","4142","4143","4144","4145","4146","4147","4148","4149","4150","4151","4152","4153","4154","4155","4156","4157","4158","4159","4160","4161","4162","4163","4164","4165","4166","4167","4168","4169","4170","4171","4172","4173","4174","4175","4176","4177","4178","4179","4180","4181","4182","4183","4184","4185","4186","4187","4188","4189","4190","4191","4192","4193","4194","4195","4196","4197","4198","4199","4200","4201","4202","4203","4204","4205","4206","4207","4208","4209","4210","4211","4212","4213","4214","4215","4216","4217","4218","4219","4220","4221","4222","4223","4224","4225","4226","4227","4228","4229","4230","4231","4232","4233","4234","4235","4236","4237","4238","4239","4240","4241","4242","4243","4244","4245","4246","4247","4248","4249","4250","4251","4252","4253","4254","4255","4256","4257","4258","4259","4260","4261","4262","4263","4264","4265","4266","4267","4268","4269","4270","4271","4272","4273","4274","4275","4276","4277","4278","4279","4280","4281","4282","4283","4284","4285","4286","4287","4288","4289","4290","4291","4292","4293","4294","4295","4296","4297","4298","4299","4300","4301","4302","4303","4304","4305","4306","4307","4308","4309","4310","4311","4312","4313","4314","4315","4316","4317","4318","4319","4320","4321","4322","4323","4324","4325","4326","4327","4328","4329","4330","4331","4332","4333","4334","4335","4336","4337","4338","4339","4340","4341","4342","4343","4344","4345","4346","4347","4348","4349","4350","4351","4352","4353","4354","4355","4356","4357","4358","4359","4360","4361","4362","4363","4364","4365","4366","4367","4368","4369","4370","4371","4372","4373","4374","4375","4376","4377","4378","4379","4380","4381","4382","4383","4384","4385","4386","4387","4388","4389","4390","4391","4392","4393","4394","4395","4396","4397","4398","4399","4400","4401","4402","4403","4404","4405","4406","4407","4408","4409","4410","4411","4412","4413","4414","4415","4416","4417","4418","4419","4420","4421","4422","4423","4424","4425","4426","4427","4428","4429","4430","4431","4432","4433","4434","4435","4436","4437","4438","4439","4440","4441","4442","4443","4444","4445","4446","4447","4448","4449","4450","4451","4452","4453","4454","4455","4456","4457","4458","4459","4460","4461","4462","4463","4464","4465","4466","4467","4468","4469","4470","4471","4472","4473","4474","4475","4476","4477","4478","4479","4480","4481","4482","4483","4484","4485","4486","4487","4488","4489","4490","4491","4492","4493","4494","4495","4496","4497","4498","4499","4500","4501","4502","4503","4504","4505","4506","4507","4508","4509","4510","4511","4512","4513","4514","4515","4516","4517","4518","4519","4520","4521","4522","4523","4524","4525","4526","4527","4528","4529","4530","4531","4532","4533","4534","4535","4536","4537","4538","4539","4540","4541","4542","4543","4544","4545","4546","4547","4548","4549","4550","4551","4552","4553","4554","4555","4556","4557","4558","4559","4560","4561","4562","4563","4564","4565","4566","4567","4568","4569","4570","4571","4572","4573","4574","4575","4576","4577","4578","4579","4580","4581","4582","4583","4584","4585","4586","4587","4588","4589","4590","4591","4592","4593","4594","4595","4596","4597","4598","4599","4600","4601","4602","4603","4604","4605","4606","4607","4608","4609","4610","4611","4612","4613","4614","4615","4616","4617","4618","4619","4620","4621","4622","4623","4624","4625","4626","4627","4628","4629","4630","4631","4632","4633","4634","4635","4636","4637","4638","4639","4640","4641","4642","4643","4644","4645","4646","4647","4648","4649","4650","4651","4652","4653","4654","4655","4656","4657","4658","4659","4660","4661","4662","4663","4664","4665","4666","4667","4668","4669","4670","4671","4672","4673","4674","4675","4676","4677","4678","4679","4680","4681","4682","4683","4684","4685","4686","4687","4688","4689","4690","4691","4692","4693","4694","4695","4696","4697","4698","4699","4700","4701","4702","4703","4704","4705","4706","4707","4708","4709","4710","4711","4712","4713","4714","4715","4716","4717","4718","4719","4720","4721","4722","4723","4724","4725","4726","4727","4728","4729","4730","4731","4732","4733","4734","4735","4736","4737","4738","4739","4740","4741","4742","4743","4744","4745","4746","4747","4748","4749","4750","4751","4752","4753","4754","4755","4756","4757","4758","4759","4760","4761","4762","4763","4764","4765","4766","4767","4768","4769","4770","4771","4772","4773","4774","4775","4776","4777","4778","4779","4780","4781","4782","4783","4784","4785","4786","4787","4788","4789","4790","4791","4792","4793","4794","4795","4796","4797","4798","4799","4800","4801","4802","4803","4804","4805","4806","4807","4808","4809","4810","4811","4812","4813","4814","4815","4816","4817","4818","4819","4820","4821","4822","4823","4824","4825","4826","4827","4828","4829","4830","4831","4832","4833","4834","4835","4836","4837","4838","4839","4840","4841","4842","4843","4844","4845","4846","4847","4848","4849","4850","4851","4852","4853","4854","4855","4856","4857","4858","4859","4860","4861","4862","4863","4864","4865","4866","4867","4868","4869","4870","4871","4872","4873","4874","4875","4876","4877","4878","4879","4880","4881","4882","4883","4884","4885","4886","4887","4888","4889","4890","4891","4892","4893","4894","4895","4896","4897","4898","4899","4900","4901","4902","4903","4904","4905","4906","4907","4908","4909","4910","4911","4912","4913","4914","4915","4916","4917","4918","4919","4920","4921","4922","4923","4924","4925","4926","4927","4928","4929","4930","4931","4932","4933","4934","4935","4936","4937","4938","4939","4940","4941","4942","4943","4944","4945","4946","4947","4948","4949","4950","4951","4952","4953","4954","4955","4956","4957","4958","4959","4960","4961","4962","4963","4964","4965","4966","4967","4968","4969","4970","4971","4972","4973","4974","4975","4976","4977","4978","4979","4980","4981","4982","4983","4984","4985","4986","4987","4988","4989","4990","4991","4992","4993","4994","4995","4996","4997","4998","4999","5000","5001","5002","5003","5004","5005","5006","5007","5008","5009","5010","5011","5012","5013","5014","5015","5016","5017","5018","5019","5020","5021","5022","5023","5024","5025","5026","5027","5028","5029","5030","5031","5032","5033","5034","5035","5036","5037","5038","5039","5040","5041","5042","5043","5044","5045","5046","5047","5048","5049","5050","5051","5052","5053","5054","5055","5056","5057","5058","5059","5060","5061","5062","5063","5064","5065","5066","5067","5068","5069","5070","5071","5072","5073","5074","5075","5076","5077","5078","5079","5080","5081","5082","5083","5084","5085","5086","5087","5088","5089","5090","5091","5092","5093","5094","5095","5096","5097","5098","5099","5100","5101","5102","5103","5104","5105","5106","5107","5108","5109","5110","5111","5112","5113","5114","5115","5116","5117","5118","5119","5120","5121","5122","5123","5124","5125","5126","5127","5128","5129","5130","5131","5132","5133","5134","5135","5136","5137","5138","5139","5140","5141","5142","5143","5144","5145","5146","5147","5148","5149","5150","5151","5152","5153","5154","5155","5156","5157","5158","5159","5160","5161","5162","5163","5164","5165","5166","5167","5168","5169","5170","5171","5172","5173","5174","5175","5176","5177","5178","5179","5180","5181","5182","5183","5184","5185","5186","5187","5188","5189","5190","5191","5192","5193","5194","5195","5196","5197","5198","5199","5200","5201","5202","5203","5204","5205","5206","5207","5208","5209","5210","5211","5212","5213","5214","5215","5216","5217","5218","5219","5220","5221","5222","5223","5224","5225","5226","5227","5228","5229","5230","5231","5232","5233","5234","5235","5236","5237","5238","5239","5240","5241","5242","5243","5244","5245","5246","5247","5248","5249","5250","5251","5252","5253","5254","5255","5256","5257","5258","5259","5260","5261","5262","5263","5264","5265","5266","5267","5268","5269","5270","5271","5272","5273","5274","5275","5276","5277","5278","5279","5280","5281","5282","5283","5284","5285","5286","5287","5288","5289","5290","5291","5292","5293","5294","5295","5296","5297","5298","5299","5300","5301","5302","5303","5304","5305","5306","5307","5308","5309","5310","5311","5312","5313","5314","5315","5316","5317","5318","5319","5320","5321","5322","5323","5324","5325","5326","5327","5328","5329","5330","5331","5332","5333","5334","5335","5336","5337","5338","5339","5340","5341","5342","5343","5344","5345","5346","5347","5348","5349","5350","5351","5352","5353","5354","5355","5356","5357","5358","5359","5360","5361","5362","5363","5364","5365","5366","5367","5368","5369","5370","5371","5372","5373","5374","5375","5376","5377","5378","5379","5380","5381","5382","5383","5384","5385","5386","5387","5388","5389","5390","5391","5392","5393","5394","5395","5396","5397","5398","5399","5400","5401","5402","5403","5404","5405","5406","5407","5408","5409","5410","5411","5412","5413","5414","5415","5416","5417","5418","5419","5420","5421","5422","5423","5424","5425","5426","5427","5428","5429","5430","5431","5432","5433","5434","5435","5436","5437","5438","5439","5440","5441","5442","5443","5444","5445","5446","5447","5448","5449","5450","5451","5452","5453","5454","5455","5456","5457","5458","5459","5460","5461","5462","5463","5464","5465","5466","5467","5468","5469","5470","5471","5472","5473","5474","5475","5476","5477","5478","5479","5480","5481","5482","5483","5484","5485","5486","5487","5488","5489","5490","5491","5492","5493","5494","5495","5496","5497","5498","5499","5500","5501","5502","5503","5504","5505","5506","5507","5508","5509","5510","5511","5512","5513","5514","5515","5516","5517","5518","5519","5520","5521","5522","5523","5524","5525","5526","5527","5528","5529","5530","5531","5532","5533","5534","5535","5536","5537","5538","5539","5540","5541","5542","5543","5544","5545","5546","5547","5548","5549","5550","5551","5552","5553","5554","5555","5556","5557","5558","5559","5560","5561","5562","5563","5564","5565","5566","5567","5568","5569","5570","5571","5572","5573","5574","5575","5576","5577","5578","5579","5580","5581","5582","5583","5584","5585","5586","5587","5588","5589","5590","5591","5592","5593","5594","5595","5596","5597","5598","5599","5600","5601","5602","5603","5604","5605","5606","5607","5608","5609","5610","5611","5612","5613","5614","5615","5616","5617","5618","5619","5620","5621","5622","5623","5624","5625","5626","5627","5628","5629","5630","5631","5632","5633","5634","5635","5636","5637","5638","5639","5640","5641","5642","5643","5644","5645","5646","5647","5648","5649","5650","5651","5652","5653","5654","5655","5656","5657","5658","5659","5660","5661","5662","5663","5664","5665","5666","5667","5668","5669","5670","5671","5672","5673","5674","5675","5676","5677","5678","5679","5680","5681","5682","5683","5684","5685","5686","5687","5688","5689","5690","5691","5692","5693","5694","5695","5696","5697","5698","5699","5700","5701","5702","5703","5704","5705","5706","5707","5708","5709","5710","5711","5712","5713","5714","5715","5716","5717","5718","5719","5720","5721","5722","5723","5724","5725","5726","5727","5728","5729","5730","5731","5732","5733","5734","5735","5736","5737","5738","5739","5740","5741","5742","5743","5744","5745","5746","5747","5748","5749","5750","5751","5752","5753","5754","5755","5756","5757","5758","5759","5760","5761","5762","5763","5764","5765","5766","5767","5768","5769","5770","5771","5772","5773","5774","5775","5776","5777","5778","5779","5780","5781","5782","5783","5784","5785","5786","5787","5788","5789","5790","5791","5792","5793","5794","5795","5796","5797","5798","5799","5800","5801","5802","5803","5804","5805","5806","5807","5808","5809","5810","5811","5812","5813","5814","5815","5816","5817","5818","5819","5820","5821","5822","5823","5824","5825","5826","5827","5828","5829","5830","5831","5832","5833","5834","5835","5836","5837","5838","5839","5840","5841","5842","5843","5844","5845","5846","5847","5848","5849","5850","5851","5852","5853","5854","5855","5856","5857","5858","5859","5860","5861","5862","5863","5864","5865","5866","5867","5868","5869","5870","5871","5872","5873","5874","5875","5876","5877","5878","5879","5880","5881","5882","5883","5884","5885","5886","5887","5888","5889","5890","5891","5892","5893","5894","5895","5896","5897","5898","5899","5900","5901","5902","5903","5904","5905","5906","5907","5908","5909","5910","5911","5912","5913","5914","5915","5916","5917","5918","5919","5920","5921","5922","5923","5924","5925","5926","5927","5928","5929","5930","5931","5932","5933","5934","5935","5936","5937","5938","5939","5940","5941","5942","5943","5944","5945","5946","5947","5948","5949","5950","5951","5952","5953","5954","5955","5956","5957","5958","5959","5960","5961","5962","5963","5964","5965","5966","5967","5968","5969","5970","5971","5972","5973","5974","5975","5976","5977","5978","5979","5980","5981","5982","5983","5984","5985","5986","5987","5988","5989","5990","5991","5992","5993","5994","5995","5996","5997","5998","5999","6000","6001","6002","6003","6004","6005","6006","6007","6008","6009","6010","6011","6012","6013","6014","6015","6016","6017","6018","6019","6020","6021","6022","6023","6024","6025","6026","6027","6028","6029","6030","6031","6032","6033","6034","6035","6036","6037","6038","6039","6040","6041","6042","6043","6044","6045","6046","6047","6048","6049","6050","6051","6052","6053","6054","6055","6056","6057","6058","6059","6060","6061","6062","6063","6064","6065","6066","6067","6068","6069","6070","6071","6072","6073","6074","6075","6076","6077","6078","6079","6080","6081","6082","6083","6084","6085","6086","6087","6088","6089","6090","6091","6092","6093","6094","6095","6096","6097","6098","6099","6100","6101","6102","6103","6104","6105","6106","6107","6108","6109","6110","6111","6112","6113","6114","6115","6116","6117","6118","6119","6120","6121","6122","6123","6124","6125","6126","6127","6128","6129","6130","6131","6132","6133","6134","6135","6136","6137","6138","6139","6140","6141","6142","6143","6144","6145","6146","6147","6148","6149","6150","6151","6152","6153","6154","6155","6156","6157","6158","6159","6160","6161","6162","6163","6164","6165","6166","6167","6168","6169","6170","6171","6172","6173","6174","6175","6176","6177","6178","6179","6180","6181","6182","6183","6184","6185","6186","6187","6188","6189","6190","6191","6192","6193","6194","6195","6196","6197","6198","6199","6200","6201","6202","6203","6204","6205","6206","6207","6208","6209","6210","6211","6212","6213","6214","6215","6216","6217","6218","6219","6220","6221","6222","6223","6224","6225","6226","6227","6228","6229","6230","6231","6232","6233","6234","6235","6236","6237","6238","6239","6240","6241","6242","6243","6244","6245","6246","6247","6248","6249","6250","6251","6252","6253","6254","6255","6256","6257","6258","6259","6260","6261","6262","6263","6264","6265","6266","6267","6268","6269","6270","6271","6272","6273","6274","6275","6276","6277","6278","6279","6280","6281","6282","6283","6284","6285","6286","6287","6288","6289","6290","6291","6292","6293","6294","6295","6296","6297","6298","6299","6300","6301","6302","6303","6304","6305","6306","6307","6308","6309","6310","6311","6312","6313","6314","6315","6316","6317","6318","6319","6320","6321","6322","6323","6324","6325","6326","6327","6328","6329","6330","6331","6332","6333","6334","6335","6336","6337","6338","6339","6340","6341","6342","6343","6344","6345","6346","6347","6348","6349","6350","6351","6352","6353","6354","6355","6356","6357","6358","6359","6360","6361","6362","6363","6364","6365","6366","6367","6368","6369","6370","6371","6372","6373","6374","6375","6376","6377","6378","6379","6380","6381","6382","6383","6384","6385","6386","6387","6388","6389","6390","6391","6392","6393","6394","6395","6396","6397","6398","6399","6400","6401","6402","6403","6404","6405","6406","6407","6408","6409","6410","6411","6412","6413","6414","6415","6416","6417","6418","6419","6420","6421","6422","6423","6424","6425","6426","6427","6428","6429","6430","6431","6432","6433","6434","6435","6436","6437","6438","6439","6440","6441","6442","6443","6444","6445","6446","6447","6448","6449","6450","6451","6452","6453","6454","6455","6456","6457","6458","6459","6460","6461","6462","6463","6464","6465","6466","6467","6468","6469","6470","6471","6472","6473","6474","6475","6476","6477","6478","6479","6480","6481","6482","6483","6484","6485","6486","6487","6488","6489","6490","6491","6492","6493","6494","6495","6496","6497","6498","6499","6500","6501","6502","6503","6504","6505","6506","6507","6508","6509","6510","6511","6512","6513","6514","6515","6516","6517","6518","6519","6520","6521","6522","6523","6524","6525","6526","6527","6528","6529","6530","6531","6532","6533","6534","6535","6536","6537","6538","6539","6540","6541","6542","6543","6544","6545","6546","6547","6548","6549","6550","6551","6552","6553","6554","6555","6556","6557","6558","6559","6560","6561","6562","6563","6564","6565","6566","6567","6568","6569","6570","6571","6572","6573","6574","6575","6576","6577","6578","6579","6580","6581","6582","6583","6584","6585","6586","6587","6588","6589","6590","6591","6592","6593","6594","6595","6596","6597","6598","6599","6600","6601","6602","6603","6604","6605","6606","6607","6608","6609","6610","6611","6612","6613","6614","6615","6616","6617","6618","6619","6620","6621","6622","6623","6624","6625","6626","6627","6628","6629","6630","6631","6632","6633","6634","6635","6636","6637","6638","6639","6640","6641","6642","6643","6644","6645","6646","6647","6648","6649","6650","6651","6652","6653","6654","6655","6656","6657","6658","6659","6660","6661","6662","6663","6664","6665","6666","6667","6668","6669","6670","6671","6672","6673","6674","6675","6676","6677","6678","6679","6680","6681","6682","6683","6684","6685","6686","6687","6688","6689","6690","6691","6692","6693","6694","6695","6696","6697","6698","6699","6700","6701","6702","6703","6704","6705","6706","6707","6708","6709","6710","6711","6712","6713","6714","6715","6716","6717","6718","6719","6720","6721","6722","6723","6724","6725","6726","6727","6728","6729","6730","6731","6732","6733","6734","6735","6736","6737","6738","6739","6740","6741","6742","6743","6744","6745","6746","6747","6748","6749","6750","6751","6752","6753","6754","6755","6756","6757","6758","6759","6760","6761","6762","6763","6764","6765","6766","6767","6768","6769","6770","6771","6772","6773","6774","6775","6776","6777","6778","6779","6780","6781","6782","6783","6784","6785","6786","6787","6788","6789","6790","6791","6792","6793","6794","6795","6796","6797","6798","6799","6800","6801","6802","6803","6804","6805","6806","6807","6808","6809","6810","6811","6812","6813","6814","6815","6816","6817","6818","6819","6820","6821","6822","6823","6824","6825","6826","6827","6828","6829","6830","6831","6832","6833","6834","6835","6836","6837","6838","6839","6840","6841","6842","6843","6844","6845","6846","6847","6848","6849","6850","6851","6852","6853","6854","6855","6856","6857","6858","6859","6860","6861","6862","6863","6864","6865","6866","6867","6868","6869","6870","6871","6872","6873","6874","6875","6876","6877","6878","6879","6880","6881","6882","6883","6884","6885","6886","6887","6888","6889","6890","6891","6892","6893","6894","6895","6896","6897","6898","6899","6900","6901","6902","6903","6904","6905","6906","6907","6908","6909","6910","6911","6912","6913","6914","6915","6916","6917","6918","6919","6920","6921","6922","6923","6924","6925","6926","6927","6928","6929","6930","6931","6932","6933","6934","6935","6936","6937","6938","6939","6940","6941","6942","6943","6944","6945","6946","6947","6948","6949","6950","6951","6952","6953","6954","6955","6956","6957","6958","6959","6960","6961","6962","6963","6964","6965","6966","6967","6968","6969","6970","6971","6972","6973","6974","6975","6976","6977","6978","6979","6980","6981","6982","6983","6984","6985","6986","6987","6988","6989","6990","6991","6992","6993","6994","6995","6996","6997","6998","6999","7000","7001","7002","7003","7004","7005","7006","7007","7008","7009","7010","7011","7012","7013","7014","7015","7016","7017","7018","7019","7020","7021","7022","7023","7024","7025","7026","7027","7028","7029","7030","7031","7032","7033","7034","7035","7036","7037","7038","7039","7040","7041","7042","7043","7044","7045","7046","7047","7048","7049","7050","7051","7052","7053","7054","7055","7056","7057","7058","7059","7060","7061","7062","7063","7064","7065","7066","7067","7068","7069","7070","7071","7072","7073","7074","7075","7076","7077","7078","7079","7080","7081","7082","7083","7084","7085","7086","7087","7088","7089","7090","7091","7092","7093","7094","7095","7096","7097","7098","7099","7100","7101","7102","7103","7104","7105","7106","7107","7108","7109","7110","7111","7112","7113","7114","7115","7116","7117","7118","7119","7120","7121","7122","7123","7124","7125","7126","7127","7128","7129","7130","7131","7132","7133","7134","7135","7136","7137","7138","7139","7140","7141","7142","7143","7144","7145","7146","7147","7148","7149","7150","7151","7152","7153","7154","7155","7156","7157","7158","7159","7160","7161","7162","7163","7164","7165","7166","7167","7168","7169","7170","7171","7172","7173","7174","7175","7176","7177","7178","7179","7180","7181","7182","7183","7184","7185","7186","7187","7188","7189","7190","7191","7192","7193","7194","7195","7196","7197","7198","7199","7200","7201","7202","7203","7204","7205","7206","7207","7208","7209","7210","7211","7212","7213","7214","7215","7216","7217","7218","7219","7220","7221","7222","7223","7224","7225","7226","7227","7228","7229","7230","7231","7232","7233","7234","7235","7236","7237","7238","7239","7240","7241","7242","7243","7244","7245","7246","7247","7248","7249","7250","7251","7252","7253","7254","7255","7256","7257","7258","7259","7260","7261","7262","7263","7264","7265","7266","7267","7268","7269","7270","7271","7272","7273","7274","7275","7276","7277","7278","7279","7280","7281","7282","7283","7284","7285","7286","7287","7288","7289","7290","7291","7292","7293","7294","7295","7296","7297","7298","7299","7300","7301","7302","7303","7304","7305","7306","7307","7308","7309","7310","7311","7312","7313","7314","7315","7316","7317","7318","7319","7320","7321","7322","7323","7324","7325","7326","7327","7328","7329","7330","7331","7332","7333","7334","7335","7336","7337","7338","7339","7340","7341","7342","7343","7344","7345","7346","7347","7348","7349","7350","7351","7352","7353","7354","7355","7356","7357","7358","7359","7360","7361","7362","7363","7364","7365","7366","7367","7368","7369","7370","7371","7372","7373","7374","7375","7376","7377","7378","7379","7380","7381","7382","7383","7384","7385","7386","7387","7388","7389","7390","7391","7392","7393","7394","7395","7396","7397","7398","7399","7400","7401","7402","7403","7404","7405","7406","7407","7408","7409","7410","7411","7412","7413","7414","7415","7416","7417","7418","7419","7420","7421","7422","7423","7424","7425","7426","7427","7428","7429","7430","7431","7432","7433","7434","7435","7436","7437","7438","7439","7440","7441","7442","7443","7444","7445","7446","7447","7448","7449","7450","7451","7452","7453","7454","7455","7456","7457","7458","7459","7460","7461","7462","7463","7464","7465","7466","7467","7468","7469","7470","7471","7472","7473","7474","7475","7476","7477","7478","7479","7480","7481","7482","7483","7484","7485","7486","7487","7488","7489","7490","7491","7492","7493","7494","7495","7496","7497","7498","7499","7500","7501","7502","7503","7504","7505","7506","7507","7508","7509","7510","7511","7512","7513","7514","7515","7516","7517","7518","7519","7520","7521","7522","7523","7524","7525","7526","7527","7528","7529","7530","7531","7532","7533","7534","7535","7536","7537","7538","7539","7540","7541","7542","7543","7544","7545","7546","7547","7548","7549","7550","7551","7552","7553","7554","7555","7556","7557","7558","7559","7560","7561","7562","7563","7564","7565","7566","7567","7568","7569","7570","7571","7572","7573","7574","7575","7576","7577","7578","7579","7580","7581","7582","7583","7584","7585","7586","7587","7588","7589","7590","7591","7592","7593","7594","7595","7596","7597","7598","7599","7600","7601","7602","7603","7604","7605","7606","7607","7608","7609","7610","7611","7612","7613","7614","7615","7616","7617","7618","7619","7620","7621","7622","7623","7624","7625","7626","7627","7628","7629","7630","7631","7632","7633","7634","7635","7636","7637","7638","7639","7640","7641","7642","7643","7644","7645","7646","7647","7648","7649","7650","7651","7652","7653","7654","7655","7656","7657","7658","7659","7660","7661","7662","7663","7664","7665","7666","7667","7668","7669","7670","7671","7672","7673","7674","7675","7676","7677","7678","7679","7680","7681","7682","7683","7684","7685","7686","7687","7688","7689","7690","7691","7692","7693","7694","7695","7696","7697","7698","7699","7700","7701","7702","7703","7704","7705","7706","7707","7708","7709","7710","7711","7712","7713","7714","7715","7716","7717","7718","7719","7720","7721","7722","7723","7724","7725","7726","7727","7728","7729","7730","7731","7732","7733","7734","7735","7736","7737","7738","7739","7740","7741","7742","7743","7744","7745","7746","7747","7748","7749","7750","7751","7752","7753","7754","7755","7756","7757","7758","7759","7760","7761","7762","7763","7764","7765","7766","7767","7768","7769","7770","7771","7772","7773","7774","7775","7776","7777","7778","7779","7780","7781","7782","7783","7784","7785","7786","7787","7788","7789","7790","7791","7792","7793","7794","7795","7796","7797","7798","7799","7800","7801","7802","7803","7804","7805","7806","7807","7808","7809","7810","7811","7812","7813","7814","7815","7816","7817","7818","7819","7820","7821","7822","7823","7824","7825","7826","7827","7828","7829","7830","7831","7832","7833","7834","7835","7836","7837","7838","7839","7840","7841","7842","7843","7844","7845","7846","7847","7848","7849","7850","7851","7852","7853","7854","7855","7856","7857","7858","7859","7860","7861","7862","7863","7864","7865","7866","7867","7868","7869","7870","7871","7872","7873","7874","7875","7876","7877","7878","7879","7880","7881","7882","7883","7884","7885","7886","7887","7888","7889","7890","7891","7892","7893","7894","7895","7896","7897","7898","7899","7900","7901","7902","7903","7904","7905","7906","7907","7908","7909","7910","7911","7912","7913","7914","7915","7916","7917","7918","7919","7920","7921","7922","7923","7924","7925","7926","7927","7928","7929","7930","7931","7932","7933","7934","7935","7936","7937","7938","7939","7940","7941","7942","7943","7944","7945","7946","7947","7948","7949","7950","7951","7952","7953","7954","7955","7956","7957","7958","7959","7960","7961","7962","7963","7964","7965","7966","7967","7968","7969","7970","7971","7972","7973","7974","7975","7976","7977","7978","7979","7980","7981","7982","7983","7984","7985","7986","7987","7988","7989","7990","7991","7992","7993","7994","7995","7996","7997","7998","7999","8000","8001","8002","8003","8004","8005","8006","8007","8008","8009","8010","8011","8012","8013","8014","8015","8016","8017","8018","8019","8020","8021","8022","8023","8024","8025","8026","8027","8028","8029","8030","8031","8032","8033","8034","8035","8036","8037","8038","8039","8040","8041","8042","8043","8044","8045","8046","8047","8048","8049","8050","8051","8052"), c("Intercept","Emissions","Altitude"))), z = structure( c( 3.332205, 2.944439, 3.401197, 3.583519, 3.737670, 3.806662, 4.317488, 4.317488, 3.931826, 3.610918, 3.526361, 4.127134, 4.49981, 4.394449, 3.367296, 3.78419, 3.988984, 3.496508, 3.044522, 3.688879, 4.094345, 4.248495, 4.234107, 3.988984, 4.174387, 4.406719, 4.60517, 4.174387, 3.806662, 3.850148, 4.025352, 3.988984, 4.234107, 4.356709, 4.158883, 3.931826, 3.970292, 4.276666, 3.806662, 3.89182, 4.276666, 4.532599, 4.584967, 4.276666, 4.615121, 4.59512, 4.820282, 4.812184, 5.01728, 3.332205, 2.564949, 2.639057, 3.258097, 4.127134, 3.496508, 4.025352, 4.49981, 4.127134, 4.290459, 3.688879, 3.663562, 4.143135, 4.025352, 4.043051, 4.553877, 4.276666, 3.688879, 3.850148, 3.367296, 4.060443, 3.496508, 3.7612, 4.158883, 4.174387, 4.26268, 4.077537, 4.290459, 4.276666, 4.094345, 3.806662, 3.610918, 3.295837, 2.70805, 3.496508, 3.091042, 3.178054, 3.135494, 3.295837, 3.931826, 4.043051, 3.970292, 4.060443, 4.204693, 3.367296, 3.135494, 3.295837, 3.258097, 2.890372, 3.044522, 2.484907, 2.944439, 2.70805, 2.772589, 3.583519, 3.091042, 3.218876, 2.772589, 2.079442, 2.772589, 2.484907, 2.639057, 3.295837, 3.465736, 3.637586, 3.332205, 2.302585, 3.332205, 3.332205, 3.218876, 3.332205, 2.302585, 3.044522, 2.995732, 2.564949, 2.639057, 2.772589, 2.397895, 2.890372, 2.772589, 2.944439, 3.258097, 3.258097, 3.555348, 3.367296, 2.772589, 3.367296, 3.135494, 3.218876, 3.526361, 3.465736, 3.465736, 3.465736, 3.295837, 2.564949, 2.833213, 3.433987, 3.496508, 2.70805, 3.332205, 3.332205, 3.091042, 3.496508, 3.496508, 3.713572, 3.332205, 2.995732, 3.218876, 2.639057, 3.258097, 3.135494, 3.218876, 3.135494, 3.433987, 3.135494, 3.284149, 2.484907, 3.303792, 2.995732, 3.367296, 3.367296, 3.295837, 2.772589, 2.833213, 3.303781, 3.301803, 3.332205, 3.332205, 3.258097, 3.367296, 3.465736, 3.303885, 3.496508, 3.555348, 3.433987, 3.286140, 3.289549, 3.305675, 3.309673, 3.307708, 3.308792, 3.312587, 3.286469, 3.289375, 3.305534, 3.309887, 3.307758, 3.308839, 3.496508, 3.295837, 2.944439, 3.135494, 3.433987, 3.465736, 3.555348, 3.555348, 3.295837, 2.639057, 3.135494, 3.091042, 3.295837, 3.258097, 3.433987, 3.286378, 3.278300, 3.28211, 3.433987, 3.555348, 3.178054, 2.890372, 2.995732, 3.663562, 3.610918, 4.304065, 3.828641, 3.555348, 2.079442, 1.94591, 2.079442, 2.564949, 2.944439, 2.995732, 2.197225, 2.833213, 2.70805, 2.197225, 3.295837, 3.044522, 2.890372, 2.833213, 2.833213, 2.944439, 2.890372, 3.178054, 3.178054, 3.332205, 3.401197, 3.583519, 3.583519, 3.367296, 3.401197, 3.663562, 3.583519, 3.610918, 3.526361, 3.610918, 3.931826, 3.78419, 4.007333, 3.433987, 2.302585, 2.639057, 2.944439, 3.091042, 3.555348, 3.367296, 3.303523, 3.218876, 3.295837, 2.564949, 2.302585, 2.995732, 3.367296, 3.433987, 3.725193, 3.526361, 3.496508, 3.637586, 3.637586, 4.007333, 3.7612, 4.077537, 3.988984, 4.007333, 3.7612, 2.890372, 2.944439, 3.178054, 3.526361, 3.713572, 3.555348, 2.944439, 3.583519, 4.219508, 4.204693, 4.077537, 4.143135, 4.304065, 3.951244, 3.934629, 3.367296, 2.833213, 3.044522, 1.94591, 3.178054, 2.197225, 2.197225, 1.94591, 3.295837, 3.78419, 3.688879, 3.931826, 3.583519, 3.135494, 3.583519, 3.555348, 2.890372, 2.944439, 3.135494, 2.70805, 3.663562, 4.189655, 4.304065, 4.65396, 4.369448, 3.896713, 3.555348, 4.110874, 4.248495, 3.927888, 3.940135, 3.967748, 3.900576, 3.974405, 3.995183, 2.944439, 3.610918, 3.332205, 3.433987, 3.78419, 3.688879, 3.555348, 3.89182, 3.850148, 3.496508, 3.912023, 3.850148, 3.433987, 3.970292, 4.189655, 4.394449, 4.488636, 4.736198, 4.077537, 3.401197, 3.912023, 3.931826, 4.304065, 4.454347, 4.442651, 4.744932, 3.806662, 3.135494, 3.7612, 3.850148, 3.526361, 3.713572, 3.496508, 2.890372, 3.526361, 4.094345, 4.204693, 4.330733, 4.394449, 4.744932, 4.077537, 3.871201, 3.970292, 4.430817, 4.615121, 4.65396, 3.931826, 4.025352, 4.234107, 3.610918, 4.118448, 3.912023, 4.189655, 4.234107, 3.970292, 4.001493, 3.917582, 4.1803, 4.166466, 4.1382, 4.12896, 4.131665, 3.969707, 3.980168, 4.202069, 4.180714, 4.219508, 4.158883, 4.158883, 3.965917, 3.930737, 4.119584, 4.141602, 4.166853, 4.133114, 4.418841, 4.727388, 4.770685, 5.17615, 5.111988, 5.075174, 3.688879, 3.295837, 3.295837, 3.555348, 4.192935, 4.035063, 4.094345, 4.574711, 4.663439, 4.276666, 3.850148, 4.094345, 4.418841, 4.564348, 4.574711, 4.663439, 3.970292, 3.044522, 4.110874, 4.110874, 3.688879, 3.663562, 4.204693, 4.418841, 4.290459, 4.442651, 4.510860, 4.574711, 4.430817, 4.127134, 3.828641, 3.806662, 3.637586, 2.639057, 3.135494, 3.367296, 3.583519, 3.367296, 3.610918, 4.26268, 4.356709, 4.290459, 4.430817, 4.330733, 3.688879, 3.367296, 3.828641, 3.7612, 3.737670, 3.871201, 3.091042, 3.135494, 3.044522, 3.433987, 3.465736, 3.583519, 3.688879, 3.526361, 3.091042, 3.218876, 3.091042, 3.044522, 3.78419, 3.912023, 3.970292, 3.931826, 2.772589, 3.433987, 3.367296, 3.555348, 3.637586, 2.564949, 3.828641, 3.931826, 3.663562, 3.044522, 3.526361, 2.944439, 3.332205, 3.465736, 3.526361, 3.78419, 3.583519, 3.713572, 3.555348, 3.091042, 3.367296, 3.135494, 3.218876, 3.637586, 3.135494, 3.713572, 3.806662, 3.433987, 2.890372, 3.332205, 3.713572, 3.912023, 3.713572, 2.302585, 3.688879, 3.7612, 3.663562, 4.143135, 4.127134, 3.912023, 3.7612, 3.850148, 3.583519, 3.828641, 3.89182, 3.988984, 3.89182, 3.988984, 3.871201, 3.526361, 3.610918, 3.610918, 3.401197, 4.025352, 3.871201, 3.828641, 3.555348, 3.610918, 3.583519, 3.555348, 3.737670, 4.025352, 3.89182, 3.850148, 4.025352, 3.970292, 4.317488, 3.931826, 3.713572, 3.496508, 3.295837, 3.496508, 3.610918, 3.610918, 3.89182, 3.367296, 3.433987, 3.091042, 2.197225, 2.079442, 3.044522, 3.258097, 3.332205, 3.218876, 2.70805, 3.496508, 3.7612, 3.496508, 3.7612, 3.78419, 3.401197, 2.564949, 3.433987, 4.234107, 3.218876, 3.637586, 3.663562, 3.988984, 3.496508, 3.806662, 3.7612, 3.465736, 2.70805, 3.218876, 3.218876, 3.135494, 3.465736, 3.663562, 3.526361, 3.465736, 3.295837, 2.890372, 2.833213, 2.890372, 3.258097, 3.091042, 3.401197, 3.367296, 2.484907, 2.833213, 3.332205, 3.583519, 3.295837, 3.044522, 3.044522, 3.367296, 2.995732, 3.496508, 3.433987, 3.401197, 3.258097, 3.7612, 3.555348, 3.526361, 3.713572, 3.828641, 3.89182, 3.871201, 3.970292, 3.78419, 3.7612, 3.610918, 4.276666, 3.433987, 2.484907, 2.944439, 3.218876, 3.367296, 4.077537, 3.688879, 3.465736, 3.433987, 3.78419, 3.135494, 2.397895, 3.7612, 3.7612, 3.465736, 3.688879, 3.737670, 3.850148, 3.737670, 4.025352, 4.060443, 3.7612, 4.343805, 4.382027, 4.174387, 3.881328, 3.806662, 3.465736, 3.637586, 3.951244, 3.737670, 3.713572, 3.433987, 4.007333, 4.219508, 4.488636, 4.248495, 4.442651, 4.488636, 4.219508, 4.553877, 4.043051, 3.332205, 3.178054, 1.609438, 2.772589, 3.218876, 1.609438, 2.197225, 3.871201, 4.127134, 3.912023, 4.025352, 3.367296, 3.135494, 3.135494, 3.258097, 2.564949, 3.295837, 3.091042, 2.302585, 3.555348, 4.510860, 4.70048, 4.85203, 4.442651, 3.688879, 3.828641, 4.174387, 4.442651, 4.644391, 4.890349, 5.01728, 4.672829, 4.488636, 4.330733, 3.044522, 3.637586, 3.871201, 4.127134, 4.189655, 3.828641, 4.094345, 4.382027, 4.204693, 4.060443, 4.290459, 4.406719, 4.26268, 4.543295, 4.65396, 4.682131, 4.543295, 4.70048, 3.988984, 3.806662, 3.912023, 4.304065, 4.521789, 4.663439, 4.75359, 4.543295, 3.871201, 3.583519, 3.583519, 3.295837, 3.663562, 4.60517, 3.78419, 3.258097, 3.555348, 4.204693, 4.174387, 4.204693, 4.532599, 4.634729, 4.276666, 3.988984, 4.290459, 4.465908, 4.672829, 4.672829, 2.890372, 4.007333, 4.143135, 3.713572, 3.583519, 4.488636, 4.394449, 4.454347, 4.060443, 4.158883, 4.406719, 4.532599, 4.564348, 4.510860, 4.454347, 4.369448, 4.406719, 4.394449, 4.624973, 4.682131, 4.454347, 4.290459, 4.248495, 4.465908, 4.025352, 4.077537, 4.356709, 4.584967, 4.718499, 4.317488, 4.75359, 4.70953, 5.023881, 4.983607, 5.099866, 3.178054, 2.302585, 3.713572, 3.367296, 4.290459, 3.258097, 4.219508, 4.615121, 4.442651, 4.418841, 4.219508, 3.688879, 4.382027, 4.356709, 4.564348, 4.795791, 4.406719, 3.828641, 4.304065, 3.951244, 4.025352, 3.465736, 4.025352, 4.406719, 4.543295, 4.442651, 4.488636, 4.521789, 4.406719, 4.158883, 4.094345, 3.806662, 3.367296, 3.218876, 2.890372, 3.433987, 3.178054, 3.610918, 3.637586, 4.077537, 4.189655, 4.077537, 4.418841, 4.174387, 3.688879, 3.526361, 2.995732, 3.433987, 2.833213, 3.135494, 2.944439, 2.890372, 3.218876, 3.465736, 2.995732, 3.044522, 3.044522, 2.70805, 3.610918, 3.637586, 3.135494, 3.465736, 3.737670, 3.332205, 3.401197, 3.258097, 2.772589, 2.564949, 3.737670, 3.663562, 3.737670, 3.688879, 3.091042, 2.890372, 3.044522, 2.70805, 3.367296, 3.091042, 2.639057, 3.135494, 3.258097, 2.890372, 3.555348, 3.610918, 2.70805, 3.258097, 3.135494, 3.367296, 3.526361, 3.7612, 3.433987, 3.218876, 3.526361, 3.401197, 2.995732, 2.302585, 3.433987, 3.688879, 3.610918, 4.127134, 3.401197, 3.367296, 3.332205, 3.401197, 3.292387, 2.995732, 2.397895, 2.564949, 2.484907, 2.639057, 3.178054, 2.890372, 3.367296, 3.218876, 2.639057, 2.639057, 2.302585, 3.135494, 3.610918, 3.332205, 3.526361, 3.663562, 2.890372, 3.332205, 2.772589, 3.367296, 3.218876, 3.465736, 3.135494, 3.637586, 3.737670, 3.332205, 4.343805, 3.663562, 3.465736, 3.044522, 3.258097, 3.044522, 3.401197, 3.295837, 3.496508, 3.135494, 2.944439, 2.995732, 2.397895, 3.401197, 2.890372, 3.218876, 3.496508, 3.433987, 2.564949, 3.044522, 3.496508, 3.258097, 3.496508, 3.828641, 3.044522, 2.70805, 3.091042, 2.890372, 3.295837, 3.044522, 3.610918, 3.713572, 3.610918, 3.610918, 3.637586, 3.044522, 2.944439, 3.135494, 2.70805, 2.772589, 3.332205, 3.465736, 3.135494, 3.264454, 2.302585, 2.302585, 2.302585, 2.397895, 2.302585, 2.70805, 3.044522, 3.258097, 2.302585, 2.302585, 2.302585, 2.302585, 2.70805, 2.833213, 2.302585, 3.044522, 3.258097, 3.044522, 3.78419, 2.70805, 3.555348, 3.610918, 3.688879, 2.995732, 3.663562, 3.091042, 3.610918, 3.637586, 3.583519, 3.89182, 3.433987, 3.332205, 3.496508, 2.302585, 2.302585, 3.258097, 3.178054, 3.713572, 3.496508, 2.484907, 3.970292, 3.367296, 3.178054, 2.302585, 2.890372, 3.218876, 3.135494, 3.610918, 3.713572, 3.178054, 3.713572, 3.637586, 4.043051, 4.290459, 4.007333, 4.158883, 4.49981, 4.094345, 3.912023, 3.258097, 3.218876, 3.218876, 3.951244, 4.094345, 3.828641, 3.332205, 3.89182, 4.382027, 4.477337, 4.510860, 4.454347, 4.553877, 4.343805, 4.26268, 3.610918, 3.496508, 3.433987, 3.663562, 3.433987, 3.332205, 2.890372, 3.178054, 3.828641, 4.025352, 3.610918, 3.610918, 3.496508, 3.433987, 3.258097, 3.850148, 3.135494, 2.833213, 2.890372, 2.197225, 3.583519, 4.430817, 4.488636, 4.75359, 3.091042, 2.890372, 3.218876, 4.204693, 4.343805, 4.60517, 4.644391, 4.976734, 4.406719, 4.430817, 4.382027, 3.091042, 3.496508, 3.583519, 4.110874, 4.174387, 4.007333, 3.951244, 4.007333, 4.060443, 4.025352, 4.094345, 3.688879, 3.988984, 4.406719, 4.65396, 4.75359, 4.532599, 4.85203, 3.401197, 4.454347, 3.433987, 4.110874, 4.574711, 4.75359, 4.49981, 4.189655, 3.828641, 3.433987, 3.988984, 3.401197, 3.871201, 4.736198, 3.951244, 3.091042, 3.737670, 3.637586, 4.077537, 4.290459, 4.532599, 4.804021, 4.356709, 3.828641, 3.7612, 4.174387, 4.317488, 4.276666, 3.218876, 3.988984, 3.850148, 3.433987, 3.713572, 4.077537, 4.26268, 4.330733, 4.356709, 4.025352, 4.248495, 4.382027, 4.382027, 4.521789, 3.555348, 3.89182, 4.174387, 3.931826, 4.442651, 4.543295, 4.795791, 4.406719, 4.317488, 4.356709, 3.465736, 3.7612, 3.78419, 4.356709, 4.477337, 4.060443, 4.663439, 4.70048, 5.075174, 5.327876, 5.081404, 2.397895, 2.70805, 4.042117, 3.637586, 4.488636, 3.496508, 3.931826, 4.49981, 4.477337, 4.043051, 3.555348, 3.988984, 4.127134, 4.204693, 4.158883, 4.477337, 4.110874, 3.988984, 3.970292, 3.912023, 3.433987, 2.397895, 3.970292, 4.077537, 3.871201, 4.317488, 2.484907, 4.477337, 4.110874, 4.369448, 4.007333, 3.912023, 3.401197, 3.295837, 3.496508, 2.833213, 3.295837, 1.386294, 3.583519, 4.043051, 4.418841, 3.828641, 4.356709, 4.465908, 3.332205, 3.637586, 3.737670, 2.772589, 2.772589, 2.944439, 2.484907, 3.199052, 2.70805, 3.044522, 3.496508, 3.526361, 2.890372, 2.639057, 2.639057, 3.091042, 3.178054, 3.178054, 3.401197, 3.828641, 3.713572, 3.044522, 2.833213, 2.944439, 3.663562, 3.713572, 2.944439, 3.258097, 2.772589, 2.302585, 3.713572, 3.526361, 2.564949, 1.791759, 2.890372, 2.833213, 2.639057, 3.496508, 3.433987, 2.944439, 3.258097, 3.091042, 3.258097, 3.178054, 3.091042, 3.465736, 3.806662, 3.7612, 3.401197, 3.178054, 2.484907, 2.302585, 3.401197, 3.951244, 4.007333, 3.401197, 3.871201, 3.401197, 3.610918, 3.737670, 4.110874, 3.178054, 3.367296, 3.135494, 2.772589, 3.367296, 3.663562, 3.713572, 3.713572, 3.713572, 3.526361, 2.833213, 2.944439, 3.526361, 3.688879, 4.025352, 3.806662, 3.610918, 3.295837, 3.417625, 3.583519, 3.713572, 3.89182, 3.78419, 3.555348, 3.637586, 3.78419, 3.871201, 3.433987, 3.713572, 3.433987, 3.367296, 3.295837, 3.496508, 3.465736, 3.637586, 3.367296, 2.302585, 3.218876, 3.044522, 2.639057, 2.772589, 2.397895, 3.526361, 3.7612, 3.610918, 3.135494, 3.526361, 3.433987, 3.663562, 3.426712, 3.430163, 3.258097, 2.944439, 3.091042, 3.044522, 3.178054, 3.401197, 3.637586, 3.806662, 3.951244, 3.970292, 3.555348, 2.944439, 3.292169, 3.135494, 2.995732, 2.833213, 3.258097, 3.496508, 3.295837, 3.295837, 2.772589, 2.302585, 2.397895, 2.70805, 3.465736, 3.178054, 3.433987, 3.258097, 2.639057, 2.197225, 3.135494, 3.367296, 3.332205, 2.564949, 2.70805, 3.178054, 3.091042, 3.289427, 3.291633, 3.367296, 3.610918, 3.828641, 3.610918, 3.332205, 3.583519, 3.806662, 3.988984, 4.025352, 3.912023, 4.189655, 3.295837, 4.043051, 4.248495, 3.806662, 2.302585, 3.218876, 3.433987, 3.258097, 4.248495, 4.304065, 3.871201, 3.871201, 3.806662, 3.178054, 2.995732, 3.465736, 4.26268, 4.382027, 4.369448, 4.077537, 4.043051, 3.912023, 4.234107, 4.204693, 4.174387, 4.127134, 4.394449, 4.26268, 3.78419, 3.367296, 2.564949, 3.401197, 3.931826, 3.970292, 2.639057, 3.091042, 3.713572, 3.970292, 4.219508, 4.204693, 4.290459, 4.26268, 4.174387, 4.59512, 3.663562, 2.772589, 2.079442, 2.397895, 3.044522, 2.079442, 2.397895, 2.484907, 3.951244, 4.043051, 4.060443, 4.077537, 3.465736, 3.218876, 3.091042, 3.663562, 3.091042, 3.367296, 3.367296, 2.890372, 3.828641, 4.369448, 4.532599, 4.60517, 4.127134, 3.401197, 3.465736, 4.143135, 4.356709, 4.634729, 4.812184, 4.454347, 4.248495, 4.290459, 3.663562, 2.772589, 3.295837, 3.828641, 4.043051, 3.850148, 3.970292, 3.988984, 4.077537, 4.060443, 4.143135, 4.49981, 4.127134, 4.025352, 4.634729, 4.553877, 4.59512, 4.394449, 4.75359, 3.931826, 3.367296, 4.158883, 4.26268, 4.248495, 4.804021, 4.624973, 4.584967, 3.78419, 3.78419, 3.89182, 3.988984, 3.912023, 3.988984, 3.258097, 2.833213, 3.401197, 3.555348, 3.433987, 4.276666, 4.382027, 4.369448, 4.465908, 3.7612, 3.258097, 3.663562, 3.7612, 3.637586, 2.833213, 3.433987, 3.401197, 3.258097, 3.401197, 3.555348, 3.951244, 4.248495, 4.430817, 4.127134, 3.951244, 3.970292, 4.025352, 3.663562, 3.258097, 3.78419, 3.433987, 3.78419, 3.688879, 4.418841, 4.248495, 4.110874, 4.189655, 4.356709, 3.663562, 3.78419, 3.688879, 3.951244, 4.465908, 4.110874, 4.521789, 4.553877, 4.997212, 4.882802, 4.718499, 3.555348, 2.564949, 2.197225, 3.091042, 3.044522, 2.197225, 3.555348, 3.871201, 3.7612, 3.258097, 2.833213, 3.688879, 3.78419, 4.043051, 4.418841, 4.564348, 3.970292, 3.871201, 4.043051, 3.555348, 3.871201, 3.433987, 3.663562, 3.258097, 3.555348, 3.555348, 3.526361, 3.637586, 4.158883, 3.850148, 3.931826, 3.737670, 3.218876, 3.044522, 3.931826, 3.828641, 3.737670, 2.833213, 2.564949, 3.637586, 4.025352, 4.382027, 4.430817, 3.129003, 2.564949, 2.833213, 3.850148, 4.127134, 4.143135, 3.931826, 2.833213, 2.833213, 3.044522, 2.833213, 3.526361, 3.044522, 2.197225, 3.091042, 3.044522, 2.079442, 2.833213, 2.564949, 3.218876, 3.218876, 3.367296, 2.079442, 3.218876, 3.367296, 4.060443, 4.304065, 3.218876, 2.079442, 2.484907, 2.079442, 2.833213, 2.484907, 2.079442, 2.079442, 2.484907, 2.079442, 2.833213, 3.367296, 3.367296, 2.833213, 3.044522, 2.772589, 3.044522, 2.995732, 3.218876, 3.496508, 4.043051, 3.713572, 2.484907, 2.484907, 1.386294, 3.044522, 3.367296, 3.496508, 3.806662, 3.218876, 3.218876, 3.713572, 3.806662, 3.610918, 2.079442, 1.386294, 2.079442, 2.484907, 2.772589, 2.995732, 3.78419, 3.871201, 4.025352, 3.688879, 3.178054, 2.772589, 3.610918, 3.713572, 4.025352, 4.219508, 4.007333, 3.951244, 3.465736, 3.178054, 3.044522, 3.496508, 3.78419, 4.330733, 3.135494, 3.401197, 3.78419, 3.871201, 3.78419, 3.688879, 3.78419, 3.583519, 3.871201, 3.688879, 3.465736, 3.688879, 2.484907, 1.386294, 2.995732, 2.484907, 2.079442, 2.079442, 2.484907, 3.332205, 3.688879, 2.995732, 2.484907, 2.995732, 3.178054, 3.688879, 3.850148, 3.850148, 2.772589, 2.079442, 3.332205, 3.465736, 3.583519, 3.688879, 3.78419, 3.688879, 3.555348, 3.970292, 3.583519, 2.772589, 2.079442, 2.484907, 3.178054, 2.995732, 3.178054, 2.079442, 2.079442, 3.178054, 2.484907, 2.079442, 2.079442, 2.079442, 2.484907, 2.079442, 2.772589, 2.995732, 2.079442, 1.386294, 2.079442, 2.079442, 2.772589, 2.079442, 2.079442, 2.484907, 2.484907, 2.772589, 3.178054, 2.772589, 3.178054, 2.772589, 2.484907, 2.995732, 3.610918, 3.332205, 3.89182, 4.043051, 3.806662, 3.806662, 2.484907, 3.89182, 3.367296, 2.079442, 2.079442, 2.079442, 2.079442, 2.484907, 3.806662, 3.806662, 3.332205, 2.484907, 3.332205, 2.484907, 2.484907, 3.828641, 3.637586, 4.060443, 4.127134, 4.060443, 4.127134, 4.060443, 4.317488, 4.369448, 4.356709, 4.356709, 4.043051, 3.806662, 2.995732, 2.564949, 2.197225, 3.044522, 3.637586, 3.526361, 2.564949, 2.079442, 3.218876, 3.401197, 3.367296, 3.496508, 4.060443, 3.737670, 3.912023, 4.204693, 3.713572, 3.647157, 3.704281, 3.708203, 3.631565, 3.594686, 3.736023, 3.688879, 3.693648, 3.69924, 3.700545, 3.638228, 3.58365, 3.218876, 3.091042, 3.258097, 3.258097, 2.197225, 2.079442, 2.197225, 2.833213, 4.043051, 4.110874, 3.663562, 2.564949, 3.258097, 2.890372, 3.555348, 3.258097, 4.418841, 4.615121, 3.951244, 3.258097, 3.951244, 3.401197, 2.833213, 3.703463, 3.703346, 3.715738, 3.67203, 3.673783, 3.583519, 2.564949, 2.079442, 3.828641, 3.737670, 3.526361, 2.079442, 3.637586, 3.737670, 3.526361, 3.526361, 3.912023, 2.833213, 3.044522, 3.737670, 3.526361, 3.737670, 4.007333, 4.077537, 4.330733, 2.079442, 3.044522, 3.637586, 2.833213, 3.367296, 3.367296, 3.688879, 3.332205, 3.688879, 3.89182, 4.143135, 4.060443, 4.615121, 4.442651, 3.951244, 3.931826, 3.7612, 4.330733, 4.564348, 4.369448, 3.091042, 4.430817, 4.043051, 3.465736, 3.555348, 3.931826, 4.204693, 4.49981, 4.532599, 4.234107, 4.382027, 4.59512, 4.634729, 4.317488, 3.663562, 4.454347, 3.656724, 3.709541, 4.113506, 4.122, 4.465908, 4.110874, 4.158883, 4.442651, 3.828641, 4.356709, 4.584967, 4.828314, 4.70048, 4.543295, 4.70953, 4.736198, 5.056246, 5.159055, 5.247024, 3.401197, 2.833213, 2.890372, 3.663562, 4.442651, 3.806662, 4.454347, 4.779123, 4.644391, 4.60517, 3.637586, 4.418841, 4.65396, 4.430817, 4.317488, 4.727388, 4.430817, 4.007333, 4.276666, 3.806662, 4.158883, 3.465736, 4.174387, 4.510860, 4.543295, 4.736198, 4.744932, 4.682131, 4.574711, 4.26268, 3.828641, 3.806662, 3.610918, 3.044522, 3.367296, 3.465736, 3.135494, 2.772589, 3.135494, 4.025352, 4.158883, 3.970292, 4.143135, 4.418841, 3.713572, 2.995732, 3.258097, 3.295837, 2.944439, 3.178054, 2.397895, 3.135494, 2.944439, 2.995732, 2.772589, 3.295837, 3.295837, 2.302585, 2.302585, 2.944439, 2.944439, 3.367296, 3.496508, 3.871201, 3.951244, 3.332205, 2.70805, 3.526361, 3.637586, 3.526361, 3.433987, 2.564949, 2.944439, 2.890372, 2.772589, 2.772589, 2.944439, 2.833213, 3.091042, 2.944439, 3.044522, 3.433987, 3.401197, 3.526361, 3.258097, 2.890372, 3.465736, 2.890372, 3.258097, 3.637586, 3.663562, 3.663562, 3.496508, 3.367296, 2.564949, 2.890372, 3.526361, 3.713572, 3.737670, 3.637586, 3.637586, 3.044522, 4.007333, 3.663562, 3.7612, 3.178054, 2.833213, 2.70805, 2.079442, 2.772589, 3.401197, 3.367296, 3.401197, 3.555348, 3.465736, 2.890372, 2.484907, 3.258097, 3.433987, 3.637586, 3.565724, 3.610918, 3.178054, 3.332205, 3.465736, 3.7612, 3.583519, 3.806662, 3.637586, 3.688879, 3.912023, 3.555348, 3.737670, 3.970292, 3.610918, 3.465736, 3.526361, 3.78419, 3.737670, 3.637586, 3.566381, 3.806662, 3.465736, 3.295837, 2.890372, 3.091042, 3.135494, 3.258097, 3.850148, 3.806662, 3.465736, 3.526361, 3.871201, 3.912023, 4.094345, 4.248495, 3.583519, 3.044522, 3.496508, 3.367296, 3.663562, 3.7612, 3.970292, 3.970292, 3.850148, 3.951244, 3.555348, 3.433987, 2.397895, 3.044522, 3.218876, 2.302585, 2.833213, 3.253905, 3.253894, 3.253967, 3.25476, 2.397895, 2.397895, 2.302585, 3.367296, 3.367296, 3.218876, 3.433987, 2.639057, 2.944439, 2.944439, 3.218876, 3.135494, 2.484907, 1.94591, 2.70805, 2.397895, 3.583519, 3.526361, 3.564797, 3.565264, 3.56604, 4.025352, 3.688879, 3.850148, 4.127134, 4.110874, 4.007333, 3.951244, 4.143135, 4.077537, 3.806662, 4.110874, 3.713572, 2.564949, 3.295837, 3.496508, 3.465736, 4.143135, 3.931826, 3.7612, 3.688879, 3.737670, 3.433987, 3.178054, 3.526361, 3.988984, 4.219508, 4.26268, 4.127134, 4.043051, 4.143135, 4.49981, 4.615121, 4.59512, 4.70048, 4.564348, 4.644391, 4.26268, 3.610918, 3.526361, 3.78419, 4.060443, 4.219508, 3.951244, 2.944439, 4.025352, 4.644391, 4.615121, 4.532599, 4.564348, 4.70953, 4.488636, 4.138728, 3.806662, 3.367296, 3.367296, 3.258097, 3.688879, 3.332205, 2.772589, 2.833213, 3.912023, 4.330733, 4.382027, 4.60517, 4.189655, 3.912023, 4.077537, 3.7612, 3.332205, 3.496508, 3.663562, 2.995732, 3.737670, 4.430817, 4.70048, 4.919981, 4.430817, 3.526361, 4.043051, 4.477337, 4.615121, 4.430817, 4.113240, 4.137309, 3.680569, 3.759989, 4.176277, 3.135494, 3.737670, 3.806662, 3.970292, 4.127134, 3.78419, 3.583519, 4.025352, 3.78419, 3.7612, 4.330733, 4.127134, 3.89182, 4.532599, 4.634729, 4.59512, 4.779123, 4.787492, 4.007333, 3.828641, 4.174387, 4.521789, 4.65396, 4.70048, 4.736198, 4.828314, 3.970292, 3.258097, 3.931826, 4.143135, 4.174387, 4.406719, 3.610918, 3.526361, 3.78419, 3.637586, 3.688879, 4.26268, 4.465908, 4.624973, 3.828641, 3.7612, 3.78419, 4.143135, 3.806662, 2.772589, 1.791759, 3.931826, 2.995732, 3.583519, 3.610918, 3.610918, 4.343805, 4.369448, 4.143135, 4.007333, 4.094345, 4.094345, 4.330733, 3.258097, 2.944439, 3.806662, 4.70048, 4.276666, 4.356709, 4.634729, 4.70953, 4.127134, 4.110874, 4.077537, 2.890372, 3.091042, 4.043051, 4.343805, 4.584967, 4.189655, 4.672829, 4.615121, 4.89784, 5.187386, 5.056246, 3.888758, 2.833213, 3.838519, 3.970292, 3.637586, 2.944439, 3.970292, 4.317488, 4.060443, 3.688879, 3.465736, 3.610918, 4.110874, 3.912023, 3.89182, 4.727388, 4.330733, 4.043051, 3.555348, 3.178054, 3.871201, 2.397895, 3.871201, 3.828641, 3.931826, 3.970292, 4.043051, 4.477337, 4.204693, 4.382027, 3.988984, 3.178054, 3.091042, 2.944439, 3.555348, 2.079442, 3.78419, 3.761848, 2.772589, 3.78419, 3.970292, 4.672829, 3.970292, 4.394449, 3.583519, 3.401197, 3.230718, 3.526361, 2.564949, 3.044522, 2.484907, 2.397895, 2.833213, 2.772589, 3.555348, 3.465736, 3.218876, 2.70805, 2.944439, 3.091042, 2.70805, 2.944439, 3.258097, 3.610918, 3.583519, 3.135494, 3.091042, 3.332205, 3.465736, 3.610918, 3.295837, 2.397895, 2.944439, 1.791759, 2.564949, 3.287627, 3.286781, 3.287919, 3.290965, 2.564949, 2.639057, 2.995732, 3.367296, 2.484907, 3.044522, 2.197225, 2.833213, 2.890372, 3.258097, 3.637586, 3.737670, 3.637586, 3.555348, 2.890372, 2.772589, 2.70805, 3.367296, 4.060443, 3.970292, 3.135494, 3.713572, 3.465736, 3.688879, 3.806662, 3.78419, 3.295837, 3.295837, 3.433987, 2.944439, 3.465736, 3.931826, 3.871201, 4.025352, 4.234107, 3.806662, 3.295837, 3.295837, 3.465736, 3.496508, 3.806662, 3.465736, 3.258097, 3.178054, 3.044522, 3.850148, 3.688879, 3.637586, 3.555348, 3.555348, 3.610918, 4.007333, 4.060443, 3.871201, 3.970292, 4.007333, 3.610918, 3.526361, 3.555348, 3.737670, 3.828641, 3.583519, 2.890372, 2.833213, 2.197225, 3.091042, 3.332205, 3.258097, 3.496508, 3.713572, 3.78419, 3.610918, 3.7612, 3.526361, 3.526361, 3.89182, 4.110874, 3.465736, 2.484907, 3.465736, 3.465736, 3.555348, 3.688879, 3.78419, 3.988984, 3.663562, 3.78419, 3.78419, 2.772589, 3.223166, 3.225338, 3.196165, 3.196797, 3.220981, 3.222532, 3.222182, 3.222923, 3.225644, 3.196357, 3.196892, 3.220655, 3.222682, 3.222163, 3.367296, 2.70805, 2.302585, 2.197225, 2.772589, 2.890372, 3.135494, 2.772589, 2.564949, 2.890372, 2.70805, 3.332205, 3.367296, 3.308143, 2.397895, 2.302585, 3.332205, 3.401197, 3.637586, 3.583519, 3.637586, 4.043051, 3.737670, 3.970292, 3.663562, 3.688879, 4.060443, 3.737670, 2.70805, 2.564949, 2.302585, 3.465736, 3.850148, 4.219508, 3.178054, 2.397895, 3.332205, 2.639057, 2.302585, 3.295837, 4.025352, 4.304065, 3.526361, 4.143135, 3.970292, 3.951244, 4.025352, 4.343805, 4.532599, 4.110874, 4.369448, 4.094345, 3.89182, 3.756664, 3.332205, 3.610918, 4.025352, 3.988984, 3.465736, 2.833213, 3.970292, 3.951244, 3.850148, 3.931826, 4.406719, 4.234107, 4.043051, 4.382027, 3.433987, 3.258097, 2.890372, 1.609438, 3.258097, 2.890372, 2.70805, 2.944439, 3.870924, 3.849606, 3.899533, 3.842846, 3.741077, 3.178054, 3.367296, 3.258097, 3.915751, 3.873959, 3.775029, 3.738807, 3.847100, 4.143135, 4.574711, 4.634729, 4.143135, 3.583519, 3.583519, 4.094345, 3.880055, 3.865061, 4.828314, 4.465908, 4.317488, 4.356709, 4.077537, 3.258097, 3.295837, 3.555348, 3.688879, 3.7612, 3.178054, 3.931826, 3.828641, 3.737670, 3.713572, 3.89182, 3.688879, 3.688879, 4.043051, 4.110874, 4.060443, 3.951244, 4.70048, 3.465736, 3.332205, 3.806662, 3.951244, 4.043051, 4.406719, 4.521789, 4.564348, 4.219508, 3.583519, 3.871201, 2.833213, 3.258097, 3.912023, 3.583519, 2.890372, 3.258097, 3.912023, 4.143135, 4.204693, 4.564348, 4.510860, 4.158883, 3.295837, 3.970292, 4.317488, 4.454347, 3.850148, 3.580848, 3.637586, 3.951244, 3.367296, 3.637586, 3.713572, 3.850148, 4.043051, 4.025352, 3.850148, 4.025352, 4.219508, 4.442651, 4.143135, 3.091042, 3.401197, 3.931826, 4.234107, 4.532599, 4.219508, 4.369448, 3.89182, 3.828641, 4.025352, 3.806662, 3.367296, 3.850148, 4.330733, 4.521789, 3.931826, 4.521789, 4.60517, 4.804021, 4.983607, 5.049856, 2.833213, 2.302585, 2.639057, 3.135494, 4.007333, 3.496508, 3.850148, 4.394449, 4.418841, 4.060443, 3.526361, 3.583519, 4.043051, 4.060443, 4.219508, 4.442651, 3.951244, 3.688879, 3.806662, 3.828641, 3.828641, 3.044522, 3.688879, 4.060443, 4.248495, 4.317488, 4.304065, 4.394449, 4.442651, 4.26268, 3.688879, 3.555348, 3.218876, 3.258097, 3.091042, 3.258097, 3.258097, 2.944439, 3.332205, 3.78419, 4.143135, 4.158883, 4.406719, 4.143135, 3.637586, 3.401197, 3.367296, 3.295837, 2.397895, 3.367296, 2.772589, 2.564949, 2.995732, 2.944439, 2.890372, 3.258097, 3.258097, 3.258097, 3.135494, 2.833213, 2.995732, 3.044522, 3.218876, 3.555348, 3.688879, 3.091042, 3.135494, 3.178054, 3.583519, 3.610918, 3.044522, 2.397895, 2.484907, 2.70805, 2.564949, 2.302585, 3.135494, 2.944439, 2.302585, 2.772589, 3.178054, 2.564949, 3.178054, 2.944439, 3.135494, 3.583519, 3.332205, 3.181502, 3.186625, 3.806662, 3.496508, 3.806662, 3.496508, 3.295837, 2.70805, 3.218876, 3.610918, 3.688879, 3.737670, 3.555348, 3.496508, 2.944439, 3.555348, 3.850148, 3.135494, 3.295837, 3.044522, 2.833213, 2.564949, 3.295837, 3.806662, 3.218876, 3.806662, 3.78419, 3.332205, 3.044522, 3.218876, 3.526361, 3.433987, 3.196074, 3.196778, 3.190419, 3.190704, 3.195836, 3.196414, 3.195706, 3.196165, 3.196935, 3.190540, 3.190599, 3.195650, 3.19648, 3.195919, 3.197265, 3.198067, 3.191567, 3.191673, 3.196778, 3.197485, 3.197097, 3.197145, 3.332205, 3.295837, 2.995732, 2.397895, 2.564949, 3.135494, 3.433987, 3.89182, 3.526361, 3.044522, 3.401197, 3.555348, 3.332205, 4.043051, 3.850148, 3.178054, 2.995732, 3.258097, 3.178054, 2.944439, 3.465736, 3.555348, 3.806662, 3.663562, 3.688879, 3.332205, 3.135494, 2.397895, 2.833213, 2.995732, 2.70805, 3.401197, 3.610918, 2.70805, 2.833213, 2.302585, 2.302585, 2.302585, 2.302585, 2.833213, 2.772589, 3.367296, 3.044522, 2.302585, 2.302585, 2.833213, 3.044522, 3.091042, 2.772589, 2.995732, 2.890372, 3.367296, 3.433987, 3.191, 3.401197, 3.806662, 4.26268, 4.110874, 3.663562, 3.912023, 3.496508, 3.688879, 3.89182, 3.637586, 3.871201, 3.526361, 3.737670, 3.044522, 2.302585, 2.772589, 2.944439, 3.526361, 3.912023, 3.78419, 2.890372, 3.970292, 3.7612, 3.496508, 3.091042, 2.944439, 3.091042, 4.189655, 3.89182, 3.806662, 3.850148, 3.850148, 4.189655, 4.234107, 4.477337, 4.615121, 3.912023, 4.369448, 3.988984, 3.555348, 3.044522, 3.178054, 2.772589, 3.637586, 4.007333, 3.663562, 3.465736, 3.970292, 4.219508, 4.543295, 4.564348, 4.672829, 4.584967, 4.406719, 4.49981, 3.737670, 3.295837, 3.135494, 3.295837, 3.135494, 3.091042, 2.772589, 2.564949, 3.663562, 3.970292, 3.526361, 4.158883, 2.564949, 3.135494, 3.091042, 3.401197, 2.772589, 3.713119, 3.691092, 3.664394, 3.678512, 3.702766, 3.70019, 4.624973, 3.806662, 2.564949, 3.737670, 4.007333, 4.060443, 4.317488, 4.762174, 4.574711, 4.248495, 4.290459, 4.094345, 2.564949, 3.332205, 3.178054, 3.850148, 4.060443, 4.025352, 3.871201, 3.912023, 3.951244, 3.713572, 3.806662, 3.637586, 3.806662, 4.382027, 4.418841, 4.317488, 4.454347, 4.442651, 3.218876, 3.218876, 3.258097, 3.737670, 4.276666, 4.158883, 4.488636, 4.143135, 3.610918, 3.332205, 3.7612, 3.258097, 3.496508, 3.715299, 3.637586, 2.70805, 3.332205, 4.26268, 4.158883, 4.204693, 4.343805, 4.65396, 4.060443, 3.931826, 4.077537, 4.488636, 4.634729, 4.70953, 3.135494, 4.276666, 4.317488, 3.583519, 3.7612, 4.248495, 4.290459, 4.465908, 4.343805, 4.343805, 4.317488, 4.488636, 4.634729, 4.770685, 3.295837, 4.60517, 4.75359, 4.060443, 4.49981, 4.795791, 4.804021, 4.49981, 4.59512, 4.394449, 4.356709, 4.26268, 4.672829, 4.624973, 4.744932, 4.418841, 4.770685, 4.770685, 5.043425, 5.164786, 5.198497, 4.26268, 1.609438, 3.830578, 3.825114, 3.840225, 3.683255, 3.7844, 3.841227, 3.697488, 3.821425, 3.686433, 3.692976, 4.682131, 4.343805, 4.70953, 4.744932, 4.26268, 4.043051, 4.394449, 3.931826, 3.988984, 3.433987, 4.234107, 4.532599, 4.634729, 4.356709, 4.49981, 4.718499, 4.532599, 4.418841, 4.110874, 3.850148, 3.583519, 2.302585, 3.135494, 3.806662, 3.583519, 2.564949, 3.7612, 4.158883, 4.465908, 4.330733, 4.406719, 4.574711, 3.7612, 3.240752, 3.713572, 3.583519, 3.091042, 3.433987, 3.258097, 3.178054, 3.295837, 3.218876, 3.583519, 3.78419, 3.828641, 3.178054, 2.995732, 3.295837, 3.135494, 3.496508, 3.806662, 3.970292, 4.007333, 3.688879, 3.044522, 3.610918, 3.7612, 3.78419, 3.465736, 2.772589, 2.484907, 2.833213, 2.70805, 2.484907, 2.772589, 2.564949, 2.639057, 2.639057, 2.890372, 3.433987, 3.401197, 3.332205, 3.367296, 3.332205, 3.496508, 3.295837, 3.295837, 3.970292, 3.951244, 3.828641, 3.583519, 3.135494, 2.890372, 2.995732, 3.583519, 4.007333, 3.970292, 3.583519, 3.688879, 3.465736, 3.526361, 3.871201, 3.931826, 3.465736, 3.433987, 3.258097, 2.944439, 3.367296, 3.637586, 3.713572, 3.806662, 3.850148, 3.555348, 3.044522, 2.079442, 2.833213, 3.496508, 3.912023, 3.806662, 3.663562, 3.465736, 3.218876, 3.688879, 3.713572, 3.610918, 3.688879, 3.713572, 3.713572, 3.951244, 3.850148, 3.850148, 3.828641, 3.806662, 3.555348, 3.526361, 3.7612, 3.637586, 3.89182, 3.555348, 3.496508, 3.637586, 3.496508, 3.258097, 3.044522, 3.367296, 3.526361, 3.688879, 3.828641, 3.433987, 3.496508, 3.583519, 3.433987, 3.269056, 3.272982, 3.262234, 3.26235, 3.266305, 3.270298, 3.268266, 3.737670, 3.806662, 3.912023, 3.737670, 3.871201, 3.555348, 3.637586, 3.135494, 3.295837, 3.044522, 2.890372, 3.135494, 3.688879, 3.828641, 3.912023, 3.258097, 2.772589, 1.609438, 3.367296, 3.78419, 3.178054, 3.583519, 3.367296, 2.772589, 2.995732, 3.555348, 3.526361, 3.254770, 3.255762, 3.258427, 3.251134, 3.251076, 3.252998, 3.256499, 3.264315, 3.265432, 3.269020, 3.258656, 3.259028, 3.262628, 3.266461, 3.264480, 3.828641, 3.637586, 3.78419, 3.637586, 3.526361, 3.931826, 3.465736, 2.772589, 2.564949, 3.091042, 3.526361, 3.89182, 3.828641, 3.295837, 2.772589, 3.258097, 3.135494, 2.772589, 3.258097, 3.806662, 4.025352, 3.688879, 3.871201, 3.713572, 3.637586, 3.988984, 4.189655, 4.143135, 4.077537, 4.043051, 3.970292, 3.970292, 3.258097, 3.178054, 3.091042, 3.688879, 3.713572, 3.295837, 2.772589, 3.526361, 4.007333, 4.025352, 3.850148, 3.970292, 4.060443, 3.828641, 3.89182, 3.465736, 3.044522, 2.70805, 2.564949, 2.944439, 2.484907, 1.791759, 2.079442, 3.367296, 3.688879, 3.637586, 3.871201, 3.332205, 3.295837, 3.178054, 3.091042, 2.772589, 2.564949, 3.044522, 2.397895, 3.555348, 4.189655, 4.406719, 4.454347, 3.912023, 3.332205, 3.433987, 3.912023, 3.815768, 4.317488, 4.382027, 4.219508, 4.025352, 4.158883, 3.555348, 2.564949, 2.772589, 3.465736, 3.931826, 3.806662, 3.7612, 3.367296, 3.828641, 3.295837, 3.367296, 4.043051, 3.89182, 3.496508, 4.317488, 4.356709, 4.488636, 4.382027, 4.343805, 3.332205, 3.433987, 3.688879, 4.043051, 4.043051, 4.077537, 4.158883, 4.110874, 1.94591, 2.079442, 3.044522, 1.386294, 3.89182, 3.89182, 3.931826, 4.110874, 4.204693, 4.204693, 4.406719, 3.89182, 3.295837, 4.025352, 3.583519, 3.850148, 3.526361, 3.713572, 4.158883, 4.204693, 4.110874, 4.127134, 4.158883, 4.189655, 3.828641, 3.583519, 3.663562, 3.218876, 1.94591, 2.564949, 4.204693, 4.49981, 4.465908, 4.394449, 4.025352, 3.610918, 3.931826, 4.219508, 4.442651, 4.564348, 4.394449, 4.043051, 3.970292, 4.356709, 3.931826, 3.970292, 3.988984, 4.304065, 4.510860, 3.828641, 4.430817, 4.70953, 4.919981, 4.912655, 4.787492, 3.135494, 2.944439, 3.135494, 3.044522, 3.78419, 3.465736, 3.828641, 4.317488, 4.521789, 4.077537, 3.178054, 3.931826, 4.110874, 4.204693, 4.204693, 4.406719, 3.89182, 3.295837, 4.025352, 3.583519, 3.850148, 3.526361, 3.713572, 4.158883, 4.204693, 4.110874, 4.127134, 4.158883, 4.189655, 3.828641, 3.583519, 3.663562, 3.218876, 1.94591, 2.564949, 3.741107, 3.792194, 3.838041, 3.787539, 3.807046, 3.610918, 3.931826, 4.219508, 3.044522, 3.218876, 3.135494, 3.221973, 3.178054, 3.091042, 3.496508, 3.091042, 2.944439, 3.091042, 3.091042, 3.135494, 3.496508, 3.7612, 3.178054, 2.70805, 3.135494, 2.302585, 2.484907, 3.295837, 3.610918, 2.564949, 2.079442, 1.791759, 2.639057, 3.223127, 2.564949, 3.044522, 1.791759, 3.89182, 3.871201, 3.78419, 3.688879, 3.496508, 3.433987, 3.465736, 3.465736, 3.433987, 3.433987, 2.197225, 2.995732, 1.098612, 1.791759, 3.401197, 3.367296, 3.295837, 3.295837, 3.295837, 3.291887, 3.292836, 3.272434, 3.275655, 3.29117, 3.292067, 3.218876, 2.944439, 2.944439, 3.401197, 2.772589, 3.290586, 3.850148, 3.850148, 3.496508, 3.367296, 3.295837, 3.044522, 3.401197, 3.555348, 3.526361, 3.496508, 3.663562, 3.610918, 3.465736, 3.465736, 3.332205, 3.135494, 3.806662, 3.610918, 3.465736, 3.401197, 3.610918, 3.637586, 3.931826, 4.007333, 3.951244, 3.828641, 3.970292, 4.060443, 4.189655, 4.204693, 3.555348, 3.465736, 2.772589, 2.995732, 3.044522, 3.304294, 3.688879, 3.465736, 2.890372, 2.944439, 2.564949, 1.94591, 2.302585, 3.044522, 2.70805, 3.091042, 3.135494, 2.639057, 2.890372, 3.258097, 3.737670, 3.555348, 3.806662, 3.295837, 2.833213, 3.258097, 3.091042, 2.995732, 3.218876, 3.496508, 3.465736, 3.496508, 3.465736, 3.433987, 3.367296, 3.433987, 3.135494, 2.995732, 3.135494, 3.465736, 3.610918, 3.258097, 3.135494, 3.044522, 2.772589, 2.302585, 2.944439, 2.944439, 2.944439, 3.178054, 3.295837, 2.197225, 2.70805, 2.995732, 3.091042, 3.258097, 3.044522, 2.833213, 3.044522, 3.135494, 3.091042, 3.332205, 3.295837, 3.258097, 3.258097, 2.833213, 2.833213, 2.944439, 3.295837, 3.218876, 3.295837, 3.091042, 2.833213, 3.044522, 3.555348, 3.688879, 2.890372, 2.639057, 3.044522, 2.639057, 3.295837, 3.555348, 3.135494, 2.995732, 3.044522, 2.564949, 2.397895, 2.302585, 3.258097, 3.295837, 3.332205, 3.178054, 3.433987, 3.433987, 3.610918, 3.912023, 4.189655, 3.931826, 4.025352, 4.127134, 3.713572, 3.555348, 3.295837, 3.218876, 3.091042, 3.871201, 3.433987, 4.330733, 3.332205, 3.828641, 4.317488, 4.110874, 3.988984, 4.007333, 4.077537, 4.356709, 4.189655, 3.637586, 2.995732, 2.944439, 2.197225, 2.944439, 2.397895, 2.302585, 1.386294, 2.772589, 4.025352, 3.135494, 3.526361, 2.302585, 2.079442, 3.178054, 3.258097, 2.890372, 2.890372, 2.944439, 1.386294, 3.583519, 4.442651, 4.663439, 4.60517, 4.025352, 3.135494, 3.496508, 3.931826, 4.204693, 4.488636, 4.672829, 4.454347, 4.158883, 4.442651, 4.158883, 2.639057, 3.465736, 3.610918, 4.025352, 3.806662, 3.688879, 3.78419, 4.110874, 3.871201, 3.931826, 3.7612, 4.025352, 4.060443, 4.304065, 4.442651, 4.644391, 4.330733, 4.330733, 3.526361, 3.295837, 3.7612, 3.970292, 4.394449, 4.615121, 4.304065, 3.555348, 3.332205, 2.944439, 3.044522, 3.218876, 3.496508, 4.248495, 2.995732, 2.484907, 2.772589, 3.135494, 2.772589, 3.7612, 4.382027, 3.713572, 3.595138, 3.044522, 3.178054, 3.89182, 3.610918, 3.688879, 3.511623, 3.401197, 3.367296, 3.178054, 3.044522, 2.564949, 3.78419, 4.158883, 4.330733, 4.007333, 3.610918, 4.248495, 3.951244, 3.178054, 2.944439, 3.178054, 2.944439, 3.295837, 3.931826, 3.7612, 3.465736, 3.688879, 3.78419, 2.772589, 2.995732, 3.367296, 3.332205, 3.663562, 3.044522, 3.295837, 3.912023, 3.713572, 4.60517, 5.056246, 4.934474, 3.465736, 2.772589, 2.772589, 2.890372, 3.401197, 3.178054, 3.871201, 4.174387, 3.7612, 4.234107, 3.091042, 3.610918, 3.828641, 2.833213, 3.178054, 4.442651, 4.394449, 4.077537, 2.890372, 3.178054, 3.828641, 3.526361, 3.713572, 4.077537, 4.356709, 3.951244, 3.912023, 3.295837, 4.043051, 3.78419, 4.025352, 3.433987, 3.367296, 1.609438, 2.397895, 2.833213, 3.332205, 2.639057, 2.833213, 3.737670, 3.871201, 3.465736, 3.931826, 4.356709, 2.890372, 2.772589, 3.295837, 2.890372, 2.484907, 3.044522, 2.302585, 2.772589, 1.94591, 2.639057, 2.944439, 3.044522, 3.367296, 2.639057, 2.944439, 3.367296, 3.332205, 2.995732, 3.555348, 3.912023, 3.828641, 3.496508, 2.484907, 3.135494, 3.367296, 3.737670, 3.091042, 2.484907, 3.135494, 2.397895, 1.94591, 1.94591, 2.484907, 2.70805, 2.197225, 2.397895, 2.70805, 2.944439, 2.995732, 3.044522, 2.70805, 2.302585, 3.433987, 1.94591, 3.135494, 3.465736, 3.526361, 3.610918, 3.218876, 3.332205, 2.397895, 2.995732, 3.401197, 3.970292, 3.7612, 3.433987, 3.433987, 3.496508, 3.713572, 4.007333, 3.185803, 3.188197, 3.192456, 3.140928, 3.125156, 3.183348, 3.367296, 3.135494, 3.295837, 3.496508, 3.401197, 2.564949, 2.397895, 2.890372, 2.70805, 3.555348, 3.367296, 2.890372, 2.833213, 2.890372, 3.663562, 4.007333, 3.555348, 3.295837, 3.7612, 3.367296, 3.526361, 3.737670, 4.060443, 3.970292, 3.7612, 3.465736, 3.332205, 3.496508, 3.610918, 3.663562, 3.433987, 2.772589, 2.70805, 2.484907, 2.197225, 2.70805, 4.025352, 3.091042, 3.228010, 3.367296, 3.295837, 3.367296, 3.496508, 3.367296, 3.637586, 3.828641, 3.401197, 2.397895, 3.044522, 3.295837, 3.610918, 3.7612, 3.871201, 3.78419, 3.931826, 3.713572, 3.091042, 3.258097, 3.610918, 2.833213, 3.663562, 3.295837, 3.583519, 3.7612, 3.177751, 3.179092, 3.183318, 2.302585, 2.079442, 2.833213, 2.944439, 3.332205, 3.044522, 3.295837, 2.197225, 2.484907, 2.564949, 3.332205, 3.637586, 2.995732, 1.94591, 2.890372, 3.091042, 3.218876, 3.688879, 3.496508, 3.89182, 3.496508, 3.688879, 3.091042, 3.713572, 3.526361, 3.555348, 3.78419, 3.951244, 4.189655, 4.110874, 3.850148, 3.89182, 3.433987, 2.564949, 2.397895, 2.772589, 3.135494, 3.931826, 3.828641, 3.367296, 2.772589, 3.044522, 2.397895, 1.94591, 2.944439, 3.555348, 4.025352, 4.127134, 3.931826, 3.970292, 4.025352, 4.204693, 4.304065, 4.532599, 4.60517, 4.442651, 4.418841, 4.158883, 3.178054, 3.332205, 3.465736, 2.944439, 3.583519, 2.772589, 2.079442, 3.651187, 4.174387, 3.401197, 3.367296, 4.025352, 4.007333, 4.127134, 4.521789, 3.465736, 1.94591, 3.295837, 1.94591, 3.647697, 3.612128, 1.94591, 3.652531, 2.944439, 3.433987, 3.218876, 4.060443, 3.713572, 2.890372, 2.639057, 2.639057, 3.295837, 3.608928, 2.944439, 2.079442, 3.637586, 3.828641, 4.025352, 4.49981, 3.951244, 2.397895, 3.433987, 3.7612, 3.465736, 3.433987, 4.60517, 4.174387, 3.7612, 3.367296, 2.995732, 3.562601, 2.564949, 2.197225, 2.079442, 2.639057, 2.079442, 2.564949, 1.94591, 2.484907, 1.94591, 2.397895, 3.549905, 1.94591, 2.995732, 2.639057, 3.295837, 3.637586, 4.488636, 3.218876, 2.484907, 2.079442, 2.70805, 3.295837, 3.178054, 3.295837, 4.49981, 3.583519, 2.564949, 2.890372, 3.044522, 3.465736, 3.713572, 4.158883, 3.135494, 3.828641, 4.330733, 4.343805, 4.682131, 4.691348, 4.804021, 4.532599, 4.110874, 4.007333, 4.394449, 4.624973, 4.564348, 4.007333, 3.871201, 4.234107, 3.970292, 3.258097, 4.025352, 4.234107, 4.418841, 4.276666, 4.127134, 4.248495, 4.718499, 4.584967, 4.394449, 3.806662, 3.951244, 4.043051, 4.234107, 4.234107, 4.543295, 4.941642, 4.488636, 4.369448, 4.584967, 4.234107, 4.158883, 4.094345, 4.584967, 4.584967, 3.970292, 4.744932, 4.955827, 5.111988, 5.17615, 4.997212, 3.610918, 3.555348, 3.496508, 3.583519, 3.970292, 3.044522, 4.290459, 4.356709, 4.584967, 4.276666, 3.828641, 4.330733, 4.418841, 4.682131, 4.553877, 4.682131, 4.043051, 3.555348, 4.189655, 4.043051, 3.912023, 3.526361, 4.077537, 4.356709, 4.394449, 4.442651, 4.430817, 4.394449, 4.290459, 4.454347, 3.988984, 3.806662, 3.258097, 2.772589, 3.295837, 2.944439, 3.218876, 3.218876, 3.737670, 4.290459, 4.442651, 4.26268, 4.574711, 4.584967, 3.401197, 3.526361, 3.401197, 3.555348, 3.637586, 3.610918, 3.713572, 2.890372, 3.258097, 3.044522, 3.218876, 3.526361, 3.871201, 3.52103, 3.458688, 3.437908, 3.500061, 3.258097, 3.931826, 4.094345, 4.043051, 3.332205, 2.772589, 3.332205, 3.7612, 3.871201, 3.7612, 3.091042, 3.218876, 3.583519, 3.295837, 2.639057, 2.70805, 2.564949, 3.332205, 3.258097, 3.091042, 3.332205, 3.433987, 3.610918, 3.526361, 3.433987, 3.526361, 3.465736, 3.401197, 3.828641, 3.850148, 3.465736, 3.496508, 3.401197, 2.639057, 3.218876, 3.912023, 4.094345, 3.637586, 3.401197, 3.806662, 3.526361, 3.951244, 3.78419, 3.516967, 3.520732, 3.526361, 3.850148, 3.332205, 3.510073, 3.523839, 3.517038, 3.520672, 3.531471, 3.467898, 3.446816, 3.510123, 3.523782, 3.295837, 4.158883, 3.828641, 3.737670, 2.890372, 3.258097, 3.610918, 3.737670, 3.828641, 3.737670, 3.433987, 3.688879, 3.931826, 3.828641, 3.7612, 4.143135, 3.610918, 3.258097, 3.637586, 3.912023, 3.713572, 4.127134, 3.610918, 2.890372, 3.526361, 3.295837, 2.639057, 2.944439, 2.890372, 3.526361, 3.7612, 3.688879, 3.295837, 3.610918, 3.713572, 3.737670, 4.077537, 4.110874, 3.465736, 2.890372, 3.465736, 3.258097, 3.367296, 3.496508, 3.89182, 4.077537, 4.043051, 3.871201, 3.688879, 3.401197, 2.944439, 3.218876, 2.772589, 3.044522, 3.663562, 3.806662, 3.401197, 3.178054, 2.564949, 2.079442, 2.302585, 3.044522, 3.465736, 3.465736, 3.713572, 3.526361, 2.639057, 2.564949, 3.401197, 3.465736, 3.258097, 2.70805, 2.772589, 3.218876, 3.332205, 3.218876, 3.583519, 3.637586, 3.89182, 3.713572, 3.89182, 3.496508, 3.988984, 4.007333, 4.189655, 4.369448, 4.094345, 4.330733, 4.26268, 4.406719, 4.189655, 3.78419, 2.944439, 3.295837, 3.828641, 4.26268, 4.382027, 4.077537, 3.850148, 3.688879, 3.688879, 2.944439, 2.302585, 3.737670, 4.060443, 4.127134, 4.248495, 3.988984, 4.143135, 4.248495, 4.70953, 4.779123, 4.804021, 4.882802, 4.49981, 4.204693, 4.025352, 3.433987, 3.433987, 3.78419, 4.110874, 3.828641, 3.828641, 3.465736, 4.143135, 4.127134, 4.290459, 4.276666, 4.406719, 4.532599, 4.795791, 4.962845, 4.304065, 3.555348, 3.367296, 3.258097, 3.610918, 3.295837, 2.995732, 3.89182, 4.143135, 4.204693, 4.189655, 4.204693, 2.995732, 3.583519, 3.583519, 3.737670, 3.178054, 3.044522, 3.044522, 2.302585, 4.110874, 4.65396, 4.962845, 4.488636, 4.110874, 3.433987, 3.89182, 4.158883, 4.304065, 4.770685, 4.85203, 4.553877, 4.382027, 4.59512, 4.234107, 3.044522, 3.465736, 3.688879, 3.912023, 4.007333, 3.637586, 4.007333, 4.094345, 4.164883, 4.168201, 4.26268, 4.304065, 4.060443, 4.219508, 4.290459, 4.234107, 4.189655, 4.26268, 3.218876, 3.332205, 4.025352, 4.127134, 4.330733, 4.615121, 4.718499, 4.369448, 3.044522, 3.663562, 3.931826, 2.484907, 3.713572, 4.060443, 3.178054, 3.178054, 3.583519, 3.988984, 3.988984, 3.951244, 4.060443, 4.532599, 3.637586, 3.663562, 3.828641, 4.204693, 4.488636, 4.49981, 3.768402, 3.844261, 4.127134, 3.737670, 3.044522, 3.555348, 3.988984, 4.356709, 3.970292, 4.110874, 3.988984, 4.488636, 4.290459, 4.691348, 4.26268, 4.418841, 4.204693, 4.158883, 4.234107, 4.127134, 3.912023, 3.465736, 3.555348, 4.174387, 3.332205, 4.356709, 4.779123, 4.804021, 4.394449, 3.610918, 4.488636, 3.806662, 5.187386, 5.023881, 4.867534, 3.713572, 3.135494, 2.484907, 3.367296, 3.401197, 3.526361, 3.931826, 4.317488, 4.521789, 3.828641, 3.465736, 3.871201, 4.553877, 4.49981, 4.564348, 4.644391, 4.060443, 3.295837, 4.025352, 3.135494, 4.007333, 3.737670, 4.043051, 4.248495, 3.912023, 4.369448, 4.70048, 4.736198, 4.394449, 3.850148, 3.401197, 3.295837, 3.367296, 2.397895, 3.135494, 3.258097, 3.367296, 2.995732, 3.401197, 3.89182, 4.330733, 4.127134, 4.290459, 3.988984, 3.401197, 3.135494, 2.944439, 3.367296, 3.367296, 3.610918, 2.833213, 2.70805, 2.944439, 3.044522, 3.135494, 3.332205, 3.663562, 3.178054, 2.890372, 3.091042, 2.944439, 3.178054, 3.583519, 3.610918, 3.871201, 3.332205, 2.302585, 3.135494, 3.044522, 3.218876, 3.135494, 2.772589, 3.433987, 3.401197, 3.526361, 3.332205, 3.433987, 3.401197, 3.78419, 3.258097, 3.465736, 3.433987, 3.367296, 3.610918, 3.135494, 3.367296, 3.555348, 3.178054, 3.401197, 3.496508, 3.737670, 3.465736, 3.401197, 3.178054, 2.995732, 3.044522, 3.806662, 3.828641, 3.367296, 3.433987, 3.555348, 3.367296, 3.871201, 4.025352, 4.110874, 3.951244, 3.688879, 3.737670, 3.555348, 3.583519, 3.713572, 3.806662, 3.806662, 3.850148, 3.828641, 3.433987, 3.465736, 3.610918, 3.044522, 3.737670, 3.637586, 3.526361, 2.772589, 3.465736, 3.332205, 3.688879, 3.78419, 3.871201, 3.871201, 3.496508, 3.89182, 3.828641, 4.26268, 3.970292, 3.218876, 4.248495, 3.295837, 3.433987, 3.737670, 3.255249, 3.526361, 3.465736, 3.218876, 2.944439, 2.397895, 2.70805, 3.135494, 3.044522, 3.332205, 3.178054, 2.944439, 3.218876, 3.465736, 3.555348, 3.931826, 3.988984, 3.258097, 2.639057, 3.526361, 3.433987, 3.332205, 3.555348, 3.583519, 3.713572, 3.332205, 3.526361, 3.526361, 3.688879, 3.178054, 3.218876, 3.178054, 3.044522, 3.496508, 3.688879, 3.7612, 3.583519, 3.218876, 2.772589, 2.772589, 3.135494, 2.995732, 3.135494, 3.433987, 3.258097, 2.70805, 2.833213, 3.295837, 3.332205, 3.258097, 3.135494, 2.944439, 3.178054, 3.178054, 3.332205, 2.995732, 3.332205, 3.713572, 3.806662, 3.828641, 3.583519, 3.637586, 3.828641, 3.871201, 4.025352, 3.912023, 3.970292, 3.610918, 4.043051, 3.988984, 3.401197, 1.94591, 2.890372, 3.258097, 3.332205, 3.828641, 3.583519, 3.295837, 3.688879, 3.135494, 2.944439, 2.639057, 3.465736, 3.583519, 3.258097, 3.688879, 3.688879, 3.610918, 3.688879, 3.850148, 3.970292, 3.78419, 3.912023, 3.988984, 3.988984, 3.496508, 3.78419, 3.433987, 3.555348, 4.007333, 3.806662, 3.583519, 3.258097, 4.143135, 4.330733, 3.806662, 4.043051, 4.330733, 4.343805, 4.143135, 4.094345, 3.737670, 3.970292, 3.135494, 2.484907, 3.044522, 2.944439, 1.386294, 2.890372, 3.496508, 4.369448, 4.330733, 3.871201, 3.178054, 3.295837, 3.044522, 3.367296, 2.995732, 3.583519, 3.401197, 2.397895, 3.850148, 4.189655, 4.553877, 4.356709, 4.234107, 3.526361, 3.713572, 4.158883, 4.343805, 4.510860, 4.85203, 4.844187, 4.615121, 4.442651, 4.343805, 2.397895, 3.526361, 3.610918, 4.110874, 3.912023, 3.806662, 4.219508, 4.330733, 4.26268, 4.127134, 4.442651, 4.488636, 4.465908, 4.65396, 4.49981, 4.59512, 4.477337, 4.564348, 3.912023, 3.178054, 3.871201, 4.248495, 4.465908, 4.672829, 4.727388, 4.49981, 2.772589, 3.610918, 3.526361, 3.806662, 4.094345, 4.26268, 2.833213, 3.135494, 3.044522, 3.367296, 3.555348, 4.189655, 4.430817, 4.672829, 3.295837, 4.564348, 3.561574, 4.26268, 4.828314, 3.48955, 2.079442, 3.555348, 4.744932, 3.564588, 4.290459, 3.850148, 4.564348, 3.496595, 3.548638, 3.564719, 4.418841, 3.737670, 3.89182, 3.912023, 3.871201, 3.78419, 3.663562, 3.806662, 3.871201, 4.127134, 4.290459, 4.189655, 4.158883, 3.951244, 4.060443, 3.78419, 3.7612, 4.356709, 4.442651, 4.317488, 4.691348, 4.49981, 4.682131, 5.141664, 4.844187, 3.258097, 3.091042, 3.589379, 3.571189, 3.597471, 3.450082, 3.536092, 3.598123, 3.44766, 3.583999, 3.414118, 3.487379, 4.094345, 3.688879, 4.025352, 4.787492, 4.127134, 3.89182, 3.367296, 3.401197, 3.78419, 3.496508, 3.688879, 4.143135, 3.828641, 3.912023, 3.912023, 4.204693, 4.290459, 4.418841, 3.951244, 3.688879, 3.401197, 3.258097, 3.433987, 2.995732, 3.367296, 2.564949, 2.995732, 3.737670, 4.143135, 4.025352, 3.850148, 4.418841, 3.610918, 3.367296, 3.11274, 3.433987, 2.079442, 2.484907, 2.564949, 2.772589, 2.639057, 1.94591, 3.401197, 3.583519, 3.091042, 2.639057, 2.639057, 3.178054, 2.564949, 2.995732, 3.135494, 3.663562, 3.610918, 1.609438, 2.890372, 3.332205, 3.610918, 3.806662, 2.995732, 2.484907, 3.178054, 2.772589, 2.564949, 2.484907, 2.484907, 2.639057, 2.197225, 2.772589, 2.639057, 3.295837, 3.496508, 3.218876, 3.091042, 2.944439, 3.433987, 3.178054, 3.610918, 3.850148, 3.988984, 4.025352, 3.850148, 3.526361, 2.833213, 2.833213, 3.610918, 4.077537, 3.806662, 3.555348, 4.094345, 3.7612, 3.828641, 3.988984, 3.970292, 3.044522, 2.484907, 3.178054, 3.135494, 3.091042, 3.295837, 3.332205, 3.433987, 2.70805, 3.465736, 2.772589, 2.079442, 2.890372, 2.944439, 3.217781, 3.221373, 3.198925, 3.200618, 3.215071, 3.218874, 3.216458, 3.217708, 3.221502, 3.19917, 3.200445, 3.214734, 3.219054, 3.216846, 3.223685, 3.227759, 3.465736, 2.397895, 3.713572, 3.637586, 3.89182, 3.583519, 1.94591, 2.944439, 2.944439, 2.944439, 2.70805, 1.791759, 3.295837, 3.610918, 3.555348, 3.258097, 3.332205, 3.663562, 3.401197, 3.806662, 3.951244, 2.833213, 2.995732, 3.178054, 3.465736, 3.295837, 3.610918, 3.951244, 3.850148, 3.806662, 3.688879, 3.367296, 3.091042, 3.044522, 3.258097, 2.944439, 1.386294, 3.465736, 3.200652, 3.496508, 3.465736, 2.944439, 2.397895, 2.484907, 2.890372, 3.178054, 2.995732, 3.178054, 3.332205, 1.386294, 2.772589, 3.135494, 2.890372, 3.465736, 2.564949, 2.639057, 3.433987, 3.583519, 3.912023, 3.970292, 2.302585, 2.484907, 3.401197, 3.555348, 3.367296, 3.688879, 3.555348, 3.610918, 3.219835, 3.223369, 4.025352, 4.060443, 3.7612, 4.465908, 4.110874, 2.564949, 2.397895, 3.044522, 3.295837, 4.043051, 3.89182, 3.78419, 3.367296, 2.564949, 2.302585, 1.94591, 3.044522, 3.806662, 4.143135, 4.174387, 3.951244, 3.970292, 3.850148, 4.060443, 4.234107, 4.521789, 4.219508, 4.369448, 4.174387, 3.912023, 2.944439, 3.258097, 3.258097, 3.850148, 3.78419, 3.295837, 2.079442, 3.433987, 3.871201, 3.367296, 3.688879, 4.418841, 4.110874, 3.828641, 3.970292, 3.465736, 3.044522, 2.70805, 1.386294, 2.564949, 1.609438, 2.302585, 2.484907, 3.555348, 3.7612, 3.663562, 4.007333, 3.295837, 2.397895, 3.044522, 3.218876, 3.332205, 1.386294, 2.995732, 2.197225, 3.135494, 3.555348, 4.025352, 4.234107, 3.988984, 1.386294, 2.397895, 3.583519, 3.465736, 4.043051, 4.60517, 4.094345, 3.931826, 3.850148, 3.555348, 1.386294, 2.890372, 3.044522, 3.135494, 3.555348, 3.401197, 3.713572, 3.465736, 2.397895, 3.295837, 3.737670, 3.526361, 3.367296, 3.555348, 3.912023, 3.970292, 4.025352, 4.418841, 3.367296, 2.890372, 3.713572, 3.496508, 3.806662, 4.290459, 4.060443, 4.727388, 3.496508, 3.044522, 3.78419, 3.465736, 3.258097, 3.367296, 3.871201, 3.044522, 3.583519, 4.158883, 4.077537, 3.951244, 4.219508, 3.871201, 3.401197, 3.7612, 4.143135, 3.492916, 4.025352, 3.610918, 2.995732, 3.871201, 3.528668, 3.380925, 3.525542, 3.522050, 3.465736, 3.526361, 3.218876, 3.258097, 3.258097, 3.401197, 3.367296, 3.713572, 3.433987, 3.89182, 4.248495, 3.828641, 3.295837, 3.401197, 3.135494, 3.135494, 3.401197, 3.555348, 3.401197, 3.526361, 3.513557, 3.951244, 4.304065, 4.290459, 4.060443, 4.077537, 4.615121, 4.727388, 4.65396, 3.465736, 2.564949, 2.397895, 3.688879, 4.077537, 3.295837, 3.828641, 4.110874, 4.025352, 4.158883, 3.688879, 3.637586, 4.060443, 3.688879, 3.713572, 4.442651, 4.219508, 3.427826, 3.419914, 3.381604, 3.570578, 3.413528, 3.417694, 3.462911, 3.391791, 3.384614, 3.78419, 3.931826, 4.060443, 3.688879, 3.258097, 3.465736, 3.218876, 2.833213, 2.564949, 3.091042, 3.367296, 3.178054, 3.465736, 3.090464, 3.250778, 3.737670, 3.931826, 3.688879, 3.465736, 2.639057, 3.044522, 3.332205, 3.135494, 3.044522, 1.94591, 1.94591, 2.484907, 2.772589, 2.833213, 2.639057, 2.302585, 2.079442, 1.94591, 2.639057, 2.890372, 2.564949, 2.833213, 2.995732, 3.433987, 3.178054, 2.397895, 1.94591, 2.944439, 2.890372, 2.302585, 2.197225, 2.639057, 2.397895, 2.484907, 2.484907, 2.484907, 2.302585, 2.70805, 2.564949, 3.091042, 3.091042, 3.044522, 3.295837, 3.091042, 2.397895, 2.944439, 2.995732, 2.995732, 2.944439, 2.890372, 2.944439, 3.332205, 2.833213, 2.639057, 2.772589, 3.091042, 2.944439, 3.135494, 3.218876, 2.890372, 2.564949, 3.258097, 3.295837, 3.258097, 2.639057, 2.197225, 2.890372, 2.484907, 2.639057, 2.833213, 3.091042, 2.564949, 3.044522, 3.135494, 2.484907, 2.302585, 2.772589, 3.135494, 3.258097, 3.295837, 3.465736, 3.178054, 3.258097, 2.772589, 3.044522, 3.135494, 3.367296, 3.218876, 3.433987, 3.091042, 3.295837, 3.496508, 3.465736, 3.367296, 2.833213, 2.70805, 3.135494, 3.178054, 3.044522, 2.995732, 2.995732, 3.218876, 2.772589, 2.302585, 2.484907, 2.639057, 2.833213, 3.091042, 3.044522, 2.772589, 2.70805, 2.944439, 3.091042, 3.401197, 3.555348, 3.332205, 2.079442, 2.772589, 3.135494, 3.044522, 3.044522, 3.258097, 3.401197, 3.465736, 3.583519, 3.135494, 3.496508, 2.772589, 2.772589, 3.295837, 2.944439, 2.079442, 3.073006, 3.258097, 2.833213, 3.044522, 2.197225, 1.94591, 2.079442, 2.484907, 2.833213, 2.772589, 3.135494, 2.079442, 1.94591, 2.079442, 1.94591, 2.197225, 2.079442, 2.302585, 2.772589, 2.890372, 2.397895, 2.833213, 3.258097, 3.332205, 3.218876, 3.258097, 3.332205, 3.295837, 3.044522, 3.367296, 3.583519, 3.806662, 3.610918, 3.367296, 2.995732, 3.178054, 2.70805, 2.079442, 1.94591, 2.944439, 2.197225, 3.135494, 2.484907, 3.218876, 2.833213, 3.135494, 2.564949, 2.484907, 2.397895, 2.70805, 2.944439, 3.258097, 3.332205, 3.295837, 3.258097, 3.555348, 3.583519, 3.295837, 3.258097, 3.401197, 3.555348, 3.295837, 2.484907, 1.94591, 3.258097, 3.367296, 3.912023, 2.944439, 3.178054, 3.555348, 4.394449, 4.007333, 3.89182, 3.970292, 3.610918, 3.401197, 3.688879, 3.496508, 2.833213, 3.044522, 3.466439, 3.135494, 3.35331, 3.548311, 3.509696, 3.383648, 3.369603, 3.610918, 3.555348, 3.332205, 2.890372, 3.332205, 3.258097, 2.833213, 2.397895, 3.401197, 3.044522, 3.465736, 3.89182, 3.871201, 3.583519, 3.713572, 3.951244, 3.663562, 4.060443, 3.89182, 3.89182, 4.718499, 4.418841, 4.406719, 4.290459, 3.89182, 3.135494, 3.135494, 2.833213, 3.496508, 3.526361, 2.833213, 3.258097, 2.772589, 3.295837, 2.484907, 3.610918, 3.951244, 3.663562, 3.828641, 4.189655, 4.158883, 4.454347, 4.276666, 3.713572, 3.637586, 3.555348, 4.043051, 3.546148, 3.7612, 3.931826, 4.189655, 2.484907, 2.484907, 2.944439, 2.772589, 3.713572, 4.025352, 3.931826, 3.401197, 3.218876, 3.044522, 3.044522, 3.178054, 3.044522, 3.401197, 2.944439, 2.484907, 2.772589, 3.135494, 2.564949, 2.944439, 3.555348, 3.135494, 2.302585, 3.218876, 2.302585, 2.639057, 2.564949, 3.044522, 2.944439, 2.70805, 2.079442, 2.397895, 2.944439, 2.772589, 2.944439, 2.564949, 3.802986, 3.931826, 4.234107, 3.637586, 3.89182, 3.044522, 3.135494, 3.555348, 3.295837, 3.401197, 3.951244, 4.127134, 4.418841, 3.78419, 4.094345, 4.174387, 4.26268, 4.59512, 4.70048, 3.850148, 3.044522, 2.772589, 3.091042, 3.295837, 3.091042, 3.89182, 4.394449, 3.713572, 3.737670, 3.555348, 3.637586, 3.951244, 3.7612, 3.89182, 4.430817, 4.060443, 2.995732, 2.995732, 2.944439, 3.663562, 3.663562, 3.846878, 4.007333, 3.7612, 3.850148, 4.174387, 4.143135, 3.713572, 3.258097, 3.135494, 3.616211, 3.705795, 3.921891, 3.737167, 3.704421, 3.813359, 2.772589, 3.496508, 3.637586, 4.204693, 3.912023, 3.931826, 3.401197, 3.218876, 3.044522, 3.044522, 3.178054, 3.044522, 3.401197, 2.944439, 2.484907, 2.772589, 3.135494, 2.564949, 2.944439, 3.555348, 3.135494, 2.302585, 3.218876, 2.302585, 2.639057, 2.564949, 3.044522, 2.944439, 2.70805, 2.079442, 2.397895, 2.944439, 2.772589, 2.944439, 2.564949, 1.609438, 2.079442, 2.302585, 2.639057, 2.772589, 2.639057, 2.70805, 2.639057, 2.944439, 2.890372, 2.995732, 3.091042, 3.044522, 2.890372, 3.135494, 2.890372, 2.944439, 2.944439, 3.135494, 2.833213, 2.70805, 3.091042, 2.564949, 2.302585, 3.295837, 3.465736, 2.995732, 2.944439, 3.295837, 3.044522, 3.496508, 3.688879, 3.583519, 3.583519, 2.639057, 3.401197, 3.295837, 3.295837, 3.332205, 3.465736, 3.332205, 2.639057, 3.526361, 2.995732, 2.833213, 3.044522, 3.091042, 3.401197, 3.367296, 3.332205, 2.564949, 2.944439, 3.332205, 3.496508, 3.367296, 3.7612, 3.7612, 3.688879, 3.806662, 3.828641, 4.025352, 3.78419, 3.526361, 3.295837, 3.295837, 3.178054, 3.465736, 3.258097, 3.218876, 3.091042, 3.091042, 3.091042, 2.564949, 2.079442, 2.564949, 2.564949, 3.332205, 3.218876, 2.639057, 3.044522, 3.178054, 3.555348, 3.688879, 3.688879, 3.332205, 2.397895, 2.944439, 3.091042, 3.091042, 3.367296, 3.332205, 3.637586, 3.465736, 3.526361, 3.526361, 3.713572, 2.995732, 3.295837, 3.044522, 2.890372, 3.465736, 3.610918, 3.610918, 3.465736, 3.295837, 2.890372, 3.178054, 2.890372, 3.178054, 3.332205, 3.295837, 3.091042, 2.70805, 2.944439, 3.178054, 3.295837, 3.218876, 3.526361, 2.639057, 2.890372, 3.135494, 2.944439, 3.218876, 2.772589, 3.465736, 3.496508, 3.610918, 3.555348, 3.295837, 3.526361, 3.526361, 3.7612, 3.806662, 3.688879, 3.332205, 3.610918, 3.465736, 3.091042, 2.397895, 2.564949, 2.639057, 2.890372, 3.433987, 3.135494, 3.258097, 3.295837, 3.091042, 2.639057, 2.302585, 2.772589, 3.218876, 2.944439, 3.178054, 3.367296, 3.465736, 3.401197, 3.555348, 3.610918, 3.465736, 3.401197, 3.610918, 3.7612, 3.465736, 3.332205, 3.465736, 3.555348, 3.931826, 3.806662, 3.258097, 3.295837, 3.931826, 4.276666, 3.610918, 3.610918, 4.007333, 4.189655, 4.025352, 4.077537, 3.610918, 3.044522, 2.397895, 1.609438, 2.890372, 2.890372, 2.079442, 2.484907, 3.496508, 3.912023, 3.871201, 3.433987, 3.091042, 2.70805, 2.890372, 3.178054, 2.772589, 2.995732, 2.890372, 2.397895, 3.091042, 3.637586, 3.871201, 4.189655, 3.988984, 3.258097, 3.496508, 4.127134, 3.970292, 3.988984, 4.744932, 4.70953, 4.510860, 4.330733, 4.248495, 2.890372, 3.526361, 3.875924, 3.905987, 3.822823, 3.795471, 3.881181, 3.878108, 3.909445, 3.912834, 3.91106, 3.816252, 3.810831, 3.904002, 4.127134, 4.204693, 4.477337, 4.60517, 3.806662, 3.258097, 3.89182, 4.043051, 4.174387, 4.219508, 4.663439, 4.510860, 3.526361, 3.367296, 3.401197, 3.583519, 3.610918, 3.988984, 3.367296, 1.94591, 2.772589, 3.218876, 3.135494, 3.970292, 4.290459, 3.806662, 2.772589, 2.197225, 3.178054, 3.260339, 3.259892, 3.271441, 3.180209, 3.218876, 2.639057, 3.332205, 1.94591, 2.995732, 3.663562, 4.219508, 4.234107, 4.060443, 2.302585, 3.7612, 2.890372, 2.397895, 3.172508, 3.178054, 4.110874, 3.178054, 3.806662, 3.610918, 3.713572, 4.204693, 3.555348, 3.258097, 3.367296, 2.079442, 3.433987, 3.871201, 4.025352, 4.204693, 4.26268, 4.094345, 4.532599, 4.969813, 4.70953, 3.465736, 3.336785, 3.178054, 2.995732, 2.944439, 2.079442, 3.912023, 3.871201, 3.178054, 2.772589, 3.325277, 3.433987, 3.178054, 3.367296, 3.713572, 4.553877, 3.931826, 3.912023, 2.302585, 3.135494, 3.367296, 3.218876, 3.178054, 3.912023, 3.135494, 3.496508, 2.995732, 3.89182, 3.850148, 4.043051, 3.970292, 3.931826, 4.110874, 2.995732, 2.079442, 3.688879, 3.178054, 2.484907, 3.044522, 3.258097, 3.871201, 4.174387, 3.555348, 4.077537, 3.135494, 2.772589, 3.005233, 2.639057, 1.609438, 3.005893, 3.135494, 2.302585, 2.079442, 2.484907, 3.178054, 3.496508, 2.397895, 2.564949, 2.70805, 2.639057, 2.639057, 3.044522, 2.833213, 2.890372, 3.008526, 3.000900, 2.999440, 3.004902, 3.006481, 3.005952, 3.006135, 3.008185, 2.991538, 2.990268, 2.995744, 2.997564, 2.639057, 2.079442, 2.079442, 1.94591, 2.397895, 3.178054, 3.178054, 3.258097, 2.772589, 3.465736, 3.178054, 2.772589, 3.970292, 3.663562, 3.806662, 3.610918, 3.610918, 3.091042, 2.484907, 3.258097, 3.465736, 4.007333, 3.737670, 2.944439, 3.555348, 3.465736, 3.555348, 3.496508, 2.833213, 2.997573, 2.833213, 3.044522, 2.70805, 3.178054, 2.995732, 3.178054, 2.995732, 3.258097, 2.397895, 1.94591, 2.397895, 3.044522, 3.178054, 3.258097, 3.295837, 3.258097, 2.995732, 2.772589, 3.496508, 3.610918, 3.526361, 2.639057, 3.091042, 3.178054, 3.713572, 4.025352, 3.332205, 3.931826, 3.526361, 2.995732, 3.526361, 3.526361, 3.555348, 3.637586, 3.295837, 2.397895, 2.079442, 1.386294, 2.70805, 2.302585, 2.995732, 3.332205, 3.178054, 3.465736, 3.465736, 3.583519, 3.496508, 3.663562, 3.583519, 4.007333, 3.526361, 2.890372, 3.218876, 3.044522, 3.555348, 3.610918, 3.688879, 3.828641, 3.637586, 3.688879, 3.401197, 2.772589, 2.70805, 2.944439, 2.70805, 2.944439, 2.944439, 3.526361, 3.401197, 3.332205, 2.70805, 2.983909, 2.484907, 2.833213, 3.258097, 2.890372, 3.135494, 2.484907, 2.079442, 2.079442, 2.944439, 2.302585, 3.135494, 3.970292, 2.995732, 2.772589, 3.091042, 2.995732, 3.295837, 3.401197, 3.555348, 3.258097, 3.465736, 3.332205, 3.713572, 3.688879, 3.465736, 4.143135, 4.060443, 3.912023, 3.737670, 2.992779, 2.994487, 3.496508, 2.302585, 2.772589, 2.944439, 3.044522, 3.713572, 3.637586, 3.871201, 2.70805, 2.833213, 1.94591, 2.079442, 3.218876, 3.688879, 3.610918, 2.564949, 3.806662, 3.610918, 3.526361, 3.737670, 4.007333, 4.343805, 3.713572, 4.219508, 3.637586, 3.295837, 3.044522, 3.044522, 3.555348, 3.178054, 3.178054, 1.609438, 1.386294, 3.295837, 3.7612, 3.526361, 3.367296, 4.060443, 3.663562, 3.401197, 4.430817, 3.218876, 2.772589, 2.772589, 2.564949, 2.833213, 2.397895, 2.397895, 2.639057, 3.401197, 3.737670, 3.295837, 3.637586, 2.397895, 2.944439, 2.833213, 2.772589, 3.555348, 2.772589, 1.94591, 2.397895, 3.332205, 3.401197, 3.295837, 4.094345, 3.091042, 2.944439, 3.295837, 3.295837, 3.401197, 3.688879, 4.304065, 3.988984, 3.737670, 1.94591, 2.995732, 3.332205, 2.944439, 3.044522, 2.833213, 2.772589, 2.639057, 3.367296, 3.091042, 3.295837, 3.044522, 3.439748, 2.995732, 2.564949, 3.526361, 3.295837, 4.369448, 3.828641, 4.094345, 1.94591, 2.639057, 3.496508, 2.995732, 3.713572, 3.871201, 3.89182, 4.510860, 4.356709, 2.772589, 2.70805, 3.043815, 3.241509, 3.439565, 4.527535, 4.525654, 4.215428, 4.201861, 4.501899, 4.577937, 4.57454, 4.919981, 4.564348, 4.488636, 4.477337, 4.919981, 5.068904, 4.727388, 3.401197, 4.553877, 4.465908, 3.7612, 3.806662, 4.369448, 4.503861, 4.502919, 4.571094, 4.350859, 4.169662, 4.546569, 4.48482, 4.470026, 4.433276, 4.499632, 4.238047, 4.211019, 4.488582, 4.525913, 4.521645, 4.502248, 4.522113, 4.265253, 4.028499, 4.424542, 4.505162, 4.51253, 4.905275, 4.510860, 4.272164, 4.859812, 5.370638, 5.389072, 5.17615, 2.397895, 3.178054, 3.218876, 3.871201, 4.584967, 4.219508, 4.543295, 4.672829, 4.867534, 4.615121, 4.189655, 4.477337, 4.564348, 4.672829, 4.882802, 4.955827, 4.454347, 4.143135, 4.477337, 4.317488, 4.234107, 3.970292, 4.276666, 4.532599, 4.248495, 4.521789, 4.795791, 4.70953, 4.859812, 4.812184, 4.26268, 3.970292, 3.806662, 3.988984, 3.871201, 3.688879, 3.713572, 3.091042, 3.871201, 4.584967, 4.584967, 4.60517, 4.997212, 4.962845, 3.871201, 3.988984, 4.276666, 4.204693, 3.367296, 4.077537, 2.772589, 2.397895, 3.367296, 3.044522, 4.043051, 4.127134, 3.806662, 3.332205, 3.218876, 3.496508, 3.401197, 3.526361, 4.26268, 4.477337, 4.442651, 3.713572, 3.332205, 3.970292, 4.276666, 4.343805, 3.555348, 3.367296, 3.218876, 3.549036, 3.367296, 3.295837, 3.091042, 4.102721, 3.78419, 3.401197, 3.401197, 3.871201, 3.89182, 3.988984, 3.828641, 3.828641, 3.806662, 3.433987, 3.89182, 4.290459, 4.077537, 4.276666, 3.78419, 3.737670, 3.091042, 3.871201, 4.127134, 4.532599, 4.330733, 4.077537, 4.143135, 2.197225, 4.317488, 4.406719, 4.077537, 3.988984, 3.871201, 3.583519, 2.995732, 4.043051, 4.234107, 4.234107, 4.158883, 4.143135, 3.931826, 3.178054, 3.526361, 3.663562, 3.850148, 4.077537, 4.262955, 4.204693, 3.663562, 4.158883, 4.174387, 4.248495, 4.077537, 4.094345, 3.850148, 3.737670, 4.343805, 4.234107, 3.988984, 4.189655, 4.025352, 3.663562, 3.7612, 4.060443, 4.007333, 4.276666, 4.043051, 3.295837, 3.737670, 3.367296, 3.931826, 3.7612, 3.806662, 3.89182, 4.158883, 4.025352, 3.526361, 4.077537, 4.234107, 4.127134, 4.330733, 4.406719, 3.663562, 3.332205, 4.127134, 3.970292, 4.043051, 3.970292, 4.158883, 4.304065, 3.572946, 4.369448, 3.737670, 4.007333, 3.637586, 3.912023, 3.367296, 2.995732, 3.806662, 4.110874, 4.007333, 3.988984, 3.401197, 2.890372, 2.639057, 3.295837, 3.496508, 3.367296, 3.526361, 3.555348, 3.135494, 2.833213, 3.555348, 3.637586, 3.688879, 3.218876, 3.931826, 3.295837, 3.332205, 3.78419, 3.931826, 3.931826, 4.127134, 4.127134, 3.951244, 3.583519, 4.158883, 4.290459, 4.430817, 4.330733, 4.330733, 4.276666, 4.077537, 4.343805, 4.691348, 4.248495, 4.248718, 3.637586, 3.496508, 3.89182, 4.543295, 4.663439, 4.418841, 4.406719, 4.219508, 3.526361, 3.135494, 4.330733, 4.564348, 4.59512, 4.644391, 4.60517, 4.454347, 4.077537, 4.744932, 4.770685, 4.644391, 4.584967, 4.70953, 4.553877, 4.077537, 3.871201, 3.850148, 4.486262, 4.382027, 4.382027, 4.219508, 3.688879, 4.007333, 4.49981, 4.532599, 4.437847, 4.795791, 4.454347, 4.418841, 4.736198, 4.077537, 4.025352, 3.555348, 3.401197, 3.7612, 3.258097, 2.995732, 3.465736, 4.343805, 4.564348, 4.762174, 4.521789, 3.7612, 4.422329, 4.094345, 4.204693, 3.828641, 3.828641, 4.025352, 3.737670, 4.59512, 5.003946, 5.036953, 5.043425, 4.482114, 4.189655, 4.094345, 4.691348, 4.820282, 5.087596, 4.905275, 4.812184, 4.615121, 4.682131, 4.110874, 3.688879, 3.555348, 4.644391, 4.718499, 4.418841, 4.488636, 4.442651, 4.65396, 4.532599, 4.532599, 4.804021, 4.983607, 4.574711, 5.01728, 5.214936, 5.170484, 4.762174, 4.85203, 4.234107, 4.26268, 4.644391, 4.736198, 4.836282, 5.117994, 4.94876, 4.718499, 3.555348, 4.330733, 4.442651, 4.290459, 4.465908, 4.394449, 4.069414, 4.104153, 3.900632, 3.905351, 4.086093, 4.158883, 4.356709, 4.75359, 3.912023, 3.737670, 3.713572, 4.369448, 4.615121, 4.663439, 3.931826, 3.912023, 3.583519, 3.89182, 3.401197, 3.78419, 4.276666, 4.488636, 4.382027, 4.219508, 4.356709, 4.564348, 4.394449, 4.26268, 4.26268, 4.127134, 4.521789, 4.26268, 4.615121, 4.477337, 4.025352, 3.871201, 3.988984, 4.406719, 3.583519, 4.234107, 4.356709, 4.532599, 4.691348, 4.382027, 4.828314, 4.787492, 5.225747, 5.099866, 4.983607, 3.737670, 3.401197, 3.526361, 2.944439, 4.115131, 3.946046, 4.158883, 4.454347, 4.26268, 4.110874, 3.7612, 4.304065, 4.744932, 3.988761, 4.477337, 4.736198, 4.077537, 3.688879, 4.127134, 3.7612, 4.077537, 3.871201, 4.110874, 4.430817, 4.343805, 4.343805, 4.510860, 4.454347, 4.204693, 3.951244, 3.295837, 3.526361, 3.295837, 2.197225, 2.995732, 3.135494, 3.496508, 2.944439, 3.610918, 3.89182, 4.382027, 4.127134, 4.49981, 4.060443, 3.465736, 3.367296, 3.610918, 3.610918, 3.465736, 3.713572, 3.091042, 2.890372, 3.295837, 3.295837, 3.178054, 3.295837, 3.737670, 3.401197, 3.401197, 3.178054, 2.302585, 2.639057, 3.526361, 3.526361, 3.663562, 3.401197, 2.397895, 3.258097, 3.637586, 3.713572, 3.479445, 3.484538, 3.7612, 3.737670, 3.713572, 3.367296, 3.850148, 3.465736, 3.526361, 3.332205, 3.713572, 3.610918, 3.610918, 3.555348, 3.367296, 3.367296, 3.496508, 3.465736, 3.713572, 3.737670, 3.78419, 3.637586, 3.583519, 3.258097, 2.944439, 3.295837, 3.806662, 3.78419, 3.555348, 3.713572, 3.637586, 3.401197, 4.043051, 3.871201, 4.094345, 3.7612, 3.496508, 3.496508, 3.367296, 3.367296, 3.583519, 3.526361, 3.583519, 3.737670, 3.663562, 3.465736, 3.555348, 3.555348, 3.332205, 3.713572, 3.663562, 3.663562, 3.178054, 3.295837, 3.465736, 3.713572, 3.713572, 3.89182, 3.871201, 3.806662, 3.806662, 3.970292, 4.189655, 3.871201, 3.663562, 3.526361, 3.135494, 3.555348, 3.496508, 3.89182, 3.332205, 3.332205, 3.091042, 2.995732, 2.397895, 2.302585, 2.70805, 2.833213, 3.367296, 3.218876, 2.772589, 3.258097, 3.496508, 3.583519, 3.7612, 3.7612, 3.465736, 2.833213, 2.890372, 3.295837, 3.465736, 3.637586, 3.7612, 3.828641, 3.526361, 3.806662, 3.737670, 3.526361, 2.995732, 3.401197, 3.135494, 3.135494, 3.465736, 3.737670, 3.7612, 3.583519, 3.295837, 3.044522, 2.302585, 3.332205, 2.995732, 3.401197, 3.178054, 3.367296, 3.135494, 2.197225, 3.218876, 3.465736, 3.258097, 2.944439, 2.484907, 3.295837, 2.890372, 3.465736, 3.465736, 3.433987, 3.78419, 3.78419, 3.850148, 3.688879, 3.78419, 3.806662, 3.871201, 4.356709, 4.077537, 4.025352, 3.806662, 3.988984, 3.871201, 3.637586, 2.70805, 3.295837, 3.610918, 3.496508, 3.912023, 4.007333, 3.401197, 3.663562, 3.610918, 3.178054, 2.639057, 3.637586, 3.526361, 3.583519, 3.931826, 3.912023, 3.828641, 3.688879, 4.110874, 4.127134, 3.912023, 4.356709, 4.143135, 4.077537, 3.89182, 3.7612, 3.637586, 3.7612, 4.060443, 3.828641, 4.060443, 3.688879, 4.204693, 4.406719, 4.204693, 4.065879, 4.032712, 3.870517, 3.844466, 4.126483, 4.128479, 3.996506, 4.113325, 2.079442, 3.258097, 2.70805, 2.197225, 2.639057, 3.806662, 4.189655, 4.127134, 3.850148, 3.044522, 3.401197, 3.218876, 3.433987, 3.044522, 3.295837, 3.332205, 2.70805, 3.610918, 4.110874, 4.49981, 4.779123, 4.488636, 3.663562, 3.737670, 4.276666, 4.382027, 4.454347, 4.934474, 4.844187, 4.634729, 3.976065, 4.125859, 4.024048, 3.637586, 3.713572, 4.219508, 4.077537, 3.78419, 4.204693, 4.406719, 4.488636, 4.204693, 4.49981, 4.442651, 4.234107, 4.26268, 4.097222, 4.132034, 4.634729, 4.744932, 3.970292, 3.433987, 4.127134, 4.304065, 4.406719, 4.532599, 4.70953, 4.532599, 3.688879, 3.496508, 3.433987, 3.526361, 3.931826, 4.095262, 4.510860, 3.258097, 3.806662, 4.094345, 4.219508, 4.553877, 4.615121, 4.941642, 4.543295, 4.49981, 4.317488, 4.564348, 4.820282, 4.488636, 3.218876, 4.158883, 4.234107, 3.637586, 3.713572, 4.465908, 4.584967, 4.510860, 4.382027, 4.356709, 4.532599, 4.510860, 4.553877, 4.510860, 4.234107, 3.970292, 4.369448, 4.14085, 4.250678, 4.249737, 4.260921, 4.245159, 4.394449, 4.317488, 3.89182, 4.190629, 4.189655, 4.430817, 4.882802, 4.304065, 4.85203, 4.941642, 5.081404, 5.252273, 5.111988, 3.218876, 3.091042, 3.091042, 3.178054, 4.543295, 3.806662, 4.369448, 4.624973, 4.663439, 4.043051, 3.688879, 3.931826, 4.369448, 4.510860, 4.718499, 4.727388, 4.304065, 4.094345, 4.204693, 4.094345, 4.007333, 3.433987, 3.89182, 4.418841, 4.343805, 4.430817, 4.75359, 4.736198, 4.75359, 4.65396, 4.189655, 3.871201, 3.367296, 3.091042, 3.555348, 3.367296, 3.526361, 3.526361, 3.89182, 4.234107, 4.406719, 4.442651, 4.454347, 4.574711, 3.713572, 3.213321, 3.7612, 3.332205, 2.197225, 3.583519, 2.772589, 2.944439, 2.484907, 3.295837, 3.526361, 3.806662, 3.688879, 2.772589, 3.091042, 3.496508, 2.564949, 3.367296, 3.931826, 3.988984, 3.850148, 3.044522, 3.044522, 3.178054, 3.610918, 4.025352, 3.465736, 3.135494, 3.496508, 2.772589, 2.833213, 2.70805, 2.833213, 2.995732, 3.433987, 3.367296, 3.044522, 3.258097, 3.332205, 3.555348, 3.465736, 3.367296, 3.688879, 3.367296, 3.526361, 4.330733, 4.110874, 3.970292, 3.637586, 3.610918, 2.944439, 2.944439, 3.688879, 3.912023, 4.234107, 3.806662, 3.7612, 3.610918, 4.025352, 4.110874, 3.828641, 3.295837, 3.258097, 3.258097, 3.044522, 3.258097, 3.367296, 3.555348, 3.713572, 3.583519, 3.610918, 2.772589, 3.044522, 3.367296, 3.367296, 3.970292, 3.806662, 3.713572, 3.465736, 2.564949, 3.583519, 3.688879, 3.871201, 3.806662, 3.637586, 3.713572, 3.912023, 3.871201, 3.526361, 4.060443, 3.737670, 3.401197, 3.713572, 3.951244, 3.912023, 4.110874, 3.737670, 2.995732, 3.295837, 3.135494, 2.833213, 3.178054, 3.295837, 3.637586, 3.931826, 4.025352, 3.401197, 3.610918, 3.912023, 3.951244, 4.143135, 4.234107, 3.663562, 3.222103, 3.555348, 3.465736, 3.526361, 3.555348, 3.970292, 4.060443, 3.871201, 4.110874, 3.871201, 3.367296, 3.258097, 3.367296, 3.295837, 3.044522, 3.713572, 4.007333, 3.806662, 3.7612, 3.135494, 2.833213, 2.833213, 3.091042, 3.583519, 3.178054, 3.433987, 3.367296, 2.772589, 2.890372, 2.995732, 3.526361, 3.433987, 2.944439, 3.091042, 3.367296, 3.401197, 3.737670, 3.78419, 3.7612, 3.7612, 4.060443, 4.060443, 3.583519, 3.871201, 4.025352, 4.007333, 4.276666, 3.503122, 4.276666, 4.060443, 4.060443, 4.532599, 4.007333, 3.044522, 3.295837, 3.637586, 3.7612, 4.234107, 4.189655, 3.871201, 3.951244, 3.713572, 3.401197, 3.091042, 3.737670, 4.174387, 4.418841, 4.343805, 4.543295, 4.406719, 4.025352, 4.510860, 4.59512, 4.727388, 4.465908, 4.624973, 4.564348, 4.234107, 3.951244, 3.637586, 3.78419, 4.174387, 4.304065, 4.290459, 3.637586, 4.189655, 4.488636, 4.543295, 4.59512, 4.859812, 4.718499, 4.454347, 4.682131, 4.007333, 3.7612, 3.433987, 3.258097, 3.806662, 3.044522, 3.178054, 3.496508, 4.317488, 4.488636, 4.634729, 4.691348, 3.89182, 3.828641, 3.78419, 4.219508, 3.496508, 3.663562, 3.912023, 3.258097, 4.189655, 4.89784, 5.068904, 4.406719, 3.433987, 4.043051, 4.356709, 4.49981, 4.927254, 4.875197, 4.574711, 4.564348, 4.70048, 3.850148, 2.70805, 3.78419, 4.248495, 4.454347, 4.418841, 4.442651, 4.290459, 4.454347, 4.615121, 4.26268, 4.510860, 4.828314, 4.564348, 4.875197, 4.976734, 5.056246, 4.820282, 4.75359, 4.143135, 3.970292, 4.276666, 4.343805, 4.615121, 4.962845, 4.997212, 4.736198, 3.688879, 4.127134, 4.382027, 4.158883, 4.276666, 4.430817, 4.70953, 3.988984, 3.295837, 3.555348, 4.158883, 4.276666, 4.521789, 4.727388, 4.89784, 4.430817, 3.951244, 3.951244, 4.477337, 4.574711, 4.477337, 4.094345, 4.060443, 4.043051, 3.637586, 3.496508, 4.143135, 4.26268, 4.317488, 4.290459, 4.094345, 4.26268, 4.624973, 4.59512, 4.488636, 4.343805, 4.406719, 4.189655, 4.219508, 4.394449, 4.691348, 4.867534, 4.369448, 4.290459, 4.382027, 4.406719, 4.110874, 4.343805, 4.356709, 4.430817, 4.025352, 4.779123, 4.836282, 5.056246, 4.812184, 5.164786, 3.555348, 3.135494, 3.218876, 3.637586, 4.304065, 4.007333, 4.127134, 4.382027, 5.01728, 4.248495, 3.871201, 4.025352, 4.276666, 4.682131, 4.634729, 4.564348, 4.094345, 3.433987, 4.26268, 4.110874, 3.555348, 3.044522, 3.828641, 4.304065, 4.174387, 4.143135, 4.488636, 4.406719, 4.430817, 4.406719, 3.912023, 3.7612, 3.663562, 2.397895, 3.433987, 3.367296, 3.401197, 3.218876, 3.583519, 4.127134, 4.26268, 4.26268, 4.532599, 4.60517, 3.091042, 3.526361, 4.025352, 3.89182, 3.737670, 3.806662, 3.332205, 2.944439, 3.332205, 3.091042, 3.555348, 3.610918, 3.7612, 3.401197, 2.944439, 3.295837, 3.178054, 2.890372, 3.871201, 3.850148, 4.060443, 3.218876, 2.890372, 3.555348, 3.637586, 3.988984, 3.78419, 3.332205, 3.091042, 3.367296, 3.465736, 2.833213, 3.178054, 2.995732, 3.433987, 3.178054, 3.178054, 3.610918, 3.610918, 4.007333, 3.367296, 3.496508, 3.295837, 3.526361, 3.688879, 3.850148, 3.931826, 3.637586, 3.526361, 3.367296, 2.197225, 3.367296, 3.78419, 4.025352, 3.583519, 3.433987, 4.043051, 3.367296, 3.850148, 3.89182, 3.806662, 3.433987, 3.295837, 3.401197, 3.091042, 3.367296, 3.7612, 3.828641, 3.713572, 3.828641, 3.610918, 2.639057, 3.688879, 3.7612, 3.526361, 4.382027, 3.931826, 3.871201, 3.218876, 3.218876, 3.433987, 3.583519, 3.871201, 3.78419, 3.367296, 3.218876, 3.871201, 3.737670, 3.610918, 3.89182, 3.610918, 3.218876, 3.218876, 3.78419, 3.713572, 3.951244, 3.295837, 2.197225, 3.218876, 2.484907, 2.890372, 3.401197, 3.218876, 3.401197, 3.637586, 3.367296, 3.044522, 3.465736, 3.332205, 3.737670, 4.060443, 4.143135, 3.367296, 2.639057, 3.401197, 3.218876, 2.890372, 3.526361, 3.713572, 3.526361, 3.737670, 3.828641, 4.143135, 3.044522, 2.639057, 3.135494, 3.044522, 2.772589, 3.295837, 3.828641, 3.583519, 3.555348, 2.890372, 2.397895, 2.197225, 2.397895, 3.367296, 3.295837, 3.307195, 3.309156, 3.296244, 3.296259, 3.304903, 3.091042, 3.091042, 3.367296, 2.995732, 3.135494, 3.367296, 3.433987, 3.465736, 3.637586, 3.688879, 3.806662, 3.951244, 3.465736, 3.931826, 3.89182, 3.988984, 4.204693, 4.127134, 4.174387, 4.127134, 4.060443, 4.043051, 3.637586, 2.995732, 3.258097, 3.496508, 3.850148, 4.094345, 3.78419, 3.988984, 4.025352, 4.204693, 3.258097, 3.178054, 3.951244, 4.174387, 4.219508, 4.248495, 4.189655, 4.317488, 4.127134, 4.49981, 4.615121, 4.624973, 4.634729, 4.644391, 4.304065, 4.127134, 3.78419, 3.7612, 3.850148, 4.025352, 3.7612, 3.737670, 3.7612, 4.49981, 4.394449, 4.290459, 4.382027, 4.382027, 4.644391, 4.890349, 4.70048, 4.127134, 3.637586, 3.367296, 3.332205, 3.610918, 2.70805, 3.091042, 3.496508, 4.007333, 4.219508, 4.330733, 4.369448, 3.332205, 3.332205, 3.637586, 3.637586, 3.295837, 3.258097, 3.583519, 3.258097, 4.356709, 4.718499, 5.192957, 4.94876, 4.744932, 4.369448, 3.988984, 4.330733, 4.521789, 4.912655, 4.990433, 4.812184, 4.564348, 4.574711, 4.234107, 2.944439, 3.688879, 4.110874, 4.26268, 4.025352, 3.637586, 4.204693, 4.49981, 4.317488, 4.454347, 4.477337, 4.574711, 4.219508, 4.644391, 4.584967, 5.023881, 4.143135, 4.189655, 3.583519, 3.433987, 4.465908, 4.382027, 4.682131, 4.672829, 4.691348, 4.442651, 3.637586, 3.931826, 3.931826, 3.583519, 3.931826, 3.931826, 3.367296, 3.091042, 3.044522, 3.367296, 3.496508, 4.442651, 4.343805, 4.406719, 4.430817, 3.295837, 2.944439, 3.663562, 3.78419, 3.806662, 3.555348, 3.496508, 3.663562, 4.077537, 3.806662, 3.295837, 4.127134, 4.304065, 4.077537, 2.944439, 3.871201, 3.951244, 4.007333, 2.995732, 2.772589, 3.178054, 3.610918, 3.555348, 3.688879, 4.094345, 3.850148, 3.988984, 4.127134, 4.077537, 2.833213, 2.639057, 3.496508, 3.78419, 4.343805, 3.951244, 4.442651, 4.543295, 4.828314, 4.983607, 4.779123, 3.583519, 3.465736, 3.135494, 3.496508, 3.044522, 2.772589, 3.610918, 3.78419, 4.143135, 3.465736, 3.258097, 3.806662, 3.828641, 3.806662, 4.382027, 4.382027, 3.988984, 3.737670, 3.806662, 2.639057, 3.496508, 3.258097, 3.610918, 3.433987, 3.295837, 3.218876, 3.258097, 3.091042, 3.178054, 3.912023, 3.828641, 3.637586, 2.079442, 2.833213, 2.639057, 2.079442, 3.178054, 2.890372, 3.135494, 3.663562, 3.951244, 3.806662, 4.007333, 4.304065, 2.890372, 2.639057, 3.258097, 2.995732, 2.397895, 2.079442, 2.564949, 2.564949, 2.397895, 2.772589, 3.218876, 3.091042, 2.639057, 2.564949, 2.397895, 2.995732, 2.079442, 2.079442, 2.890372, 3.258097, 3.295837, 2.079442, 2.564949, 2.302585, 3.178054, 3.637586, 3.218876, 2.302585, 2.484907, 2.484907, 2.70805, 2.302585, 2.079442, 2.079442, 2.397895, 2.079442, 2.302585, 2.833213, 3.178054, 2.772589, 2.890372, 2.944439, 3.135494, 2.944439, 2.995732, 3.024935, 3.465736, 3.526361, 3.178054, 2.397895, 2.079442, 2.484907, 3.258097, 3.610918, 3.526361, 2.70805, 3.218876, 3.135494, 3.526361, 3.295837, 2.890372, 2.079442, 2.079442, 2.639057, 2.079442, 2.772589, 3.433987, 3.433987, 3.332205, 3.295837, 2.890372, 2.484907, 2.772589, 2.890372, 3.135494, 3.7612, 2.484907, 3.295837, 2.564949, 2.564949, 3.610918, 3.332205, 3.178054, 3.295837, 3.663562, 2.890372, 3.332205, 3.871201, 4.158883, 3.367296, 3.295837, 2.70805, 3.135494, 3.367296, 3.258097, 3.332205, 2.70805, 2.302585, 2.079442, 2.197225, 2.079442, 2.564949, 2.079442, 2.079442, 3.526361, 3.332205, 3.044522, 3.135494, 3.091042, 3.295837, 3.465736, 3.433987, 2.772589, 2.564949, 3.044522, 2.70805, 2.995732, 3.091042, 3.610918, 3.610918, 3.688879, 3.737670, 3.583519, 3.295837, 2.484907, 3.091042, 2.890372, 2.944439, 3.218876, 2.772589, 2.772589, 3.218876, 2.197225, 2.079442, 2.079442, 2.302585, 3.044522, 2.833213, 3.178054, 2.639057, 2.197225, 2.079442, 2.639057, 2.833213, 3.044522, 2.890372, 2.079442, 2.833213, 2.995732, 2.564949, 2.995732, 2.772589, 3.218876, 3.091042, 3.178054, 3.367296, 3.295837, 3.555348, 3.583519, 3.89182, 3.7612, 4.043051, 3.637586, 4.043051, 3.555348, 2.397895, 2.564949, 2.397895, 2.833213, 3.135494, 3.688879, 3.332205, 2.564949, 2.197225, 2.70805, 2.079442, 2.079442, 2.397895, 3.135494, 3.526361, 3.7612, 3.713572, 3.258097, 2.564949, 3.178054, 3.637586, 3.583519, 3.258097, 3.688879, 3.713572, 2.564949, 2.639057, 2.564949, 3.178054, 3.78419, 3.295837, 2.397895, 2.397895, 3.218876, 3.258097, 3.218876, 3.258097, 3.970292, 3.526361, 3.78419, 4.127134, 3.871201, 3.178054, 3.091042, 2.564949, 2.397895, 2.772589, 2.197225, 2.564949, 3.688879, 3.713572, 3.737670, 3.737670, 2.564949, 2.079442, 2.833213, 3.496508, 2.944439, 2.944439, 2.079442, 1.609438, 3.044522, 3.496508, 3.871201, 3.637586, 3.091042, 2.944439, 2.564949, 3.465736, 3.465736, 4.248495, 4.532599, 3.806662, 3.637586, 3.135494, 3.555348, 2.995732, 2.995732, 3.178054, 3.258097, 2.995732, 3.044522, 3.218876, 3.465736, 3.295837, 3.663562, 3.737670, 3.465736, 3.091042, 3.526361, 3.496508, 3.555348, 3.583519, 3.610918, 2.70805, 2.833213, 3.496508, 3.218876, 3.496508, 3.7612, 3.912023, 4.382027, 3.433987, 2.70805, 3.178054, 3.044522, 3.091042, 3.135494), .Dim=c( 366,22 ), .Dimnames = list(c( "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255","256","257","258","259","260","261","262","263","264","265","266","267","268","269","270","271","272","273","274","275","276","277","278","279","280","281","282","283","284","285","286","287","288","289","290","291","292","293","294","295","296","297","298","299","300","301","302","303","304","305","306","307","308","309","310","311","312","313","314","315","316","317","318","319","320","321","322","323","324","325","326","327","328","329","330","331","332","333","334","335","336","337","338","339","340","341","342","343","344","345","346","347","348","349","350","351","352","353","354","355","356","357","358","359","360","361","362","363","364","365","366"), c( "Stat1","Stat2","Stat3","Stat4","Stat5","Stat6","Stat7","Stat8","Stat9","Stat10","Stat11", "Stat12","Stat13","Stat14","Stat15","Stat16","Stat17","Stat18","Stat19","Stat20","Stat21","Stat22") )) ))
/Stem/data/pm10.r
no_license
bwtian/rLibLin
R
false
false
303,226
r
pm10<- structure(list(coords = structure(c(423.481, 469.875, 437.361, 394.606, 444.299, 408.382, 376.969, 416.65, 399.228, 457.847, 383.639, 469.45, 483.16, 368.181, 433.807, 489.578, 346.8, 394.896, 489, 396.043, 454.262, 466.401, 4950.691, 4974.655, 4973.34, 5001.187, 5062.641, 4949.636, 4993.487, 4985.65, 4967.871, 4997.983, 4915.521, 5031.856, 4956.77, 4971.659, 4918.38, 4952.071, 5000.4, 4996.328, 4971.8, 4992.424, 5019.818, 5086.602), .Dim = c(22, 2), .Dimnames = list(c( "Stat1","Stat2","Stat3","Stat4","Stat5","Stat6","Stat7","Stat8","Stat9","Stat10","Stat11", "Stat12","Stat13","Stat14","Stat15","Stat16","Stat17","Stat18","Stat19","Stat20","Stat21","Stat22"),c("UTMX_km","UTMY_km"))), covariates = structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1415, 31.5606, 34.3183, 34.9983, 34.6695, 34.8239, 35.3546, 32.1519, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5119, 31.3089, 32.048, 31.6905, 31.8584, 32.4358, 29.0925, 28.5384, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3758, 22.7955, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3758, 22.7955, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3758, 22.7955, 25.6382, 26.4463, 26.0555, 26.239, 26.871, 23.3402, 22.7749, 25.6344, 26.4481, 26.0742, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6454, 22.9901, 22.3883, 25.2883, 26.1615, 25.7394, 25.9329, 26.6442, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6588, 19.5221, 19.1048, 19.2961, 20.0004, 16.3671, 15.7655, 18.6753, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1716, 18.3739, 19.1191, 15.3756, 14.773, 17.7, 18.6128, 18.1975, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.5694, 15.9652, 18.9461, 19.9383, 19.4587, 19.6786, 20.4892, 16.546, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.4627, 15.0694, 15.2498, 15.9166, 13.5846, 13.2759, 14.6491, 15.5112, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8632, 19.6329, 15.8233, 15.2201, 18.1673, 19.1099, 18.6543, 18.8356, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4038, 21.8022, 24.6955, 25.5587, 25.1415, 25.3328, 26.0371, 22.4416, 21.7977, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5527, 31.1715, 31.3505, 31.9669, 28.5151, 27.9348, 30.7644, 31.5175, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7449, 31.4884, 30.9076, 33.6784, 34.3781, 34.0398, 34.1987, 34.7416, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4314, 39.1097, 51.833, 52.681, 52.2715, 52.5773, 53.2218, 39.4462, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8136, 47.6816, 48.6033, 48.1582, 48.4906, 49.1914, 35.1543, 34.8481, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5949, 28.2319, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5949, 28.2319, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5949, 28.2319, 41.2688, 42.2766, 41.7899, 42.1534, 42.9199, 28.5476, 28.2063, 41.2646, 42.2787, 41.814, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0326, 27.4176, 27.0117, 40.2164, 41.3047, 40.7786, 41.1656, 42.0308, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6249, 32.7008, 32.1808, 32.5634, 33.4205, 18.8471, 18.4447, 31.6464, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5579, 32.9625, 33.8691, 19.0876, 18.6679, 31.9701, 33.1079, 32.5919, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6613, 20.214, 33.7114, 34.9481, 34.3503, 34.7901, 35.7757, 20.6272, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.0883, 21.5981, 21.9588, 22.7667, 17.0973, 16.7347, 21.0742, 22.1431, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6478, 34.5841, 19.6777, 19.2477, 32.6231, 33.7979, 33.23, 33.6119, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.5715, 26.1691, 39.3493, 40.4252, 39.9052, 40.2878, 41.1449, 26.6216, 26.1617, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3804, 46.9056, 47.2602, 48.0079, 33.7652, 33.4086, 46.3972, 47.3347, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6493, 37.7767, 37.4487, 50.2202, 51.0928, 50.6714, 50.9861, 51.6445, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1778, 31.0146, 32.9491, 33.9835, 33.4835, 33.7822, 34.6324, 31.1959, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2113, 31.2641, 32.3885, 31.8449, 32.1696, 33.0937, 29.3887, 29.2496, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3856, 26.1916, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3856, 26.1916, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3856, 26.1916, 28.3823, 29.6117, 29.0174, 29.3724, 30.3827, 26.3293, 26.1676, 28.3774, 29.6141, 29.0443, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.697, 26.4011, 26.1737, 28.5031, 29.8302, 29.1884, 29.5655, 30.6947, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3665, 24.6786, 24.0441, 24.4169, 25.5356, 21.2819, 21.057, 23.3905, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.899, 25.2931, 26.4762, 22.011, 21.7733, 24.1825, 25.57, 24.9367, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8715, 23.613, 26.1818, 27.6899, 26.9606, 27.389, 28.6749, 23.8296, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.4604, 21.8623, 22.2136, 23.2681, 19.6855, 19.4735, 21.2237, 22.5208, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.0791, 27.3007, 22.7087, 22.4632, 24.9322, 26.3649, 25.6721, 26.039, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.7895, 25.5647, 27.8742, 29.1863, 28.5518, 28.9245, 30.0432, 25.8493, 25.5518, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.3286, 31.7488, 32.0951, 33.0808, 29.1672, 28.9779, 31.1292, 32.2776, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9859, 30.4478, 30.2799, 32.2538, 33.3182, 32.8036, 33.111, 33.9799, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3711, 29.2662, 33.9956, 34.3243, 34.1661, 34.2776, 34.5774, 29.3784, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3611, 30.1462, 30.5034, 30.3314, 30.4526, 30.7785, 25.4752, 25.3831, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7771, 18.6524, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7771, 18.6524, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7771, 18.6524, 23.5023, 23.8929, 23.7049, 23.8374, 24.1937, 18.7544, 18.642, 23.5004, 23.8938, 23.7208, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4963, 17.965, 17.8213, 22.736, 23.1581, 22.9549, 23.0953, 23.4956, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4647, 15.882, 15.6811, 15.8199, 16.2164, 10.7014, 10.5593, 15.4731, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.2396, 14.3864, 14.8057, 9.2089, 9.0586, 14.0108, 14.4521, 14.253, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.8698, 9.7065, 14.7337, 15.2134, 14.9824, 15.142, 15.5977, 9.853, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2266, 10.0372, 10.168, 10.5417, 8.3807, 8.2468, 9.8332, 10.2449, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.593, 15.026, 9.38, 9.2248, 14.2051, 14.6609, 14.4414, 14.5756, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.1831, 17.041, 21.9464, 22.3637, 22.1628, 22.3016, 22.6981, 17.2073, 17.0301, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4699, 29.2865, 29.4158, 29.7634, 24.3792, 24.2575, 29.0889, 29.4514, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.6701, 28.4315, 28.3235, 33.0715, 33.4096, 33.2469, 33.3616, 33.668, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8293, 31.1616, 34.5963, 35.0444, 34.8277, 34.9055, 35.2646, 31.8363, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4355, 30.8774, 31.3644, 31.1288, 31.2134, 31.6048, 28.1003, 27.4519, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6568, 19.9953, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6568, 19.9953, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6568, 19.9953, 23.4454, 23.978, 23.7203, 23.8129, 24.2418, 20.6333, 19.9832, 23.4429, 23.9792, 23.732, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.78, 20.1072, 19.4362, 22.9038, 23.4792, 23.2011, 23.2979, 23.7792, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4416, 16.0105, 15.7355, 15.8313, 16.3078, 12.6467, 11.9753, 15.4518, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.2874, 13.3887, 13.8932, 10.1735, 9.5038, 12.9766, 13.5782, 13.3034, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3883, 9.7214, 13.2045, 13.8584, 13.5424, 13.6524, 14.2019, 10.3724, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8357, 9.5766, 9.6668, 10.1188, 8.3516, 7.9798, 9.2995, 9.8686, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4436, 13.9649, 10.21, 9.5414, 13.018, 13.6392, 13.339, 13.4264, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.0922, 18.4209, 21.8871, 22.456, 22.1811, 22.2768, 22.7533, 19.1171, 18.4173, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5906, 30.3393, 30.4295, 30.8477, 27.2857, 26.6233, 30.071, 30.5687, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6941, 31.2358, 30.569, 34.0061, 34.4672, 34.2442, 34.3243, 34.6919, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.6947, 32.464, 51.2831, 51.7233, 51.5106, 51.6592, 51.984, 32.702, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2397, 47.1242, 47.6026, 47.3714, 47.533, 47.8861, 28.4779, 28.2582, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.883, 20.6362, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.883, 20.6362, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.883, 20.6362, 39.5968, 40.1199, 39.867, 40.0437, 40.43, 20.8581, 20.6211, 39.5943, 40.1211, 39.8799, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6224, 19.9347, 19.6647, 38.7042, 39.2694, 38.9961, 39.1838, 39.6216, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.6616, 31.2204, 30.9502, 31.1357, 31.5694, 11.9017, 11.6331, 30.673, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3437, 29.5399, 29.9986, 10.2306, 9.9549, 29.0385, 29.6294, 29.3617, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.041, 10.7539, 29.9258, 30.5682, 30.2575, 30.4708, 30.9696, 11.0246, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.0931, 13.8384, 14.0133, 14.4228, 9.1452, 8.9544, 13.5664, 14.1236, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.889, 30.3627, 10.5345, 10.2545, 29.3712, 29.9815, 29.6864, 29.8699, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.282, 19.0134, 38.0419, 38.6007, 38.3305, 38.516, 38.9497, 19.3084, 19.011, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5793, 46.3326, 46.505, 46.8818, 27.3744, 27.1301, 46.0689, 46.5548, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0752, 31.7462, 31.5131, 50.354, 50.8069, 50.588, 50.741, 51.0729, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 39.9836, 38.7672, 46.1732, 47.3926, 46.803, 47.1255, 48.1934, 40.0067, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8034, 44.3315, 45.657, 45.0161, 45.3666, 46.5286, 38.0371, 36.8503, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.5534, 32.2995, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.5534, 32.2995, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.5534, 32.2995, 39.9702, 41.4193, 40.7187, 41.1019, 42.3737, 33.4841, 32.2782, 39.9646, 41.422, 40.752, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3754, 34.218, 32.9346, 40.7443, 42.3084, 41.5521, 41.9585, 43.3724, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4123, 35.9587, 35.211, 35.6127, 37.0134, 27.9035, 26.6232, 34.4386, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5515, 34.9763, 36.4583, 27.1105, 25.815, 33.7069, 35.3422, 34.5928, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.3111, 27.9914, 36.0477, 37.8252, 36.9657, 37.4275, 39.0396, 29.2569, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.135, 27.4303, 27.8089, 29.1338, 23.8762, 23.0814, 26.6775, 28.2108, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8518, 37.3826, 27.892, 26.5875, 34.541, 36.2296, 35.4131, 35.8059, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.2295, 31.9492, 39.7383, 41.2847, 40.537, 40.9388, 42.3394, 33.3031, 31.9249, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.0833, 45.3997, 45.7735, 47.014, 38.2877, 37.0395, 44.6694, 46.027, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0907, 39.787, 38.5649, 46.0116, 47.2664, 46.6597, 46.9915, 48.0833, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2467, 23.249, 23.523, 23.7035, 23.6162, 23.6473, 23.7946, 23.2494, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8204, 20.0968, 20.293, 20.1981, 20.2319, 20.3921, 19.8166, 19.8271, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5697, 13.5752, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5697, 13.5752, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5697, 13.5752, 13.8544, 14.0689, 13.9652, 14.0021, 14.1773, 13.5605, 13.5701, 13.8534, 14.0694, 13.9699, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3325, 12.6898, 12.6915, 12.9775, 13.2093, 13.0973, 13.136, 13.3322, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8344, 7.0636, 6.9529, 6.9911, 7.1854, 6.5474, 6.5489, 6.8386, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1708, 5.2113, 5.4167, 4.7553, 4.7578, 5.0456, 5.2879, 5.1774, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0646, 5.0686, 5.36, 5.6234, 5.4961, 5.5401, 5.7634, 5.0585, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6884, 4.5841, 4.6201, 4.8033, 4.3645, 4.3692, 4.4724, 4.6991, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3346, 5.5467, 4.8713, 4.8743, 5.1635, 5.4137, 5.2928, 5.3275, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1261, 12.1276, 12.4132, 12.6423, 12.5316, 12.5699, 12.7641, 12.1359, 12.1263, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3374, 19.2362, 19.2723, 19.4431, 18.8447, 18.8497, 19.1281, 19.3285, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0892, 22.5321, 22.5349, 22.8097, 22.9954, 22.9056, 22.9376, 23.0884, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1036, 16.9018, 17.7438, 18.192, 17.9753, 18.0751, 18.4574, 17.1114, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.7505, 16.6201, 17.1072, 16.8718, 16.9802, 17.396, 15.9545, 15.766, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7561, 13.5495, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7561, 13.5495, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7561, 13.5495, 14.4513, 14.984, 14.7265, 14.845, 15.2999, 13.7323, 13.541, 14.4492, 14.985, 14.7376, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3978, 13.7463, 13.5317, 14.4681, 15.0431, 14.7652, 14.8905, 15.3968, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5519, 12.1203, 11.8456, 11.9696, 12.471, 10.8344, 10.6202, 11.5617, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7523, 11.8833, 12.4138, 10.7029, 10.4866, 11.4417, 12.0428, 11.7676, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4859, 11.2661, 12.2587, 12.912, 12.5963, 12.7387, 13.3155, 11.4678, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6682, 10.4093, 10.5261, 10.9995, 9.6451, 9.5104, 10.1325, 10.6947, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.2041, 12.7519, 10.9965, 10.7789, 11.7481, 12.3687, 12.0688, 12.1877, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5022, 13.2881, 14.2198, 14.7882, 14.5135, 14.6374, 15.1389, 13.5274, 13.2816, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0431, 16.7919, 16.9076, 17.3513, 15.8367, 15.6308, 16.5235, 17.0224, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2281, 16.845, 16.6425, 17.4937, 17.9549, 17.7319, 17.8346, 18.2255, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.8939, 36.893, 40.5555, 41.054, 40.8133, 40.9821, 41.3351, 37.9019, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3145, 35.0507, 35.5926, 35.3309, 35.5144, 35.8991, 32.3231, 31.3358, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 24.0237, 23.0061, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 24.0237, 23.0061, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 24.0237, 23.0061, 26.8284, 27.4209, 27.1348, 27.3354, 27.7569, 23.9965, 22.9878, 26.8257, 27.4222, 27.1497, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9055, 22.0124, 20.9675, 24.8803, 25.5205, 25.2111, 25.4243, 25.9046, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1501, 15.7831, 15.4772, 15.688, 16.1636, 12.2932, 11.2498, 15.1634, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2727, 15.4955, 15.9991, 12.0149, 10.964, 14.9268, 15.5961, 15.2936, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9333, 11.8704, 15.933, 16.6606, 16.309, 16.5512, 17.0996, 12.9154, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.5655, 12.2772, 12.4759, 12.9289, 10.4005, 9.8203, 11.9689, 12.6097, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8914, 16.4118, 12.3593, 11.3039, 15.3041, 15.9953, 15.6613, 15.8692, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1527, 20.1093, 24.0096, 24.6426, 24.3367, 24.5475, 25.0231, 21.1816, 20.1074, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5362, 33.2571, 33.4528, 33.8638, 30.1755, 29.1605, 32.9582, 33.5079, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2605, 35.7744, 34.7709, 38.4579, 38.9709, 38.7232, 38.8969, 39.2579, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 66.9997, 66.8702, 68.9723, 69.8461, 69.424, 69.7, 70.3603, 67.0139, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1551, 62.3717, 63.3214, 62.8627, 63.1627, 63.8804, 60.296, 60.1923, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6793, 45.5254, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6793, 45.5254, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6793, 45.5254, 47.8754, 48.9137, 48.4122, 48.7402, 49.5249, 45.6311, 45.4948, 47.8705, 48.9161, 48.4382, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6116, 45.4992, 45.3016, 47.7936, 48.9156, 48.3735, 48.7215, 49.6099, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.4989, 34.6082, 34.0722, 34.4163, 35.2962, 31.2217, 31.0263, 33.5216, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.7642, 29.128, 30.0585, 25.795, 25.5884, 28.1579, 29.331, 28.8002, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4511, 21.2265, 23.9511, 25.2261, 24.6101, 25.0056, 26.017, 21.4192, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.4453, 19.9401, 20.2644, 21.0938, 17.8375, 17.6533, 19.3998, 20.5027, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.105, 28.0658, 23.6889, 23.4756, 26.1032, 27.3145, 26.7293, 27.0667, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3457, 42.1503, 44.6229, 45.7322, 45.1962, 45.5403, 46.4202, 42.3968, 42.1455, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9871, 61.4978, 61.8177, 62.5834, 58.8124, 58.6622, 60.974, 61.9383, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.571, 66.1358, 66.0025, 68.1427, 69.0418, 68.6076, 68.8915, 69.5665, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4489, 38.0381, 42.2311, 42.8202, 42.5358, 42.7658, 43.1667, 39.4587, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2287, 37.5338, 38.1741, 37.8649, 38.1149, 38.552, 34.6532, 33.2548, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2786, 24.8381, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2786, 24.8381, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2786, 24.8381, 29.274, 29.974, 29.636, 29.9094, 30.3885, 26.2455, 24.8153, 29.2707, 29.9756, 29.6541, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5078, 25.1858, 23.7071, 28.2761, 29.0325, 28.6669, 28.9579, 29.5066, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0024, 19.7502, 19.3888, 19.6765, 20.2199, 15.9284, 14.4523, 19.0185, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1739, 18.4781, 19.0536, 14.6096, 13.1206, 17.7653, 18.5561, 18.1995, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.7183, 14.2088, 19.0049, 19.8644, 19.449, 19.7797, 20.4065, 15.6964, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.3525, 15.0119, 15.283, 15.8017, 12.5825, 11.7456, 14.6477, 15.4081, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9662, 19.561, 15.0253, 13.5287, 18.2301, 19.0467, 18.6521, 18.9392, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.5734, 23.0973, 27.6473, 28.3952, 28.0337, 28.3214, 28.8649, 24.6086, 23.0953, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 37.0236, 36.6939, 36.9605, 37.4277, 33.3781, 31.9421, 36.3407, 36.989, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0318, 38.2537, 36.8383, 41.0687, 41.6748, 41.3822, 41.6188, 42.0286, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.1398, 20.8671, 24.8647, 25.1458, 25.01, 25.0892, 25.2651, 22.144, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1015, 22.1274, 22.4331, 22.2854, 22.3715, 22.5657, 19.3759, 18.1132, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5987, 13.3224, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5987, 13.3224, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5987, 13.3224, 17.3814, 17.7156, 17.5542, 17.6483, 17.8639, 14.5841, 13.3126, 17.3799, 17.7163, 17.5624, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2463, 13.9031, 12.6146, 16.7108, 17.0719, 16.8974, 16.9972, 17.2458, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5499, 11.9068, 11.7344, 11.833, 12.0788, 8.7466, 7.4584, 11.5571, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9594, 11.0637, 11.3257, 7.9389, 6.6487, 10.7643, 11.1418, 10.9709, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.4445, 7.1512, 11.3054, 11.7156, 11.5174, 11.6308, 11.9187, 8.435, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.9057, 8.7432, 8.8361, 9.0698, 6.9605, 6.0127, 8.5693, 8.932, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2764, 11.5481, 8.1285, 6.8371, 10.9672, 11.357, 11.1687, 11.2642, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5753, 12.2871, 16.3786, 16.7355, 16.563, 16.6617, 16.9075, 13.5908, 12.2859, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6924, 21.5349, 21.6268, 21.8363, 18.5926, 17.3169, 21.3664, 21.6769, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5906, 21.4438, 20.1705, 24.1775, 24.4669, 24.3271, 24.4086, 24.5892, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9155, 73.8887, 74.8309, 75.8007, 75.3316, 75.5572, 76.3331, 73.9312, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5415, 65.5455, 66.5996, 66.0898, 66.335, 67.1784, 64.5706, 64.5787, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3609, 46.329, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3609, 46.329, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3609, 46.329, 47.4051, 48.5576, 48.0001, 48.2682, 49.1904, 46.3082, 46.3008, 47.3997, 48.5602, 48.0263, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7327, 44.6702, 44.607, 45.7694, 47.0148, 46.4127, 46.6955, 47.7309, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.5289, 28.7601, 28.1649, 28.4444, 29.4699, 26.4395, 26.377, 27.552, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3269, 22.6225, 23.7069, 20.5157, 20.4496, 21.6544, 22.9564, 22.3631, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.2222, 22.1504, 23.4398, 24.855, 24.1708, 24.4922, 25.6708, 22.1868, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.3979, 19.8368, 20.1003, 21.0668, 18.3825, 18.3236, 19.2374, 20.4561, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.3236, 24.4434, 21.1556, 21.0874, 22.3239, 23.6684, 23.0184, 23.285, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5392, 42.4767, 43.6285, 44.8598, 44.2645, 44.5441, 45.5695, 42.5951, 42.4694, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.6157, 64.0718, 64.3334, 65.2331, 62.4669, 62.4358, 63.4913, 64.5663, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8281, 72.3471, 72.3195, 73.2823, 74.2802, 73.7975, 74.0296, 74.8232, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5986, 12.5974, 12.6131, 12.6398, 12.6269, 12.6325, 12.6549, 12.5991, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7346, 10.7518, 10.7807, 10.7667, 10.7729, 10.7972, 10.736, 10.7356, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0208, 7.0193, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0208, 7.0193, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0208, 7.0193, 7.038, 7.0697, 7.0544, 7.0611, 7.0877, 7.0193, 7.0186, 7.0379, 7.0698, 7.055, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 6.6653, 6.6631, 6.6837, 6.7179, 6.7014, 6.7085, 6.7382, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3451, 3.3789, 3.3626, 3.3696, 3.399, 3.3269, 3.3247, 3.3457, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9285, 1.9359, 1.967, 1.8908, 1.8884, 1.91, 1.9458, 1.9294, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9447, 0.9421, 0.9656, 1.0045, 0.9857, 0.9937, 1.0275, 0.9436, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8891, 0.8737, 0.8803, 0.908, 0.8401, 0.8379, 0.8572, 0.8906, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5036, 1.5357, 1.4571, 1.4546, 1.4769, 1.5139, 1.496, 1.5026, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.0624, 6.0602, 6.0806, 6.1144, 6.098, 6.105, 6.1345, 6.064, 6.0599, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2284, 10.2135, 10.2201, 10.246, 10.1807, 10.1793, 10.1975, 10.2272, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3528, 12.2949, 12.2936, 12.3098, 12.3372, 12.324, 12.3298, 12.3527, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6265, 51.2888, 55.3214, 55.9541, 55.6481, 55.7807, 56.2872, 51.6363, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.8876, 47.9486, 48.6363, 48.3037, 48.4479, 48.9989, 44.2241, 43.9115, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.5235, 31.1884, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.5235, 31.1884, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.5235, 31.1884, 35.2824, 36.0342, 35.6706, 35.8283, 36.4313, 31.4905, 31.1707, 35.279, 36.0359, 35.6876, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5841, 29.5348, 29.183, 33.3206, 34.1329, 33.7403, 33.9063, 34.5829, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8437, 20.6468, 20.2587, 20.4228, 21.0928, 16.0628, 15.711, 19.8587, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0537, 18.2272, 18.9361, 13.8095, 13.4577, 17.6149, 18.4641, 18.0771, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.9112, 14.5594, 18.7557, 19.6788, 19.2327, 19.4213, 20.1923, 14.889, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2584, 13.8925, 14.0472, 14.6801, 12.282, 12.0771, 13.5014, 14.2994, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.675, 19.4072, 14.2227, 13.8708, 18.0427, 18.9196, 18.4958, 18.65, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7043, 28.3525, 32.4852, 33.2883, 32.9001, 33.0642, 33.7342, 28.7393, 28.3473, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.5174, 46.1627, 46.3165, 46.9046, 42.0349, 41.6993, 45.7839, 46.4857, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4475, 49.7488, 49.4115, 53.4536, 54.1046, 53.7898, 53.9262, 54.4444, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4028, 51.3702, 51.7193, 51.9737, 51.8508, 51.9136, 52.1367, 51.4076, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.4893, 44.86, 45.1364, 45.0029, 45.0711, 45.3136, 44.5246, 44.5025, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3884, 30.35, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3884, 30.35, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3884, 30.35, 30.7458, 31.0481, 30.9021, 30.9767, 31.2418, 30.3734, 30.3441, 30.7445, 31.0487, 30.9117, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4484, 29.528, 29.482, 29.9044, 30.2308, 30.0732, 30.152, 30.4478, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9886, 17.3114, 17.1555, 17.2334, 17.5265, 16.6154, 16.57, 16.9944, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6131, 11.6955, 12.0054, 11.0477, 10.9997, 11.4366, 11.778, 11.6223, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0945, 6.0426, 6.5087, 6.8797, 6.7005, 6.79, 7.1269, 6.0833, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6332, 5.4863, 5.5597, 5.8359, 5.0503, 5.0083, 5.3289, 5.6464, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3889, 9.7089, 8.7232, 8.6737, 9.1216, 9.474, 9.3038, 9.3777, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7136, 26.6682, 27.0868, 27.4096, 27.2537, 27.3316, 27.6247, 26.7295, 26.6612, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1841, 43.0417, 43.1145, 43.3731, 42.5381, 42.5006, 42.8892, 43.1716, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1089, 50.3566, 50.3231, 50.6794, 50.9411, 50.8147, 50.8793, 51.1074, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.1217, 232.6761, 277.8325, 283.0248, 280.5158, 281.9133, 285.3684, 247.2008, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 209.9668, 255.5991, 261.2429, 258.5157, 260.0348, 263.8371, 224.438, 210.1764, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.8786, 167.3776, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.8786, 167.3776, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.8786, 167.3776, 213.5651, 219.7357, 216.754, 218.4148, 222.6222, 181.6092, 167.2087, 213.5373, 219.7492, 216.902, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.3044, 179.167, 164.4627, 211.2775, 217.9439, 214.7225, 216.4813, 221.2946, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.4395, 168.0301, 164.8453, 166.5841, 171.3464, 129.4038, 114.7057, 161.5703, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.3672, 160.206, 165.2728, 122.3562, 107.6267, 154.7657, 161.7351, 158.5733, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.6378, 116.8581, 164.6454, 172.2208, 168.5601, 170.5588, 176.113, 131.4597, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.3228, 134.3211, 135.9599, 140.4399, 108.815, 96.0428, 131.111, 137.6977, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 164.0882, 169.3379, 125.8368, 111.0885, 158.4705, 165.6672, 162.1895, 163.8692, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 174.7895, 160.0915, 206.8252, 213.4159, 210.2311, 211.9699, 216.7321, 175.0754, 160.0611, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.8122, 254.9032, 256.5235, 260.6152, 220.2557, 205.7632, 251.7921, 257.5339, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8695, 242.2386, 227.7845, 273.0996, 278.4424, 275.8606, 277.2987, 280.8433, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6166, 21.2912, 31.9795, 32.5097, 32.2536, 32.4168, 32.8119, 22.6252, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2463, 30.0012, 30.5776, 30.2993, 30.4766, 30.9073, 20.5784, 19.2676, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.4067, 16.0667, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.4067, 16.0667, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.4067, 16.0667, 26.8995, 27.5297, 27.2253, 27.4192, 27.8915, 17.3786, 16.0506, 26.8968, 27.531, 27.2403, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5809, 16.9365, 15.5742, 26.4881, 27.1686, 26.8398, 27.0458, 27.5798, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1224, 22.7952, 22.4701, 22.6738, 23.2027, 12.5808, 11.2198, 22.1357, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.7659, 22.9813, 23.5414, 12.8067, 11.4392, 22.3982, 23.1097, 22.787, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7695, 12.3916, 23.4408, 24.2142, 23.8405, 24.0746, 24.6847, 13.7497, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.544, 14.2376, 14.4295, 14.9345, 10.9645, 10.234, 13.9098, 14.5923, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.3913, 23.9701, 13.1677, 11.7963, 22.7892, 23.5239, 23.1689, 23.369, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.4877, 15.1267, 26.0293, 26.7021, 26.377, 26.5807, 27.1095, 16.5175, 15.1225, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0677, 29.7708, 29.9599, 30.4204, 19.98, 18.6424, 29.4529, 30.0394, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0612, 21.8214, 20.4938, 31.2042, 31.7499, 31.4864, 31.6543, 32.0584, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.5735, 165.0517, 176.5062, 178.7956, 177.6912, 178.577, 180.1526, 165.6085, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.4715, 154.3502, 156.8387, 155.6382, 156.601, 158.3136, 143.0387, 142.5757, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 104.0227, 103.4026, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 104.0227, 103.4026, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 104.0227, 103.4026, 115.7761, 118.4969, 117.1843, 118.237, 120.1095, 103.9008, 103.3074, 115.7636, 118.5029, 117.257, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3475, 98.4433, 97.6728, 110.5592, 113.499, 112.0791, 113.2002, 115.3431, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.2113, 71.1176, 69.7139, 70.8222, 72.9451, 56.1583, 55.3966, 68.276, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.5945, 64.7665, 67.0114, 49.6377, 48.8323, 62.0054, 65.0788, 63.6972, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.9415, 53.066, 66.8128, 70.1534, 68.5399, 69.8139, 72.254, 53.8632, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.4738, 52.1508, 53.1954, 55.1963, 44.258, 43.5401, 50.7345, 53.6376, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.6592, 68.9773, 51.2517, 50.4199, 63.8082, 66.9818, 65.449, 66.5508, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.7362, 94.9745, 107.7892, 110.6955, 109.2918, 110.4001, 112.5231, 95.8656, 94.9713, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.9998, 149.7193, 150.7463, 152.5731, 136.7183, 136.1133, 148.3455, 150.8619, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7194, 159.9084, 159.3715, 170.9674, 173.3232, 172.1867, 173.0982, 174.7077, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.113, 25.4371, 28.8945, 29.4669, 29.1902, 29.3769, 29.7955, 26.1223, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7657, 26.3024, 26.9245, 26.6238, 26.8268, 27.2824, 23.4499, 22.7897, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3511, 18.6571, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3511, 18.6571, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3511, 18.6571, 22.2862, 22.9665, 22.6377, 22.8596, 23.3584, 19.3193, 18.6374, 22.2831, 22.968, 22.6544, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8346, 18.6493, 17.9262, 21.6524, 22.3874, 22.0321, 22.2677, 22.8335, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2166, 16.9433, 16.592, 16.8249, 17.3853, 13.2253, 12.5038, 16.2314, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8583, 17.1046, 17.6976, 13.4111, 12.6815, 16.4614, 17.2298, 16.8817, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.46, 13.7173, 17.6045, 18.4397, 18.0359, 18.3036, 18.9488, 14.4391, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.032, 13.7008, 13.9203, 14.4516, 11.804, 11.3799, 13.347, 14.0763, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5542, 18.1668, 13.8044, 13.0699, 16.89, 17.6835, 17.2999, 17.5294, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1077, 17.3862, 21.099, 21.8257, 21.4744, 21.7073, 22.2677, 18.1414, 17.3832, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.1808, 25.8601, 26.0765, 26.563, 22.6056, 21.9144, 25.5171, 26.149, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8131, 25.0806, 24.4019, 27.8857, 28.4747, 28.19, 28.3822, 28.8101, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5521, 14.2751, 17.9271, 17.9984, 17.9678, 18.1031, 18.2553, 14.5557, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5656, 16.3343, 16.4118, 16.3786, 16.5256, 16.6911, 12.8605, 12.5814, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9497, 9.6338, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9497, 9.6338, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9497, 9.6338, 13.5387, 13.6235, 13.5872, 13.748, 13.929, 9.9372, 9.6195, 13.5383, 13.6237, 13.5982, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7684, 9.6457, 9.2956, 13.3322, 13.4238, 13.3839, 13.5558, 13.7679, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9601, 10.0506, 10.0112, 10.1811, 10.3912, 6.29, 5.9431, 9.9677, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6003, 9.78, 10.0023, 5.7939, 5.4312, 9.5463, 9.6421, 9.6128, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2539, 5.8657, 10.1379, 10.242, 10.1966, 10.3919, 10.6336, 6.2457, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.0929, 7.0557, 7.2158, 7.4142, 5.1841, 4.8847, 7.0075, 7.1123, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9807, 10.2103, 5.9377, 5.5654, 9.7394, 9.8383, 9.7952, 9.9665, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.2872, 8.9403, 12.9573, 13.0478, 13.0084, 13.1783, 13.3884, 9.3004, 8.9396, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.0597, 16.0242, 16.1811, 16.3577, 12.4208, 12.111, 15.977, 16.043, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.863, 14.1173, 13.8344, 17.5253, 17.5987, 17.5672, 17.7065, 17.8618, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.1913, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.0905, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.1663, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.274, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.3981, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.3547, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2744, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.2427, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.1104, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.5227, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.1467, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.2278, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.3574, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.4635, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.2602, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.7455, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.2533, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.1379, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.2361, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.1295, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679, 0.2679), .Dim = c(8052,3), .Dimnames = list(c( "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255","256","257","258","259","260","261","262","263","264","265","266","267","268","269","270","271","272","273","274","275","276","277","278","279","280","281","282","283","284","285","286","287","288","289","290","291","292","293","294","295","296","297","298","299","300","301","302","303","304","305","306","307","308","309","310","311","312","313","314","315","316","317","318","319","320","321","322","323","324","325","326","327","328","329","330","331","332","333","334","335","336","337","338","339","340","341","342","343","344","345","346","347","348","349","350","351","352","353","354","355","356","357","358","359","360","361","362","363","364","365","366","367","368","369","370","371","372","373","374","375","376","377","378","379","380","381","382","383","384","385","386","387","388","389","390","391","392","393","394","395","396","397","398","399","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","419","420","421","422","423","424","425","426","427","428","429","430","431","432","433","434","435","436","437","438","439","440","441","442","443","444","445","446","447","448","449","450","451","452","453","454","455","456","457","458","459","460","461","462","463","464","465","466","467","468","469","470","471","472","473","474","475","476","477","478","479","480","481","482","483","484","485","486","487","488","489","490","491","492","493","494","495","496","497","498","499","500","501","502","503","504","505","506","507","508","509","510","511","512","513","514","515","516","517","518","519","520","521","522","523","524","525","526","527","528","529","530","531","532","533","534","535","536","537","538","539","540","541","542","543","544","545","546","547","548","549","550","551","552","553","554","555","556","557","558","559","560","561","562","563","564","565","566","567","568","569","570","571","572","573","574","575","576","577","578","579","580","581","582","583","584","585","586","587","588","589","590","591","592","593","594","595","596","597","598","599","600","601","602","603","604","605","606","607","608","609","610","611","612","613","614","615","616","617","618","619","620","621","622","623","624","625","626","627","628","629","630","631","632","633","634","635","636","637","638","639","640","641","642","643","644","645","646","647","648","649","650","651","652","653","654","655","656","657","658","659","660","661","662","663","664","665","666","667","668","669","670","671","672","673","674","675","676","677","678","679","680","681","682","683","684","685","686","687","688","689","690","691","692","693","694","695","696","697","698","699","700","701","702","703","704","705","706","707","708","709","710","711","712","713","714","715","716","717","718","719","720","721","722","723","724","725","726","727","728","729","730","731","732","733","734","735","736","737","738","739","740","741","742","743","744","745","746","747","748","749","750","751","752","753","754","755","756","757","758","759","760","761","762","763","764","765","766","767","768","769","770","771","772","773","774","775","776","777","778","779","780","781","782","783","784","785","786","787","788","789","790","791","792","793","794","795","796","797","798","799","800","801","802","803","804","805","806","807","808","809","810","811","812","813","814","815","816","817","818","819","820","821","822","823","824","825","826","827","828","829","830","831","832","833","834","835","836","837","838","839","840","841","842","843","844","845","846","847","848","849","850","851","852","853","854","855","856","857","858","859","860","861","862","863","864","865","866","867","868","869","870","871","872","873","874","875","876","877","878","879","880","881","882","883","884","885","886","887","888","889","890","891","892","893","894","895","896","897","898","899","900","901","902","903","904","905","906","907","908","909","910","911","912","913","914","915","916","917","918","919","920","921","922","923","924","925","926","927","928","929","930","931","932","933","934","935","936","937","938","939","940","941","942","943","944","945","946","947","948","949","950","951","952","953","954","955","956","957","958","959","960","961","962","963","964","965","966","967","968","969","970","971","972","973","974","975","976","977","978","979","980","981","982","983","984","985","986","987","988","989","990","991","992","993","994","995","996","997","998","999","1000","1001","1002","1003","1004","1005","1006","1007","1008","1009","1010","1011","1012","1013","1014","1015","1016","1017","1018","1019","1020","1021","1022","1023","1024","1025","1026","1027","1028","1029","1030","1031","1032","1033","1034","1035","1036","1037","1038","1039","1040","1041","1042","1043","1044","1045","1046","1047","1048","1049","1050","1051","1052","1053","1054","1055","1056","1057","1058","1059","1060","1061","1062","1063","1064","1065","1066","1067","1068","1069","1070","1071","1072","1073","1074","1075","1076","1077","1078","1079","1080","1081","1082","1083","1084","1085","1086","1087","1088","1089","1090","1091","1092","1093","1094","1095","1096","1097","1098","1099","1100","1101","1102","1103","1104","1105","1106","1107","1108","1109","1110","1111","1112","1113","1114","1115","1116","1117","1118","1119","1120","1121","1122","1123","1124","1125","1126","1127","1128","1129","1130","1131","1132","1133","1134","1135","1136","1137","1138","1139","1140","1141","1142","1143","1144","1145","1146","1147","1148","1149","1150","1151","1152","1153","1154","1155","1156","1157","1158","1159","1160","1161","1162","1163","1164","1165","1166","1167","1168","1169","1170","1171","1172","1173","1174","1175","1176","1177","1178","1179","1180","1181","1182","1183","1184","1185","1186","1187","1188","1189","1190","1191","1192","1193","1194","1195","1196","1197","1198","1199","1200","1201","1202","1203","1204","1205","1206","1207","1208","1209","1210","1211","1212","1213","1214","1215","1216","1217","1218","1219","1220","1221","1222","1223","1224","1225","1226","1227","1228","1229","1230","1231","1232","1233","1234","1235","1236","1237","1238","1239","1240","1241","1242","1243","1244","1245","1246","1247","1248","1249","1250","1251","1252","1253","1254","1255","1256","1257","1258","1259","1260","1261","1262","1263","1264","1265","1266","1267","1268","1269","1270","1271","1272","1273","1274","1275","1276","1277","1278","1279","1280","1281","1282","1283","1284","1285","1286","1287","1288","1289","1290","1291","1292","1293","1294","1295","1296","1297","1298","1299","1300","1301","1302","1303","1304","1305","1306","1307","1308","1309","1310","1311","1312","1313","1314","1315","1316","1317","1318","1319","1320","1321","1322","1323","1324","1325","1326","1327","1328","1329","1330","1331","1332","1333","1334","1335","1336","1337","1338","1339","1340","1341","1342","1343","1344","1345","1346","1347","1348","1349","1350","1351","1352","1353","1354","1355","1356","1357","1358","1359","1360","1361","1362","1363","1364","1365","1366","1367","1368","1369","1370","1371","1372","1373","1374","1375","1376","1377","1378","1379","1380","1381","1382","1383","1384","1385","1386","1387","1388","1389","1390","1391","1392","1393","1394","1395","1396","1397","1398","1399","1400","1401","1402","1403","1404","1405","1406","1407","1408","1409","1410","1411","1412","1413","1414","1415","1416","1417","1418","1419","1420","1421","1422","1423","1424","1425","1426","1427","1428","1429","1430","1431","1432","1433","1434","1435","1436","1437","1438","1439","1440","1441","1442","1443","1444","1445","1446","1447","1448","1449","1450","1451","1452","1453","1454","1455","1456","1457","1458","1459","1460","1461","1462","1463","1464","1465","1466","1467","1468","1469","1470","1471","1472","1473","1474","1475","1476","1477","1478","1479","1480","1481","1482","1483","1484","1485","1486","1487","1488","1489","1490","1491","1492","1493","1494","1495","1496","1497","1498","1499","1500","1501","1502","1503","1504","1505","1506","1507","1508","1509","1510","1511","1512","1513","1514","1515","1516","1517","1518","1519","1520","1521","1522","1523","1524","1525","1526","1527","1528","1529","1530","1531","1532","1533","1534","1535","1536","1537","1538","1539","1540","1541","1542","1543","1544","1545","1546","1547","1548","1549","1550","1551","1552","1553","1554","1555","1556","1557","1558","1559","1560","1561","1562","1563","1564","1565","1566","1567","1568","1569","1570","1571","1572","1573","1574","1575","1576","1577","1578","1579","1580","1581","1582","1583","1584","1585","1586","1587","1588","1589","1590","1591","1592","1593","1594","1595","1596","1597","1598","1599","1600","1601","1602","1603","1604","1605","1606","1607","1608","1609","1610","1611","1612","1613","1614","1615","1616","1617","1618","1619","1620","1621","1622","1623","1624","1625","1626","1627","1628","1629","1630","1631","1632","1633","1634","1635","1636","1637","1638","1639","1640","1641","1642","1643","1644","1645","1646","1647","1648","1649","1650","1651","1652","1653","1654","1655","1656","1657","1658","1659","1660","1661","1662","1663","1664","1665","1666","1667","1668","1669","1670","1671","1672","1673","1674","1675","1676","1677","1678","1679","1680","1681","1682","1683","1684","1685","1686","1687","1688","1689","1690","1691","1692","1693","1694","1695","1696","1697","1698","1699","1700","1701","1702","1703","1704","1705","1706","1707","1708","1709","1710","1711","1712","1713","1714","1715","1716","1717","1718","1719","1720","1721","1722","1723","1724","1725","1726","1727","1728","1729","1730","1731","1732","1733","1734","1735","1736","1737","1738","1739","1740","1741","1742","1743","1744","1745","1746","1747","1748","1749","1750","1751","1752","1753","1754","1755","1756","1757","1758","1759","1760","1761","1762","1763","1764","1765","1766","1767","1768","1769","1770","1771","1772","1773","1774","1775","1776","1777","1778","1779","1780","1781","1782","1783","1784","1785","1786","1787","1788","1789","1790","1791","1792","1793","1794","1795","1796","1797","1798","1799","1800","1801","1802","1803","1804","1805","1806","1807","1808","1809","1810","1811","1812","1813","1814","1815","1816","1817","1818","1819","1820","1821","1822","1823","1824","1825","1826","1827","1828","1829","1830","1831","1832","1833","1834","1835","1836","1837","1838","1839","1840","1841","1842","1843","1844","1845","1846","1847","1848","1849","1850","1851","1852","1853","1854","1855","1856","1857","1858","1859","1860","1861","1862","1863","1864","1865","1866","1867","1868","1869","1870","1871","1872","1873","1874","1875","1876","1877","1878","1879","1880","1881","1882","1883","1884","1885","1886","1887","1888","1889","1890","1891","1892","1893","1894","1895","1896","1897","1898","1899","1900","1901","1902","1903","1904","1905","1906","1907","1908","1909","1910","1911","1912","1913","1914","1915","1916","1917","1918","1919","1920","1921","1922","1923","1924","1925","1926","1927","1928","1929","1930","1931","1932","1933","1934","1935","1936","1937","1938","1939","1940","1941","1942","1943","1944","1945","1946","1947","1948","1949","1950","1951","1952","1953","1954","1955","1956","1957","1958","1959","1960","1961","1962","1963","1964","1965","1966","1967","1968","1969","1970","1971","1972","1973","1974","1975","1976","1977","1978","1979","1980","1981","1982","1983","1984","1985","1986","1987","1988","1989","1990","1991","1992","1993","1994","1995","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021","2022","2023","2024","2025","2026","2027","2028","2029","2030","2031","2032","2033","2034","2035","2036","2037","2038","2039","2040","2041","2042","2043","2044","2045","2046","2047","2048","2049","2050","2051","2052","2053","2054","2055","2056","2057","2058","2059","2060","2061","2062","2063","2064","2065","2066","2067","2068","2069","2070","2071","2072","2073","2074","2075","2076","2077","2078","2079","2080","2081","2082","2083","2084","2085","2086","2087","2088","2089","2090","2091","2092","2093","2094","2095","2096","2097","2098","2099","2100","2101","2102","2103","2104","2105","2106","2107","2108","2109","2110","2111","2112","2113","2114","2115","2116","2117","2118","2119","2120","2121","2122","2123","2124","2125","2126","2127","2128","2129","2130","2131","2132","2133","2134","2135","2136","2137","2138","2139","2140","2141","2142","2143","2144","2145","2146","2147","2148","2149","2150","2151","2152","2153","2154","2155","2156","2157","2158","2159","2160","2161","2162","2163","2164","2165","2166","2167","2168","2169","2170","2171","2172","2173","2174","2175","2176","2177","2178","2179","2180","2181","2182","2183","2184","2185","2186","2187","2188","2189","2190","2191","2192","2193","2194","2195","2196","2197","2198","2199","2200","2201","2202","2203","2204","2205","2206","2207","2208","2209","2210","2211","2212","2213","2214","2215","2216","2217","2218","2219","2220","2221","2222","2223","2224","2225","2226","2227","2228","2229","2230","2231","2232","2233","2234","2235","2236","2237","2238","2239","2240","2241","2242","2243","2244","2245","2246","2247","2248","2249","2250","2251","2252","2253","2254","2255","2256","2257","2258","2259","2260","2261","2262","2263","2264","2265","2266","2267","2268","2269","2270","2271","2272","2273","2274","2275","2276","2277","2278","2279","2280","2281","2282","2283","2284","2285","2286","2287","2288","2289","2290","2291","2292","2293","2294","2295","2296","2297","2298","2299","2300","2301","2302","2303","2304","2305","2306","2307","2308","2309","2310","2311","2312","2313","2314","2315","2316","2317","2318","2319","2320","2321","2322","2323","2324","2325","2326","2327","2328","2329","2330","2331","2332","2333","2334","2335","2336","2337","2338","2339","2340","2341","2342","2343","2344","2345","2346","2347","2348","2349","2350","2351","2352","2353","2354","2355","2356","2357","2358","2359","2360","2361","2362","2363","2364","2365","2366","2367","2368","2369","2370","2371","2372","2373","2374","2375","2376","2377","2378","2379","2380","2381","2382","2383","2384","2385","2386","2387","2388","2389","2390","2391","2392","2393","2394","2395","2396","2397","2398","2399","2400","2401","2402","2403","2404","2405","2406","2407","2408","2409","2410","2411","2412","2413","2414","2415","2416","2417","2418","2419","2420","2421","2422","2423","2424","2425","2426","2427","2428","2429","2430","2431","2432","2433","2434","2435","2436","2437","2438","2439","2440","2441","2442","2443","2444","2445","2446","2447","2448","2449","2450","2451","2452","2453","2454","2455","2456","2457","2458","2459","2460","2461","2462","2463","2464","2465","2466","2467","2468","2469","2470","2471","2472","2473","2474","2475","2476","2477","2478","2479","2480","2481","2482","2483","2484","2485","2486","2487","2488","2489","2490","2491","2492","2493","2494","2495","2496","2497","2498","2499","2500","2501","2502","2503","2504","2505","2506","2507","2508","2509","2510","2511","2512","2513","2514","2515","2516","2517","2518","2519","2520","2521","2522","2523","2524","2525","2526","2527","2528","2529","2530","2531","2532","2533","2534","2535","2536","2537","2538","2539","2540","2541","2542","2543","2544","2545","2546","2547","2548","2549","2550","2551","2552","2553","2554","2555","2556","2557","2558","2559","2560","2561","2562","2563","2564","2565","2566","2567","2568","2569","2570","2571","2572","2573","2574","2575","2576","2577","2578","2579","2580","2581","2582","2583","2584","2585","2586","2587","2588","2589","2590","2591","2592","2593","2594","2595","2596","2597","2598","2599","2600","2601","2602","2603","2604","2605","2606","2607","2608","2609","2610","2611","2612","2613","2614","2615","2616","2617","2618","2619","2620","2621","2622","2623","2624","2625","2626","2627","2628","2629","2630","2631","2632","2633","2634","2635","2636","2637","2638","2639","2640","2641","2642","2643","2644","2645","2646","2647","2648","2649","2650","2651","2652","2653","2654","2655","2656","2657","2658","2659","2660","2661","2662","2663","2664","2665","2666","2667","2668","2669","2670","2671","2672","2673","2674","2675","2676","2677","2678","2679","2680","2681","2682","2683","2684","2685","2686","2687","2688","2689","2690","2691","2692","2693","2694","2695","2696","2697","2698","2699","2700","2701","2702","2703","2704","2705","2706","2707","2708","2709","2710","2711","2712","2713","2714","2715","2716","2717","2718","2719","2720","2721","2722","2723","2724","2725","2726","2727","2728","2729","2730","2731","2732","2733","2734","2735","2736","2737","2738","2739","2740","2741","2742","2743","2744","2745","2746","2747","2748","2749","2750","2751","2752","2753","2754","2755","2756","2757","2758","2759","2760","2761","2762","2763","2764","2765","2766","2767","2768","2769","2770","2771","2772","2773","2774","2775","2776","2777","2778","2779","2780","2781","2782","2783","2784","2785","2786","2787","2788","2789","2790","2791","2792","2793","2794","2795","2796","2797","2798","2799","2800","2801","2802","2803","2804","2805","2806","2807","2808","2809","2810","2811","2812","2813","2814","2815","2816","2817","2818","2819","2820","2821","2822","2823","2824","2825","2826","2827","2828","2829","2830","2831","2832","2833","2834","2835","2836","2837","2838","2839","2840","2841","2842","2843","2844","2845","2846","2847","2848","2849","2850","2851","2852","2853","2854","2855","2856","2857","2858","2859","2860","2861","2862","2863","2864","2865","2866","2867","2868","2869","2870","2871","2872","2873","2874","2875","2876","2877","2878","2879","2880","2881","2882","2883","2884","2885","2886","2887","2888","2889","2890","2891","2892","2893","2894","2895","2896","2897","2898","2899","2900","2901","2902","2903","2904","2905","2906","2907","2908","2909","2910","2911","2912","2913","2914","2915","2916","2917","2918","2919","2920","2921","2922","2923","2924","2925","2926","2927","2928","2929","2930","2931","2932","2933","2934","2935","2936","2937","2938","2939","2940","2941","2942","2943","2944","2945","2946","2947","2948","2949","2950","2951","2952","2953","2954","2955","2956","2957","2958","2959","2960","2961","2962","2963","2964","2965","2966","2967","2968","2969","2970","2971","2972","2973","2974","2975","2976","2977","2978","2979","2980","2981","2982","2983","2984","2985","2986","2987","2988","2989","2990","2991","2992","2993","2994","2995","2996","2997","2998","2999","3000","3001","3002","3003","3004","3005","3006","3007","3008","3009","3010","3011","3012","3013","3014","3015","3016","3017","3018","3019","3020","3021","3022","3023","3024","3025","3026","3027","3028","3029","3030","3031","3032","3033","3034","3035","3036","3037","3038","3039","3040","3041","3042","3043","3044","3045","3046","3047","3048","3049","3050","3051","3052","3053","3054","3055","3056","3057","3058","3059","3060","3061","3062","3063","3064","3065","3066","3067","3068","3069","3070","3071","3072","3073","3074","3075","3076","3077","3078","3079","3080","3081","3082","3083","3084","3085","3086","3087","3088","3089","3090","3091","3092","3093","3094","3095","3096","3097","3098","3099","3100","3101","3102","3103","3104","3105","3106","3107","3108","3109","3110","3111","3112","3113","3114","3115","3116","3117","3118","3119","3120","3121","3122","3123","3124","3125","3126","3127","3128","3129","3130","3131","3132","3133","3134","3135","3136","3137","3138","3139","3140","3141","3142","3143","3144","3145","3146","3147","3148","3149","3150","3151","3152","3153","3154","3155","3156","3157","3158","3159","3160","3161","3162","3163","3164","3165","3166","3167","3168","3169","3170","3171","3172","3173","3174","3175","3176","3177","3178","3179","3180","3181","3182","3183","3184","3185","3186","3187","3188","3189","3190","3191","3192","3193","3194","3195","3196","3197","3198","3199","3200","3201","3202","3203","3204","3205","3206","3207","3208","3209","3210","3211","3212","3213","3214","3215","3216","3217","3218","3219","3220","3221","3222","3223","3224","3225","3226","3227","3228","3229","3230","3231","3232","3233","3234","3235","3236","3237","3238","3239","3240","3241","3242","3243","3244","3245","3246","3247","3248","3249","3250","3251","3252","3253","3254","3255","3256","3257","3258","3259","3260","3261","3262","3263","3264","3265","3266","3267","3268","3269","3270","3271","3272","3273","3274","3275","3276","3277","3278","3279","3280","3281","3282","3283","3284","3285","3286","3287","3288","3289","3290","3291","3292","3293","3294","3295","3296","3297","3298","3299","3300","3301","3302","3303","3304","3305","3306","3307","3308","3309","3310","3311","3312","3313","3314","3315","3316","3317","3318","3319","3320","3321","3322","3323","3324","3325","3326","3327","3328","3329","3330","3331","3332","3333","3334","3335","3336","3337","3338","3339","3340","3341","3342","3343","3344","3345","3346","3347","3348","3349","3350","3351","3352","3353","3354","3355","3356","3357","3358","3359","3360","3361","3362","3363","3364","3365","3366","3367","3368","3369","3370","3371","3372","3373","3374","3375","3376","3377","3378","3379","3380","3381","3382","3383","3384","3385","3386","3387","3388","3389","3390","3391","3392","3393","3394","3395","3396","3397","3398","3399","3400","3401","3402","3403","3404","3405","3406","3407","3408","3409","3410","3411","3412","3413","3414","3415","3416","3417","3418","3419","3420","3421","3422","3423","3424","3425","3426","3427","3428","3429","3430","3431","3432","3433","3434","3435","3436","3437","3438","3439","3440","3441","3442","3443","3444","3445","3446","3447","3448","3449","3450","3451","3452","3453","3454","3455","3456","3457","3458","3459","3460","3461","3462","3463","3464","3465","3466","3467","3468","3469","3470","3471","3472","3473","3474","3475","3476","3477","3478","3479","3480","3481","3482","3483","3484","3485","3486","3487","3488","3489","3490","3491","3492","3493","3494","3495","3496","3497","3498","3499","3500","3501","3502","3503","3504","3505","3506","3507","3508","3509","3510","3511","3512","3513","3514","3515","3516","3517","3518","3519","3520","3521","3522","3523","3524","3525","3526","3527","3528","3529","3530","3531","3532","3533","3534","3535","3536","3537","3538","3539","3540","3541","3542","3543","3544","3545","3546","3547","3548","3549","3550","3551","3552","3553","3554","3555","3556","3557","3558","3559","3560","3561","3562","3563","3564","3565","3566","3567","3568","3569","3570","3571","3572","3573","3574","3575","3576","3577","3578","3579","3580","3581","3582","3583","3584","3585","3586","3587","3588","3589","3590","3591","3592","3593","3594","3595","3596","3597","3598","3599","3600","3601","3602","3603","3604","3605","3606","3607","3608","3609","3610","3611","3612","3613","3614","3615","3616","3617","3618","3619","3620","3621","3622","3623","3624","3625","3626","3627","3628","3629","3630","3631","3632","3633","3634","3635","3636","3637","3638","3639","3640","3641","3642","3643","3644","3645","3646","3647","3648","3649","3650","3651","3652","3653","3654","3655","3656","3657","3658","3659","3660","3661","3662","3663","3664","3665","3666","3667","3668","3669","3670","3671","3672","3673","3674","3675","3676","3677","3678","3679","3680","3681","3682","3683","3684","3685","3686","3687","3688","3689","3690","3691","3692","3693","3694","3695","3696","3697","3698","3699","3700","3701","3702","3703","3704","3705","3706","3707","3708","3709","3710","3711","3712","3713","3714","3715","3716","3717","3718","3719","3720","3721","3722","3723","3724","3725","3726","3727","3728","3729","3730","3731","3732","3733","3734","3735","3736","3737","3738","3739","3740","3741","3742","3743","3744","3745","3746","3747","3748","3749","3750","3751","3752","3753","3754","3755","3756","3757","3758","3759","3760","3761","3762","3763","3764","3765","3766","3767","3768","3769","3770","3771","3772","3773","3774","3775","3776","3777","3778","3779","3780","3781","3782","3783","3784","3785","3786","3787","3788","3789","3790","3791","3792","3793","3794","3795","3796","3797","3798","3799","3800","3801","3802","3803","3804","3805","3806","3807","3808","3809","3810","3811","3812","3813","3814","3815","3816","3817","3818","3819","3820","3821","3822","3823","3824","3825","3826","3827","3828","3829","3830","3831","3832","3833","3834","3835","3836","3837","3838","3839","3840","3841","3842","3843","3844","3845","3846","3847","3848","3849","3850","3851","3852","3853","3854","3855","3856","3857","3858","3859","3860","3861","3862","3863","3864","3865","3866","3867","3868","3869","3870","3871","3872","3873","3874","3875","3876","3877","3878","3879","3880","3881","3882","3883","3884","3885","3886","3887","3888","3889","3890","3891","3892","3893","3894","3895","3896","3897","3898","3899","3900","3901","3902","3903","3904","3905","3906","3907","3908","3909","3910","3911","3912","3913","3914","3915","3916","3917","3918","3919","3920","3921","3922","3923","3924","3925","3926","3927","3928","3929","3930","3931","3932","3933","3934","3935","3936","3937","3938","3939","3940","3941","3942","3943","3944","3945","3946","3947","3948","3949","3950","3951","3952","3953","3954","3955","3956","3957","3958","3959","3960","3961","3962","3963","3964","3965","3966","3967","3968","3969","3970","3971","3972","3973","3974","3975","3976","3977","3978","3979","3980","3981","3982","3983","3984","3985","3986","3987","3988","3989","3990","3991","3992","3993","3994","3995","3996","3997","3998","3999","4000","4001","4002","4003","4004","4005","4006","4007","4008","4009","4010","4011","4012","4013","4014","4015","4016","4017","4018","4019","4020","4021","4022","4023","4024","4025","4026","4027","4028","4029","4030","4031","4032","4033","4034","4035","4036","4037","4038","4039","4040","4041","4042","4043","4044","4045","4046","4047","4048","4049","4050","4051","4052","4053","4054","4055","4056","4057","4058","4059","4060","4061","4062","4063","4064","4065","4066","4067","4068","4069","4070","4071","4072","4073","4074","4075","4076","4077","4078","4079","4080","4081","4082","4083","4084","4085","4086","4087","4088","4089","4090","4091","4092","4093","4094","4095","4096","4097","4098","4099","4100","4101","4102","4103","4104","4105","4106","4107","4108","4109","4110","4111","4112","4113","4114","4115","4116","4117","4118","4119","4120","4121","4122","4123","4124","4125","4126","4127","4128","4129","4130","4131","4132","4133","4134","4135","4136","4137","4138","4139","4140","4141","4142","4143","4144","4145","4146","4147","4148","4149","4150","4151","4152","4153","4154","4155","4156","4157","4158","4159","4160","4161","4162","4163","4164","4165","4166","4167","4168","4169","4170","4171","4172","4173","4174","4175","4176","4177","4178","4179","4180","4181","4182","4183","4184","4185","4186","4187","4188","4189","4190","4191","4192","4193","4194","4195","4196","4197","4198","4199","4200","4201","4202","4203","4204","4205","4206","4207","4208","4209","4210","4211","4212","4213","4214","4215","4216","4217","4218","4219","4220","4221","4222","4223","4224","4225","4226","4227","4228","4229","4230","4231","4232","4233","4234","4235","4236","4237","4238","4239","4240","4241","4242","4243","4244","4245","4246","4247","4248","4249","4250","4251","4252","4253","4254","4255","4256","4257","4258","4259","4260","4261","4262","4263","4264","4265","4266","4267","4268","4269","4270","4271","4272","4273","4274","4275","4276","4277","4278","4279","4280","4281","4282","4283","4284","4285","4286","4287","4288","4289","4290","4291","4292","4293","4294","4295","4296","4297","4298","4299","4300","4301","4302","4303","4304","4305","4306","4307","4308","4309","4310","4311","4312","4313","4314","4315","4316","4317","4318","4319","4320","4321","4322","4323","4324","4325","4326","4327","4328","4329","4330","4331","4332","4333","4334","4335","4336","4337","4338","4339","4340","4341","4342","4343","4344","4345","4346","4347","4348","4349","4350","4351","4352","4353","4354","4355","4356","4357","4358","4359","4360","4361","4362","4363","4364","4365","4366","4367","4368","4369","4370","4371","4372","4373","4374","4375","4376","4377","4378","4379","4380","4381","4382","4383","4384","4385","4386","4387","4388","4389","4390","4391","4392","4393","4394","4395","4396","4397","4398","4399","4400","4401","4402","4403","4404","4405","4406","4407","4408","4409","4410","4411","4412","4413","4414","4415","4416","4417","4418","4419","4420","4421","4422","4423","4424","4425","4426","4427","4428","4429","4430","4431","4432","4433","4434","4435","4436","4437","4438","4439","4440","4441","4442","4443","4444","4445","4446","4447","4448","4449","4450","4451","4452","4453","4454","4455","4456","4457","4458","4459","4460","4461","4462","4463","4464","4465","4466","4467","4468","4469","4470","4471","4472","4473","4474","4475","4476","4477","4478","4479","4480","4481","4482","4483","4484","4485","4486","4487","4488","4489","4490","4491","4492","4493","4494","4495","4496","4497","4498","4499","4500","4501","4502","4503","4504","4505","4506","4507","4508","4509","4510","4511","4512","4513","4514","4515","4516","4517","4518","4519","4520","4521","4522","4523","4524","4525","4526","4527","4528","4529","4530","4531","4532","4533","4534","4535","4536","4537","4538","4539","4540","4541","4542","4543","4544","4545","4546","4547","4548","4549","4550","4551","4552","4553","4554","4555","4556","4557","4558","4559","4560","4561","4562","4563","4564","4565","4566","4567","4568","4569","4570","4571","4572","4573","4574","4575","4576","4577","4578","4579","4580","4581","4582","4583","4584","4585","4586","4587","4588","4589","4590","4591","4592","4593","4594","4595","4596","4597","4598","4599","4600","4601","4602","4603","4604","4605","4606","4607","4608","4609","4610","4611","4612","4613","4614","4615","4616","4617","4618","4619","4620","4621","4622","4623","4624","4625","4626","4627","4628","4629","4630","4631","4632","4633","4634","4635","4636","4637","4638","4639","4640","4641","4642","4643","4644","4645","4646","4647","4648","4649","4650","4651","4652","4653","4654","4655","4656","4657","4658","4659","4660","4661","4662","4663","4664","4665","4666","4667","4668","4669","4670","4671","4672","4673","4674","4675","4676","4677","4678","4679","4680","4681","4682","4683","4684","4685","4686","4687","4688","4689","4690","4691","4692","4693","4694","4695","4696","4697","4698","4699","4700","4701","4702","4703","4704","4705","4706","4707","4708","4709","4710","4711","4712","4713","4714","4715","4716","4717","4718","4719","4720","4721","4722","4723","4724","4725","4726","4727","4728","4729","4730","4731","4732","4733","4734","4735","4736","4737","4738","4739","4740","4741","4742","4743","4744","4745","4746","4747","4748","4749","4750","4751","4752","4753","4754","4755","4756","4757","4758","4759","4760","4761","4762","4763","4764","4765","4766","4767","4768","4769","4770","4771","4772","4773","4774","4775","4776","4777","4778","4779","4780","4781","4782","4783","4784","4785","4786","4787","4788","4789","4790","4791","4792","4793","4794","4795","4796","4797","4798","4799","4800","4801","4802","4803","4804","4805","4806","4807","4808","4809","4810","4811","4812","4813","4814","4815","4816","4817","4818","4819","4820","4821","4822","4823","4824","4825","4826","4827","4828","4829","4830","4831","4832","4833","4834","4835","4836","4837","4838","4839","4840","4841","4842","4843","4844","4845","4846","4847","4848","4849","4850","4851","4852","4853","4854","4855","4856","4857","4858","4859","4860","4861","4862","4863","4864","4865","4866","4867","4868","4869","4870","4871","4872","4873","4874","4875","4876","4877","4878","4879","4880","4881","4882","4883","4884","4885","4886","4887","4888","4889","4890","4891","4892","4893","4894","4895","4896","4897","4898","4899","4900","4901","4902","4903","4904","4905","4906","4907","4908","4909","4910","4911","4912","4913","4914","4915","4916","4917","4918","4919","4920","4921","4922","4923","4924","4925","4926","4927","4928","4929","4930","4931","4932","4933","4934","4935","4936","4937","4938","4939","4940","4941","4942","4943","4944","4945","4946","4947","4948","4949","4950","4951","4952","4953","4954","4955","4956","4957","4958","4959","4960","4961","4962","4963","4964","4965","4966","4967","4968","4969","4970","4971","4972","4973","4974","4975","4976","4977","4978","4979","4980","4981","4982","4983","4984","4985","4986","4987","4988","4989","4990","4991","4992","4993","4994","4995","4996","4997","4998","4999","5000","5001","5002","5003","5004","5005","5006","5007","5008","5009","5010","5011","5012","5013","5014","5015","5016","5017","5018","5019","5020","5021","5022","5023","5024","5025","5026","5027","5028","5029","5030","5031","5032","5033","5034","5035","5036","5037","5038","5039","5040","5041","5042","5043","5044","5045","5046","5047","5048","5049","5050","5051","5052","5053","5054","5055","5056","5057","5058","5059","5060","5061","5062","5063","5064","5065","5066","5067","5068","5069","5070","5071","5072","5073","5074","5075","5076","5077","5078","5079","5080","5081","5082","5083","5084","5085","5086","5087","5088","5089","5090","5091","5092","5093","5094","5095","5096","5097","5098","5099","5100","5101","5102","5103","5104","5105","5106","5107","5108","5109","5110","5111","5112","5113","5114","5115","5116","5117","5118","5119","5120","5121","5122","5123","5124","5125","5126","5127","5128","5129","5130","5131","5132","5133","5134","5135","5136","5137","5138","5139","5140","5141","5142","5143","5144","5145","5146","5147","5148","5149","5150","5151","5152","5153","5154","5155","5156","5157","5158","5159","5160","5161","5162","5163","5164","5165","5166","5167","5168","5169","5170","5171","5172","5173","5174","5175","5176","5177","5178","5179","5180","5181","5182","5183","5184","5185","5186","5187","5188","5189","5190","5191","5192","5193","5194","5195","5196","5197","5198","5199","5200","5201","5202","5203","5204","5205","5206","5207","5208","5209","5210","5211","5212","5213","5214","5215","5216","5217","5218","5219","5220","5221","5222","5223","5224","5225","5226","5227","5228","5229","5230","5231","5232","5233","5234","5235","5236","5237","5238","5239","5240","5241","5242","5243","5244","5245","5246","5247","5248","5249","5250","5251","5252","5253","5254","5255","5256","5257","5258","5259","5260","5261","5262","5263","5264","5265","5266","5267","5268","5269","5270","5271","5272","5273","5274","5275","5276","5277","5278","5279","5280","5281","5282","5283","5284","5285","5286","5287","5288","5289","5290","5291","5292","5293","5294","5295","5296","5297","5298","5299","5300","5301","5302","5303","5304","5305","5306","5307","5308","5309","5310","5311","5312","5313","5314","5315","5316","5317","5318","5319","5320","5321","5322","5323","5324","5325","5326","5327","5328","5329","5330","5331","5332","5333","5334","5335","5336","5337","5338","5339","5340","5341","5342","5343","5344","5345","5346","5347","5348","5349","5350","5351","5352","5353","5354","5355","5356","5357","5358","5359","5360","5361","5362","5363","5364","5365","5366","5367","5368","5369","5370","5371","5372","5373","5374","5375","5376","5377","5378","5379","5380","5381","5382","5383","5384","5385","5386","5387","5388","5389","5390","5391","5392","5393","5394","5395","5396","5397","5398","5399","5400","5401","5402","5403","5404","5405","5406","5407","5408","5409","5410","5411","5412","5413","5414","5415","5416","5417","5418","5419","5420","5421","5422","5423","5424","5425","5426","5427","5428","5429","5430","5431","5432","5433","5434","5435","5436","5437","5438","5439","5440","5441","5442","5443","5444","5445","5446","5447","5448","5449","5450","5451","5452","5453","5454","5455","5456","5457","5458","5459","5460","5461","5462","5463","5464","5465","5466","5467","5468","5469","5470","5471","5472","5473","5474","5475","5476","5477","5478","5479","5480","5481","5482","5483","5484","5485","5486","5487","5488","5489","5490","5491","5492","5493","5494","5495","5496","5497","5498","5499","5500","5501","5502","5503","5504","5505","5506","5507","5508","5509","5510","5511","5512","5513","5514","5515","5516","5517","5518","5519","5520","5521","5522","5523","5524","5525","5526","5527","5528","5529","5530","5531","5532","5533","5534","5535","5536","5537","5538","5539","5540","5541","5542","5543","5544","5545","5546","5547","5548","5549","5550","5551","5552","5553","5554","5555","5556","5557","5558","5559","5560","5561","5562","5563","5564","5565","5566","5567","5568","5569","5570","5571","5572","5573","5574","5575","5576","5577","5578","5579","5580","5581","5582","5583","5584","5585","5586","5587","5588","5589","5590","5591","5592","5593","5594","5595","5596","5597","5598","5599","5600","5601","5602","5603","5604","5605","5606","5607","5608","5609","5610","5611","5612","5613","5614","5615","5616","5617","5618","5619","5620","5621","5622","5623","5624","5625","5626","5627","5628","5629","5630","5631","5632","5633","5634","5635","5636","5637","5638","5639","5640","5641","5642","5643","5644","5645","5646","5647","5648","5649","5650","5651","5652","5653","5654","5655","5656","5657","5658","5659","5660","5661","5662","5663","5664","5665","5666","5667","5668","5669","5670","5671","5672","5673","5674","5675","5676","5677","5678","5679","5680","5681","5682","5683","5684","5685","5686","5687","5688","5689","5690","5691","5692","5693","5694","5695","5696","5697","5698","5699","5700","5701","5702","5703","5704","5705","5706","5707","5708","5709","5710","5711","5712","5713","5714","5715","5716","5717","5718","5719","5720","5721","5722","5723","5724","5725","5726","5727","5728","5729","5730","5731","5732","5733","5734","5735","5736","5737","5738","5739","5740","5741","5742","5743","5744","5745","5746","5747","5748","5749","5750","5751","5752","5753","5754","5755","5756","5757","5758","5759","5760","5761","5762","5763","5764","5765","5766","5767","5768","5769","5770","5771","5772","5773","5774","5775","5776","5777","5778","5779","5780","5781","5782","5783","5784","5785","5786","5787","5788","5789","5790","5791","5792","5793","5794","5795","5796","5797","5798","5799","5800","5801","5802","5803","5804","5805","5806","5807","5808","5809","5810","5811","5812","5813","5814","5815","5816","5817","5818","5819","5820","5821","5822","5823","5824","5825","5826","5827","5828","5829","5830","5831","5832","5833","5834","5835","5836","5837","5838","5839","5840","5841","5842","5843","5844","5845","5846","5847","5848","5849","5850","5851","5852","5853","5854","5855","5856","5857","5858","5859","5860","5861","5862","5863","5864","5865","5866","5867","5868","5869","5870","5871","5872","5873","5874","5875","5876","5877","5878","5879","5880","5881","5882","5883","5884","5885","5886","5887","5888","5889","5890","5891","5892","5893","5894","5895","5896","5897","5898","5899","5900","5901","5902","5903","5904","5905","5906","5907","5908","5909","5910","5911","5912","5913","5914","5915","5916","5917","5918","5919","5920","5921","5922","5923","5924","5925","5926","5927","5928","5929","5930","5931","5932","5933","5934","5935","5936","5937","5938","5939","5940","5941","5942","5943","5944","5945","5946","5947","5948","5949","5950","5951","5952","5953","5954","5955","5956","5957","5958","5959","5960","5961","5962","5963","5964","5965","5966","5967","5968","5969","5970","5971","5972","5973","5974","5975","5976","5977","5978","5979","5980","5981","5982","5983","5984","5985","5986","5987","5988","5989","5990","5991","5992","5993","5994","5995","5996","5997","5998","5999","6000","6001","6002","6003","6004","6005","6006","6007","6008","6009","6010","6011","6012","6013","6014","6015","6016","6017","6018","6019","6020","6021","6022","6023","6024","6025","6026","6027","6028","6029","6030","6031","6032","6033","6034","6035","6036","6037","6038","6039","6040","6041","6042","6043","6044","6045","6046","6047","6048","6049","6050","6051","6052","6053","6054","6055","6056","6057","6058","6059","6060","6061","6062","6063","6064","6065","6066","6067","6068","6069","6070","6071","6072","6073","6074","6075","6076","6077","6078","6079","6080","6081","6082","6083","6084","6085","6086","6087","6088","6089","6090","6091","6092","6093","6094","6095","6096","6097","6098","6099","6100","6101","6102","6103","6104","6105","6106","6107","6108","6109","6110","6111","6112","6113","6114","6115","6116","6117","6118","6119","6120","6121","6122","6123","6124","6125","6126","6127","6128","6129","6130","6131","6132","6133","6134","6135","6136","6137","6138","6139","6140","6141","6142","6143","6144","6145","6146","6147","6148","6149","6150","6151","6152","6153","6154","6155","6156","6157","6158","6159","6160","6161","6162","6163","6164","6165","6166","6167","6168","6169","6170","6171","6172","6173","6174","6175","6176","6177","6178","6179","6180","6181","6182","6183","6184","6185","6186","6187","6188","6189","6190","6191","6192","6193","6194","6195","6196","6197","6198","6199","6200","6201","6202","6203","6204","6205","6206","6207","6208","6209","6210","6211","6212","6213","6214","6215","6216","6217","6218","6219","6220","6221","6222","6223","6224","6225","6226","6227","6228","6229","6230","6231","6232","6233","6234","6235","6236","6237","6238","6239","6240","6241","6242","6243","6244","6245","6246","6247","6248","6249","6250","6251","6252","6253","6254","6255","6256","6257","6258","6259","6260","6261","6262","6263","6264","6265","6266","6267","6268","6269","6270","6271","6272","6273","6274","6275","6276","6277","6278","6279","6280","6281","6282","6283","6284","6285","6286","6287","6288","6289","6290","6291","6292","6293","6294","6295","6296","6297","6298","6299","6300","6301","6302","6303","6304","6305","6306","6307","6308","6309","6310","6311","6312","6313","6314","6315","6316","6317","6318","6319","6320","6321","6322","6323","6324","6325","6326","6327","6328","6329","6330","6331","6332","6333","6334","6335","6336","6337","6338","6339","6340","6341","6342","6343","6344","6345","6346","6347","6348","6349","6350","6351","6352","6353","6354","6355","6356","6357","6358","6359","6360","6361","6362","6363","6364","6365","6366","6367","6368","6369","6370","6371","6372","6373","6374","6375","6376","6377","6378","6379","6380","6381","6382","6383","6384","6385","6386","6387","6388","6389","6390","6391","6392","6393","6394","6395","6396","6397","6398","6399","6400","6401","6402","6403","6404","6405","6406","6407","6408","6409","6410","6411","6412","6413","6414","6415","6416","6417","6418","6419","6420","6421","6422","6423","6424","6425","6426","6427","6428","6429","6430","6431","6432","6433","6434","6435","6436","6437","6438","6439","6440","6441","6442","6443","6444","6445","6446","6447","6448","6449","6450","6451","6452","6453","6454","6455","6456","6457","6458","6459","6460","6461","6462","6463","6464","6465","6466","6467","6468","6469","6470","6471","6472","6473","6474","6475","6476","6477","6478","6479","6480","6481","6482","6483","6484","6485","6486","6487","6488","6489","6490","6491","6492","6493","6494","6495","6496","6497","6498","6499","6500","6501","6502","6503","6504","6505","6506","6507","6508","6509","6510","6511","6512","6513","6514","6515","6516","6517","6518","6519","6520","6521","6522","6523","6524","6525","6526","6527","6528","6529","6530","6531","6532","6533","6534","6535","6536","6537","6538","6539","6540","6541","6542","6543","6544","6545","6546","6547","6548","6549","6550","6551","6552","6553","6554","6555","6556","6557","6558","6559","6560","6561","6562","6563","6564","6565","6566","6567","6568","6569","6570","6571","6572","6573","6574","6575","6576","6577","6578","6579","6580","6581","6582","6583","6584","6585","6586","6587","6588","6589","6590","6591","6592","6593","6594","6595","6596","6597","6598","6599","6600","6601","6602","6603","6604","6605","6606","6607","6608","6609","6610","6611","6612","6613","6614","6615","6616","6617","6618","6619","6620","6621","6622","6623","6624","6625","6626","6627","6628","6629","6630","6631","6632","6633","6634","6635","6636","6637","6638","6639","6640","6641","6642","6643","6644","6645","6646","6647","6648","6649","6650","6651","6652","6653","6654","6655","6656","6657","6658","6659","6660","6661","6662","6663","6664","6665","6666","6667","6668","6669","6670","6671","6672","6673","6674","6675","6676","6677","6678","6679","6680","6681","6682","6683","6684","6685","6686","6687","6688","6689","6690","6691","6692","6693","6694","6695","6696","6697","6698","6699","6700","6701","6702","6703","6704","6705","6706","6707","6708","6709","6710","6711","6712","6713","6714","6715","6716","6717","6718","6719","6720","6721","6722","6723","6724","6725","6726","6727","6728","6729","6730","6731","6732","6733","6734","6735","6736","6737","6738","6739","6740","6741","6742","6743","6744","6745","6746","6747","6748","6749","6750","6751","6752","6753","6754","6755","6756","6757","6758","6759","6760","6761","6762","6763","6764","6765","6766","6767","6768","6769","6770","6771","6772","6773","6774","6775","6776","6777","6778","6779","6780","6781","6782","6783","6784","6785","6786","6787","6788","6789","6790","6791","6792","6793","6794","6795","6796","6797","6798","6799","6800","6801","6802","6803","6804","6805","6806","6807","6808","6809","6810","6811","6812","6813","6814","6815","6816","6817","6818","6819","6820","6821","6822","6823","6824","6825","6826","6827","6828","6829","6830","6831","6832","6833","6834","6835","6836","6837","6838","6839","6840","6841","6842","6843","6844","6845","6846","6847","6848","6849","6850","6851","6852","6853","6854","6855","6856","6857","6858","6859","6860","6861","6862","6863","6864","6865","6866","6867","6868","6869","6870","6871","6872","6873","6874","6875","6876","6877","6878","6879","6880","6881","6882","6883","6884","6885","6886","6887","6888","6889","6890","6891","6892","6893","6894","6895","6896","6897","6898","6899","6900","6901","6902","6903","6904","6905","6906","6907","6908","6909","6910","6911","6912","6913","6914","6915","6916","6917","6918","6919","6920","6921","6922","6923","6924","6925","6926","6927","6928","6929","6930","6931","6932","6933","6934","6935","6936","6937","6938","6939","6940","6941","6942","6943","6944","6945","6946","6947","6948","6949","6950","6951","6952","6953","6954","6955","6956","6957","6958","6959","6960","6961","6962","6963","6964","6965","6966","6967","6968","6969","6970","6971","6972","6973","6974","6975","6976","6977","6978","6979","6980","6981","6982","6983","6984","6985","6986","6987","6988","6989","6990","6991","6992","6993","6994","6995","6996","6997","6998","6999","7000","7001","7002","7003","7004","7005","7006","7007","7008","7009","7010","7011","7012","7013","7014","7015","7016","7017","7018","7019","7020","7021","7022","7023","7024","7025","7026","7027","7028","7029","7030","7031","7032","7033","7034","7035","7036","7037","7038","7039","7040","7041","7042","7043","7044","7045","7046","7047","7048","7049","7050","7051","7052","7053","7054","7055","7056","7057","7058","7059","7060","7061","7062","7063","7064","7065","7066","7067","7068","7069","7070","7071","7072","7073","7074","7075","7076","7077","7078","7079","7080","7081","7082","7083","7084","7085","7086","7087","7088","7089","7090","7091","7092","7093","7094","7095","7096","7097","7098","7099","7100","7101","7102","7103","7104","7105","7106","7107","7108","7109","7110","7111","7112","7113","7114","7115","7116","7117","7118","7119","7120","7121","7122","7123","7124","7125","7126","7127","7128","7129","7130","7131","7132","7133","7134","7135","7136","7137","7138","7139","7140","7141","7142","7143","7144","7145","7146","7147","7148","7149","7150","7151","7152","7153","7154","7155","7156","7157","7158","7159","7160","7161","7162","7163","7164","7165","7166","7167","7168","7169","7170","7171","7172","7173","7174","7175","7176","7177","7178","7179","7180","7181","7182","7183","7184","7185","7186","7187","7188","7189","7190","7191","7192","7193","7194","7195","7196","7197","7198","7199","7200","7201","7202","7203","7204","7205","7206","7207","7208","7209","7210","7211","7212","7213","7214","7215","7216","7217","7218","7219","7220","7221","7222","7223","7224","7225","7226","7227","7228","7229","7230","7231","7232","7233","7234","7235","7236","7237","7238","7239","7240","7241","7242","7243","7244","7245","7246","7247","7248","7249","7250","7251","7252","7253","7254","7255","7256","7257","7258","7259","7260","7261","7262","7263","7264","7265","7266","7267","7268","7269","7270","7271","7272","7273","7274","7275","7276","7277","7278","7279","7280","7281","7282","7283","7284","7285","7286","7287","7288","7289","7290","7291","7292","7293","7294","7295","7296","7297","7298","7299","7300","7301","7302","7303","7304","7305","7306","7307","7308","7309","7310","7311","7312","7313","7314","7315","7316","7317","7318","7319","7320","7321","7322","7323","7324","7325","7326","7327","7328","7329","7330","7331","7332","7333","7334","7335","7336","7337","7338","7339","7340","7341","7342","7343","7344","7345","7346","7347","7348","7349","7350","7351","7352","7353","7354","7355","7356","7357","7358","7359","7360","7361","7362","7363","7364","7365","7366","7367","7368","7369","7370","7371","7372","7373","7374","7375","7376","7377","7378","7379","7380","7381","7382","7383","7384","7385","7386","7387","7388","7389","7390","7391","7392","7393","7394","7395","7396","7397","7398","7399","7400","7401","7402","7403","7404","7405","7406","7407","7408","7409","7410","7411","7412","7413","7414","7415","7416","7417","7418","7419","7420","7421","7422","7423","7424","7425","7426","7427","7428","7429","7430","7431","7432","7433","7434","7435","7436","7437","7438","7439","7440","7441","7442","7443","7444","7445","7446","7447","7448","7449","7450","7451","7452","7453","7454","7455","7456","7457","7458","7459","7460","7461","7462","7463","7464","7465","7466","7467","7468","7469","7470","7471","7472","7473","7474","7475","7476","7477","7478","7479","7480","7481","7482","7483","7484","7485","7486","7487","7488","7489","7490","7491","7492","7493","7494","7495","7496","7497","7498","7499","7500","7501","7502","7503","7504","7505","7506","7507","7508","7509","7510","7511","7512","7513","7514","7515","7516","7517","7518","7519","7520","7521","7522","7523","7524","7525","7526","7527","7528","7529","7530","7531","7532","7533","7534","7535","7536","7537","7538","7539","7540","7541","7542","7543","7544","7545","7546","7547","7548","7549","7550","7551","7552","7553","7554","7555","7556","7557","7558","7559","7560","7561","7562","7563","7564","7565","7566","7567","7568","7569","7570","7571","7572","7573","7574","7575","7576","7577","7578","7579","7580","7581","7582","7583","7584","7585","7586","7587","7588","7589","7590","7591","7592","7593","7594","7595","7596","7597","7598","7599","7600","7601","7602","7603","7604","7605","7606","7607","7608","7609","7610","7611","7612","7613","7614","7615","7616","7617","7618","7619","7620","7621","7622","7623","7624","7625","7626","7627","7628","7629","7630","7631","7632","7633","7634","7635","7636","7637","7638","7639","7640","7641","7642","7643","7644","7645","7646","7647","7648","7649","7650","7651","7652","7653","7654","7655","7656","7657","7658","7659","7660","7661","7662","7663","7664","7665","7666","7667","7668","7669","7670","7671","7672","7673","7674","7675","7676","7677","7678","7679","7680","7681","7682","7683","7684","7685","7686","7687","7688","7689","7690","7691","7692","7693","7694","7695","7696","7697","7698","7699","7700","7701","7702","7703","7704","7705","7706","7707","7708","7709","7710","7711","7712","7713","7714","7715","7716","7717","7718","7719","7720","7721","7722","7723","7724","7725","7726","7727","7728","7729","7730","7731","7732","7733","7734","7735","7736","7737","7738","7739","7740","7741","7742","7743","7744","7745","7746","7747","7748","7749","7750","7751","7752","7753","7754","7755","7756","7757","7758","7759","7760","7761","7762","7763","7764","7765","7766","7767","7768","7769","7770","7771","7772","7773","7774","7775","7776","7777","7778","7779","7780","7781","7782","7783","7784","7785","7786","7787","7788","7789","7790","7791","7792","7793","7794","7795","7796","7797","7798","7799","7800","7801","7802","7803","7804","7805","7806","7807","7808","7809","7810","7811","7812","7813","7814","7815","7816","7817","7818","7819","7820","7821","7822","7823","7824","7825","7826","7827","7828","7829","7830","7831","7832","7833","7834","7835","7836","7837","7838","7839","7840","7841","7842","7843","7844","7845","7846","7847","7848","7849","7850","7851","7852","7853","7854","7855","7856","7857","7858","7859","7860","7861","7862","7863","7864","7865","7866","7867","7868","7869","7870","7871","7872","7873","7874","7875","7876","7877","7878","7879","7880","7881","7882","7883","7884","7885","7886","7887","7888","7889","7890","7891","7892","7893","7894","7895","7896","7897","7898","7899","7900","7901","7902","7903","7904","7905","7906","7907","7908","7909","7910","7911","7912","7913","7914","7915","7916","7917","7918","7919","7920","7921","7922","7923","7924","7925","7926","7927","7928","7929","7930","7931","7932","7933","7934","7935","7936","7937","7938","7939","7940","7941","7942","7943","7944","7945","7946","7947","7948","7949","7950","7951","7952","7953","7954","7955","7956","7957","7958","7959","7960","7961","7962","7963","7964","7965","7966","7967","7968","7969","7970","7971","7972","7973","7974","7975","7976","7977","7978","7979","7980","7981","7982","7983","7984","7985","7986","7987","7988","7989","7990","7991","7992","7993","7994","7995","7996","7997","7998","7999","8000","8001","8002","8003","8004","8005","8006","8007","8008","8009","8010","8011","8012","8013","8014","8015","8016","8017","8018","8019","8020","8021","8022","8023","8024","8025","8026","8027","8028","8029","8030","8031","8032","8033","8034","8035","8036","8037","8038","8039","8040","8041","8042","8043","8044","8045","8046","8047","8048","8049","8050","8051","8052"), c("Intercept","Emissions","Altitude"))), z = structure( c( 3.332205, 2.944439, 3.401197, 3.583519, 3.737670, 3.806662, 4.317488, 4.317488, 3.931826, 3.610918, 3.526361, 4.127134, 4.49981, 4.394449, 3.367296, 3.78419, 3.988984, 3.496508, 3.044522, 3.688879, 4.094345, 4.248495, 4.234107, 3.988984, 4.174387, 4.406719, 4.60517, 4.174387, 3.806662, 3.850148, 4.025352, 3.988984, 4.234107, 4.356709, 4.158883, 3.931826, 3.970292, 4.276666, 3.806662, 3.89182, 4.276666, 4.532599, 4.584967, 4.276666, 4.615121, 4.59512, 4.820282, 4.812184, 5.01728, 3.332205, 2.564949, 2.639057, 3.258097, 4.127134, 3.496508, 4.025352, 4.49981, 4.127134, 4.290459, 3.688879, 3.663562, 4.143135, 4.025352, 4.043051, 4.553877, 4.276666, 3.688879, 3.850148, 3.367296, 4.060443, 3.496508, 3.7612, 4.158883, 4.174387, 4.26268, 4.077537, 4.290459, 4.276666, 4.094345, 3.806662, 3.610918, 3.295837, 2.70805, 3.496508, 3.091042, 3.178054, 3.135494, 3.295837, 3.931826, 4.043051, 3.970292, 4.060443, 4.204693, 3.367296, 3.135494, 3.295837, 3.258097, 2.890372, 3.044522, 2.484907, 2.944439, 2.70805, 2.772589, 3.583519, 3.091042, 3.218876, 2.772589, 2.079442, 2.772589, 2.484907, 2.639057, 3.295837, 3.465736, 3.637586, 3.332205, 2.302585, 3.332205, 3.332205, 3.218876, 3.332205, 2.302585, 3.044522, 2.995732, 2.564949, 2.639057, 2.772589, 2.397895, 2.890372, 2.772589, 2.944439, 3.258097, 3.258097, 3.555348, 3.367296, 2.772589, 3.367296, 3.135494, 3.218876, 3.526361, 3.465736, 3.465736, 3.465736, 3.295837, 2.564949, 2.833213, 3.433987, 3.496508, 2.70805, 3.332205, 3.332205, 3.091042, 3.496508, 3.496508, 3.713572, 3.332205, 2.995732, 3.218876, 2.639057, 3.258097, 3.135494, 3.218876, 3.135494, 3.433987, 3.135494, 3.284149, 2.484907, 3.303792, 2.995732, 3.367296, 3.367296, 3.295837, 2.772589, 2.833213, 3.303781, 3.301803, 3.332205, 3.332205, 3.258097, 3.367296, 3.465736, 3.303885, 3.496508, 3.555348, 3.433987, 3.286140, 3.289549, 3.305675, 3.309673, 3.307708, 3.308792, 3.312587, 3.286469, 3.289375, 3.305534, 3.309887, 3.307758, 3.308839, 3.496508, 3.295837, 2.944439, 3.135494, 3.433987, 3.465736, 3.555348, 3.555348, 3.295837, 2.639057, 3.135494, 3.091042, 3.295837, 3.258097, 3.433987, 3.286378, 3.278300, 3.28211, 3.433987, 3.555348, 3.178054, 2.890372, 2.995732, 3.663562, 3.610918, 4.304065, 3.828641, 3.555348, 2.079442, 1.94591, 2.079442, 2.564949, 2.944439, 2.995732, 2.197225, 2.833213, 2.70805, 2.197225, 3.295837, 3.044522, 2.890372, 2.833213, 2.833213, 2.944439, 2.890372, 3.178054, 3.178054, 3.332205, 3.401197, 3.583519, 3.583519, 3.367296, 3.401197, 3.663562, 3.583519, 3.610918, 3.526361, 3.610918, 3.931826, 3.78419, 4.007333, 3.433987, 2.302585, 2.639057, 2.944439, 3.091042, 3.555348, 3.367296, 3.303523, 3.218876, 3.295837, 2.564949, 2.302585, 2.995732, 3.367296, 3.433987, 3.725193, 3.526361, 3.496508, 3.637586, 3.637586, 4.007333, 3.7612, 4.077537, 3.988984, 4.007333, 3.7612, 2.890372, 2.944439, 3.178054, 3.526361, 3.713572, 3.555348, 2.944439, 3.583519, 4.219508, 4.204693, 4.077537, 4.143135, 4.304065, 3.951244, 3.934629, 3.367296, 2.833213, 3.044522, 1.94591, 3.178054, 2.197225, 2.197225, 1.94591, 3.295837, 3.78419, 3.688879, 3.931826, 3.583519, 3.135494, 3.583519, 3.555348, 2.890372, 2.944439, 3.135494, 2.70805, 3.663562, 4.189655, 4.304065, 4.65396, 4.369448, 3.896713, 3.555348, 4.110874, 4.248495, 3.927888, 3.940135, 3.967748, 3.900576, 3.974405, 3.995183, 2.944439, 3.610918, 3.332205, 3.433987, 3.78419, 3.688879, 3.555348, 3.89182, 3.850148, 3.496508, 3.912023, 3.850148, 3.433987, 3.970292, 4.189655, 4.394449, 4.488636, 4.736198, 4.077537, 3.401197, 3.912023, 3.931826, 4.304065, 4.454347, 4.442651, 4.744932, 3.806662, 3.135494, 3.7612, 3.850148, 3.526361, 3.713572, 3.496508, 2.890372, 3.526361, 4.094345, 4.204693, 4.330733, 4.394449, 4.744932, 4.077537, 3.871201, 3.970292, 4.430817, 4.615121, 4.65396, 3.931826, 4.025352, 4.234107, 3.610918, 4.118448, 3.912023, 4.189655, 4.234107, 3.970292, 4.001493, 3.917582, 4.1803, 4.166466, 4.1382, 4.12896, 4.131665, 3.969707, 3.980168, 4.202069, 4.180714, 4.219508, 4.158883, 4.158883, 3.965917, 3.930737, 4.119584, 4.141602, 4.166853, 4.133114, 4.418841, 4.727388, 4.770685, 5.17615, 5.111988, 5.075174, 3.688879, 3.295837, 3.295837, 3.555348, 4.192935, 4.035063, 4.094345, 4.574711, 4.663439, 4.276666, 3.850148, 4.094345, 4.418841, 4.564348, 4.574711, 4.663439, 3.970292, 3.044522, 4.110874, 4.110874, 3.688879, 3.663562, 4.204693, 4.418841, 4.290459, 4.442651, 4.510860, 4.574711, 4.430817, 4.127134, 3.828641, 3.806662, 3.637586, 2.639057, 3.135494, 3.367296, 3.583519, 3.367296, 3.610918, 4.26268, 4.356709, 4.290459, 4.430817, 4.330733, 3.688879, 3.367296, 3.828641, 3.7612, 3.737670, 3.871201, 3.091042, 3.135494, 3.044522, 3.433987, 3.465736, 3.583519, 3.688879, 3.526361, 3.091042, 3.218876, 3.091042, 3.044522, 3.78419, 3.912023, 3.970292, 3.931826, 2.772589, 3.433987, 3.367296, 3.555348, 3.637586, 2.564949, 3.828641, 3.931826, 3.663562, 3.044522, 3.526361, 2.944439, 3.332205, 3.465736, 3.526361, 3.78419, 3.583519, 3.713572, 3.555348, 3.091042, 3.367296, 3.135494, 3.218876, 3.637586, 3.135494, 3.713572, 3.806662, 3.433987, 2.890372, 3.332205, 3.713572, 3.912023, 3.713572, 2.302585, 3.688879, 3.7612, 3.663562, 4.143135, 4.127134, 3.912023, 3.7612, 3.850148, 3.583519, 3.828641, 3.89182, 3.988984, 3.89182, 3.988984, 3.871201, 3.526361, 3.610918, 3.610918, 3.401197, 4.025352, 3.871201, 3.828641, 3.555348, 3.610918, 3.583519, 3.555348, 3.737670, 4.025352, 3.89182, 3.850148, 4.025352, 3.970292, 4.317488, 3.931826, 3.713572, 3.496508, 3.295837, 3.496508, 3.610918, 3.610918, 3.89182, 3.367296, 3.433987, 3.091042, 2.197225, 2.079442, 3.044522, 3.258097, 3.332205, 3.218876, 2.70805, 3.496508, 3.7612, 3.496508, 3.7612, 3.78419, 3.401197, 2.564949, 3.433987, 4.234107, 3.218876, 3.637586, 3.663562, 3.988984, 3.496508, 3.806662, 3.7612, 3.465736, 2.70805, 3.218876, 3.218876, 3.135494, 3.465736, 3.663562, 3.526361, 3.465736, 3.295837, 2.890372, 2.833213, 2.890372, 3.258097, 3.091042, 3.401197, 3.367296, 2.484907, 2.833213, 3.332205, 3.583519, 3.295837, 3.044522, 3.044522, 3.367296, 2.995732, 3.496508, 3.433987, 3.401197, 3.258097, 3.7612, 3.555348, 3.526361, 3.713572, 3.828641, 3.89182, 3.871201, 3.970292, 3.78419, 3.7612, 3.610918, 4.276666, 3.433987, 2.484907, 2.944439, 3.218876, 3.367296, 4.077537, 3.688879, 3.465736, 3.433987, 3.78419, 3.135494, 2.397895, 3.7612, 3.7612, 3.465736, 3.688879, 3.737670, 3.850148, 3.737670, 4.025352, 4.060443, 3.7612, 4.343805, 4.382027, 4.174387, 3.881328, 3.806662, 3.465736, 3.637586, 3.951244, 3.737670, 3.713572, 3.433987, 4.007333, 4.219508, 4.488636, 4.248495, 4.442651, 4.488636, 4.219508, 4.553877, 4.043051, 3.332205, 3.178054, 1.609438, 2.772589, 3.218876, 1.609438, 2.197225, 3.871201, 4.127134, 3.912023, 4.025352, 3.367296, 3.135494, 3.135494, 3.258097, 2.564949, 3.295837, 3.091042, 2.302585, 3.555348, 4.510860, 4.70048, 4.85203, 4.442651, 3.688879, 3.828641, 4.174387, 4.442651, 4.644391, 4.890349, 5.01728, 4.672829, 4.488636, 4.330733, 3.044522, 3.637586, 3.871201, 4.127134, 4.189655, 3.828641, 4.094345, 4.382027, 4.204693, 4.060443, 4.290459, 4.406719, 4.26268, 4.543295, 4.65396, 4.682131, 4.543295, 4.70048, 3.988984, 3.806662, 3.912023, 4.304065, 4.521789, 4.663439, 4.75359, 4.543295, 3.871201, 3.583519, 3.583519, 3.295837, 3.663562, 4.60517, 3.78419, 3.258097, 3.555348, 4.204693, 4.174387, 4.204693, 4.532599, 4.634729, 4.276666, 3.988984, 4.290459, 4.465908, 4.672829, 4.672829, 2.890372, 4.007333, 4.143135, 3.713572, 3.583519, 4.488636, 4.394449, 4.454347, 4.060443, 4.158883, 4.406719, 4.532599, 4.564348, 4.510860, 4.454347, 4.369448, 4.406719, 4.394449, 4.624973, 4.682131, 4.454347, 4.290459, 4.248495, 4.465908, 4.025352, 4.077537, 4.356709, 4.584967, 4.718499, 4.317488, 4.75359, 4.70953, 5.023881, 4.983607, 5.099866, 3.178054, 2.302585, 3.713572, 3.367296, 4.290459, 3.258097, 4.219508, 4.615121, 4.442651, 4.418841, 4.219508, 3.688879, 4.382027, 4.356709, 4.564348, 4.795791, 4.406719, 3.828641, 4.304065, 3.951244, 4.025352, 3.465736, 4.025352, 4.406719, 4.543295, 4.442651, 4.488636, 4.521789, 4.406719, 4.158883, 4.094345, 3.806662, 3.367296, 3.218876, 2.890372, 3.433987, 3.178054, 3.610918, 3.637586, 4.077537, 4.189655, 4.077537, 4.418841, 4.174387, 3.688879, 3.526361, 2.995732, 3.433987, 2.833213, 3.135494, 2.944439, 2.890372, 3.218876, 3.465736, 2.995732, 3.044522, 3.044522, 2.70805, 3.610918, 3.637586, 3.135494, 3.465736, 3.737670, 3.332205, 3.401197, 3.258097, 2.772589, 2.564949, 3.737670, 3.663562, 3.737670, 3.688879, 3.091042, 2.890372, 3.044522, 2.70805, 3.367296, 3.091042, 2.639057, 3.135494, 3.258097, 2.890372, 3.555348, 3.610918, 2.70805, 3.258097, 3.135494, 3.367296, 3.526361, 3.7612, 3.433987, 3.218876, 3.526361, 3.401197, 2.995732, 2.302585, 3.433987, 3.688879, 3.610918, 4.127134, 3.401197, 3.367296, 3.332205, 3.401197, 3.292387, 2.995732, 2.397895, 2.564949, 2.484907, 2.639057, 3.178054, 2.890372, 3.367296, 3.218876, 2.639057, 2.639057, 2.302585, 3.135494, 3.610918, 3.332205, 3.526361, 3.663562, 2.890372, 3.332205, 2.772589, 3.367296, 3.218876, 3.465736, 3.135494, 3.637586, 3.737670, 3.332205, 4.343805, 3.663562, 3.465736, 3.044522, 3.258097, 3.044522, 3.401197, 3.295837, 3.496508, 3.135494, 2.944439, 2.995732, 2.397895, 3.401197, 2.890372, 3.218876, 3.496508, 3.433987, 2.564949, 3.044522, 3.496508, 3.258097, 3.496508, 3.828641, 3.044522, 2.70805, 3.091042, 2.890372, 3.295837, 3.044522, 3.610918, 3.713572, 3.610918, 3.610918, 3.637586, 3.044522, 2.944439, 3.135494, 2.70805, 2.772589, 3.332205, 3.465736, 3.135494, 3.264454, 2.302585, 2.302585, 2.302585, 2.397895, 2.302585, 2.70805, 3.044522, 3.258097, 2.302585, 2.302585, 2.302585, 2.302585, 2.70805, 2.833213, 2.302585, 3.044522, 3.258097, 3.044522, 3.78419, 2.70805, 3.555348, 3.610918, 3.688879, 2.995732, 3.663562, 3.091042, 3.610918, 3.637586, 3.583519, 3.89182, 3.433987, 3.332205, 3.496508, 2.302585, 2.302585, 3.258097, 3.178054, 3.713572, 3.496508, 2.484907, 3.970292, 3.367296, 3.178054, 2.302585, 2.890372, 3.218876, 3.135494, 3.610918, 3.713572, 3.178054, 3.713572, 3.637586, 4.043051, 4.290459, 4.007333, 4.158883, 4.49981, 4.094345, 3.912023, 3.258097, 3.218876, 3.218876, 3.951244, 4.094345, 3.828641, 3.332205, 3.89182, 4.382027, 4.477337, 4.510860, 4.454347, 4.553877, 4.343805, 4.26268, 3.610918, 3.496508, 3.433987, 3.663562, 3.433987, 3.332205, 2.890372, 3.178054, 3.828641, 4.025352, 3.610918, 3.610918, 3.496508, 3.433987, 3.258097, 3.850148, 3.135494, 2.833213, 2.890372, 2.197225, 3.583519, 4.430817, 4.488636, 4.75359, 3.091042, 2.890372, 3.218876, 4.204693, 4.343805, 4.60517, 4.644391, 4.976734, 4.406719, 4.430817, 4.382027, 3.091042, 3.496508, 3.583519, 4.110874, 4.174387, 4.007333, 3.951244, 4.007333, 4.060443, 4.025352, 4.094345, 3.688879, 3.988984, 4.406719, 4.65396, 4.75359, 4.532599, 4.85203, 3.401197, 4.454347, 3.433987, 4.110874, 4.574711, 4.75359, 4.49981, 4.189655, 3.828641, 3.433987, 3.988984, 3.401197, 3.871201, 4.736198, 3.951244, 3.091042, 3.737670, 3.637586, 4.077537, 4.290459, 4.532599, 4.804021, 4.356709, 3.828641, 3.7612, 4.174387, 4.317488, 4.276666, 3.218876, 3.988984, 3.850148, 3.433987, 3.713572, 4.077537, 4.26268, 4.330733, 4.356709, 4.025352, 4.248495, 4.382027, 4.382027, 4.521789, 3.555348, 3.89182, 4.174387, 3.931826, 4.442651, 4.543295, 4.795791, 4.406719, 4.317488, 4.356709, 3.465736, 3.7612, 3.78419, 4.356709, 4.477337, 4.060443, 4.663439, 4.70048, 5.075174, 5.327876, 5.081404, 2.397895, 2.70805, 4.042117, 3.637586, 4.488636, 3.496508, 3.931826, 4.49981, 4.477337, 4.043051, 3.555348, 3.988984, 4.127134, 4.204693, 4.158883, 4.477337, 4.110874, 3.988984, 3.970292, 3.912023, 3.433987, 2.397895, 3.970292, 4.077537, 3.871201, 4.317488, 2.484907, 4.477337, 4.110874, 4.369448, 4.007333, 3.912023, 3.401197, 3.295837, 3.496508, 2.833213, 3.295837, 1.386294, 3.583519, 4.043051, 4.418841, 3.828641, 4.356709, 4.465908, 3.332205, 3.637586, 3.737670, 2.772589, 2.772589, 2.944439, 2.484907, 3.199052, 2.70805, 3.044522, 3.496508, 3.526361, 2.890372, 2.639057, 2.639057, 3.091042, 3.178054, 3.178054, 3.401197, 3.828641, 3.713572, 3.044522, 2.833213, 2.944439, 3.663562, 3.713572, 2.944439, 3.258097, 2.772589, 2.302585, 3.713572, 3.526361, 2.564949, 1.791759, 2.890372, 2.833213, 2.639057, 3.496508, 3.433987, 2.944439, 3.258097, 3.091042, 3.258097, 3.178054, 3.091042, 3.465736, 3.806662, 3.7612, 3.401197, 3.178054, 2.484907, 2.302585, 3.401197, 3.951244, 4.007333, 3.401197, 3.871201, 3.401197, 3.610918, 3.737670, 4.110874, 3.178054, 3.367296, 3.135494, 2.772589, 3.367296, 3.663562, 3.713572, 3.713572, 3.713572, 3.526361, 2.833213, 2.944439, 3.526361, 3.688879, 4.025352, 3.806662, 3.610918, 3.295837, 3.417625, 3.583519, 3.713572, 3.89182, 3.78419, 3.555348, 3.637586, 3.78419, 3.871201, 3.433987, 3.713572, 3.433987, 3.367296, 3.295837, 3.496508, 3.465736, 3.637586, 3.367296, 2.302585, 3.218876, 3.044522, 2.639057, 2.772589, 2.397895, 3.526361, 3.7612, 3.610918, 3.135494, 3.526361, 3.433987, 3.663562, 3.426712, 3.430163, 3.258097, 2.944439, 3.091042, 3.044522, 3.178054, 3.401197, 3.637586, 3.806662, 3.951244, 3.970292, 3.555348, 2.944439, 3.292169, 3.135494, 2.995732, 2.833213, 3.258097, 3.496508, 3.295837, 3.295837, 2.772589, 2.302585, 2.397895, 2.70805, 3.465736, 3.178054, 3.433987, 3.258097, 2.639057, 2.197225, 3.135494, 3.367296, 3.332205, 2.564949, 2.70805, 3.178054, 3.091042, 3.289427, 3.291633, 3.367296, 3.610918, 3.828641, 3.610918, 3.332205, 3.583519, 3.806662, 3.988984, 4.025352, 3.912023, 4.189655, 3.295837, 4.043051, 4.248495, 3.806662, 2.302585, 3.218876, 3.433987, 3.258097, 4.248495, 4.304065, 3.871201, 3.871201, 3.806662, 3.178054, 2.995732, 3.465736, 4.26268, 4.382027, 4.369448, 4.077537, 4.043051, 3.912023, 4.234107, 4.204693, 4.174387, 4.127134, 4.394449, 4.26268, 3.78419, 3.367296, 2.564949, 3.401197, 3.931826, 3.970292, 2.639057, 3.091042, 3.713572, 3.970292, 4.219508, 4.204693, 4.290459, 4.26268, 4.174387, 4.59512, 3.663562, 2.772589, 2.079442, 2.397895, 3.044522, 2.079442, 2.397895, 2.484907, 3.951244, 4.043051, 4.060443, 4.077537, 3.465736, 3.218876, 3.091042, 3.663562, 3.091042, 3.367296, 3.367296, 2.890372, 3.828641, 4.369448, 4.532599, 4.60517, 4.127134, 3.401197, 3.465736, 4.143135, 4.356709, 4.634729, 4.812184, 4.454347, 4.248495, 4.290459, 3.663562, 2.772589, 3.295837, 3.828641, 4.043051, 3.850148, 3.970292, 3.988984, 4.077537, 4.060443, 4.143135, 4.49981, 4.127134, 4.025352, 4.634729, 4.553877, 4.59512, 4.394449, 4.75359, 3.931826, 3.367296, 4.158883, 4.26268, 4.248495, 4.804021, 4.624973, 4.584967, 3.78419, 3.78419, 3.89182, 3.988984, 3.912023, 3.988984, 3.258097, 2.833213, 3.401197, 3.555348, 3.433987, 4.276666, 4.382027, 4.369448, 4.465908, 3.7612, 3.258097, 3.663562, 3.7612, 3.637586, 2.833213, 3.433987, 3.401197, 3.258097, 3.401197, 3.555348, 3.951244, 4.248495, 4.430817, 4.127134, 3.951244, 3.970292, 4.025352, 3.663562, 3.258097, 3.78419, 3.433987, 3.78419, 3.688879, 4.418841, 4.248495, 4.110874, 4.189655, 4.356709, 3.663562, 3.78419, 3.688879, 3.951244, 4.465908, 4.110874, 4.521789, 4.553877, 4.997212, 4.882802, 4.718499, 3.555348, 2.564949, 2.197225, 3.091042, 3.044522, 2.197225, 3.555348, 3.871201, 3.7612, 3.258097, 2.833213, 3.688879, 3.78419, 4.043051, 4.418841, 4.564348, 3.970292, 3.871201, 4.043051, 3.555348, 3.871201, 3.433987, 3.663562, 3.258097, 3.555348, 3.555348, 3.526361, 3.637586, 4.158883, 3.850148, 3.931826, 3.737670, 3.218876, 3.044522, 3.931826, 3.828641, 3.737670, 2.833213, 2.564949, 3.637586, 4.025352, 4.382027, 4.430817, 3.129003, 2.564949, 2.833213, 3.850148, 4.127134, 4.143135, 3.931826, 2.833213, 2.833213, 3.044522, 2.833213, 3.526361, 3.044522, 2.197225, 3.091042, 3.044522, 2.079442, 2.833213, 2.564949, 3.218876, 3.218876, 3.367296, 2.079442, 3.218876, 3.367296, 4.060443, 4.304065, 3.218876, 2.079442, 2.484907, 2.079442, 2.833213, 2.484907, 2.079442, 2.079442, 2.484907, 2.079442, 2.833213, 3.367296, 3.367296, 2.833213, 3.044522, 2.772589, 3.044522, 2.995732, 3.218876, 3.496508, 4.043051, 3.713572, 2.484907, 2.484907, 1.386294, 3.044522, 3.367296, 3.496508, 3.806662, 3.218876, 3.218876, 3.713572, 3.806662, 3.610918, 2.079442, 1.386294, 2.079442, 2.484907, 2.772589, 2.995732, 3.78419, 3.871201, 4.025352, 3.688879, 3.178054, 2.772589, 3.610918, 3.713572, 4.025352, 4.219508, 4.007333, 3.951244, 3.465736, 3.178054, 3.044522, 3.496508, 3.78419, 4.330733, 3.135494, 3.401197, 3.78419, 3.871201, 3.78419, 3.688879, 3.78419, 3.583519, 3.871201, 3.688879, 3.465736, 3.688879, 2.484907, 1.386294, 2.995732, 2.484907, 2.079442, 2.079442, 2.484907, 3.332205, 3.688879, 2.995732, 2.484907, 2.995732, 3.178054, 3.688879, 3.850148, 3.850148, 2.772589, 2.079442, 3.332205, 3.465736, 3.583519, 3.688879, 3.78419, 3.688879, 3.555348, 3.970292, 3.583519, 2.772589, 2.079442, 2.484907, 3.178054, 2.995732, 3.178054, 2.079442, 2.079442, 3.178054, 2.484907, 2.079442, 2.079442, 2.079442, 2.484907, 2.079442, 2.772589, 2.995732, 2.079442, 1.386294, 2.079442, 2.079442, 2.772589, 2.079442, 2.079442, 2.484907, 2.484907, 2.772589, 3.178054, 2.772589, 3.178054, 2.772589, 2.484907, 2.995732, 3.610918, 3.332205, 3.89182, 4.043051, 3.806662, 3.806662, 2.484907, 3.89182, 3.367296, 2.079442, 2.079442, 2.079442, 2.079442, 2.484907, 3.806662, 3.806662, 3.332205, 2.484907, 3.332205, 2.484907, 2.484907, 3.828641, 3.637586, 4.060443, 4.127134, 4.060443, 4.127134, 4.060443, 4.317488, 4.369448, 4.356709, 4.356709, 4.043051, 3.806662, 2.995732, 2.564949, 2.197225, 3.044522, 3.637586, 3.526361, 2.564949, 2.079442, 3.218876, 3.401197, 3.367296, 3.496508, 4.060443, 3.737670, 3.912023, 4.204693, 3.713572, 3.647157, 3.704281, 3.708203, 3.631565, 3.594686, 3.736023, 3.688879, 3.693648, 3.69924, 3.700545, 3.638228, 3.58365, 3.218876, 3.091042, 3.258097, 3.258097, 2.197225, 2.079442, 2.197225, 2.833213, 4.043051, 4.110874, 3.663562, 2.564949, 3.258097, 2.890372, 3.555348, 3.258097, 4.418841, 4.615121, 3.951244, 3.258097, 3.951244, 3.401197, 2.833213, 3.703463, 3.703346, 3.715738, 3.67203, 3.673783, 3.583519, 2.564949, 2.079442, 3.828641, 3.737670, 3.526361, 2.079442, 3.637586, 3.737670, 3.526361, 3.526361, 3.912023, 2.833213, 3.044522, 3.737670, 3.526361, 3.737670, 4.007333, 4.077537, 4.330733, 2.079442, 3.044522, 3.637586, 2.833213, 3.367296, 3.367296, 3.688879, 3.332205, 3.688879, 3.89182, 4.143135, 4.060443, 4.615121, 4.442651, 3.951244, 3.931826, 3.7612, 4.330733, 4.564348, 4.369448, 3.091042, 4.430817, 4.043051, 3.465736, 3.555348, 3.931826, 4.204693, 4.49981, 4.532599, 4.234107, 4.382027, 4.59512, 4.634729, 4.317488, 3.663562, 4.454347, 3.656724, 3.709541, 4.113506, 4.122, 4.465908, 4.110874, 4.158883, 4.442651, 3.828641, 4.356709, 4.584967, 4.828314, 4.70048, 4.543295, 4.70953, 4.736198, 5.056246, 5.159055, 5.247024, 3.401197, 2.833213, 2.890372, 3.663562, 4.442651, 3.806662, 4.454347, 4.779123, 4.644391, 4.60517, 3.637586, 4.418841, 4.65396, 4.430817, 4.317488, 4.727388, 4.430817, 4.007333, 4.276666, 3.806662, 4.158883, 3.465736, 4.174387, 4.510860, 4.543295, 4.736198, 4.744932, 4.682131, 4.574711, 4.26268, 3.828641, 3.806662, 3.610918, 3.044522, 3.367296, 3.465736, 3.135494, 2.772589, 3.135494, 4.025352, 4.158883, 3.970292, 4.143135, 4.418841, 3.713572, 2.995732, 3.258097, 3.295837, 2.944439, 3.178054, 2.397895, 3.135494, 2.944439, 2.995732, 2.772589, 3.295837, 3.295837, 2.302585, 2.302585, 2.944439, 2.944439, 3.367296, 3.496508, 3.871201, 3.951244, 3.332205, 2.70805, 3.526361, 3.637586, 3.526361, 3.433987, 2.564949, 2.944439, 2.890372, 2.772589, 2.772589, 2.944439, 2.833213, 3.091042, 2.944439, 3.044522, 3.433987, 3.401197, 3.526361, 3.258097, 2.890372, 3.465736, 2.890372, 3.258097, 3.637586, 3.663562, 3.663562, 3.496508, 3.367296, 2.564949, 2.890372, 3.526361, 3.713572, 3.737670, 3.637586, 3.637586, 3.044522, 4.007333, 3.663562, 3.7612, 3.178054, 2.833213, 2.70805, 2.079442, 2.772589, 3.401197, 3.367296, 3.401197, 3.555348, 3.465736, 2.890372, 2.484907, 3.258097, 3.433987, 3.637586, 3.565724, 3.610918, 3.178054, 3.332205, 3.465736, 3.7612, 3.583519, 3.806662, 3.637586, 3.688879, 3.912023, 3.555348, 3.737670, 3.970292, 3.610918, 3.465736, 3.526361, 3.78419, 3.737670, 3.637586, 3.566381, 3.806662, 3.465736, 3.295837, 2.890372, 3.091042, 3.135494, 3.258097, 3.850148, 3.806662, 3.465736, 3.526361, 3.871201, 3.912023, 4.094345, 4.248495, 3.583519, 3.044522, 3.496508, 3.367296, 3.663562, 3.7612, 3.970292, 3.970292, 3.850148, 3.951244, 3.555348, 3.433987, 2.397895, 3.044522, 3.218876, 2.302585, 2.833213, 3.253905, 3.253894, 3.253967, 3.25476, 2.397895, 2.397895, 2.302585, 3.367296, 3.367296, 3.218876, 3.433987, 2.639057, 2.944439, 2.944439, 3.218876, 3.135494, 2.484907, 1.94591, 2.70805, 2.397895, 3.583519, 3.526361, 3.564797, 3.565264, 3.56604, 4.025352, 3.688879, 3.850148, 4.127134, 4.110874, 4.007333, 3.951244, 4.143135, 4.077537, 3.806662, 4.110874, 3.713572, 2.564949, 3.295837, 3.496508, 3.465736, 4.143135, 3.931826, 3.7612, 3.688879, 3.737670, 3.433987, 3.178054, 3.526361, 3.988984, 4.219508, 4.26268, 4.127134, 4.043051, 4.143135, 4.49981, 4.615121, 4.59512, 4.70048, 4.564348, 4.644391, 4.26268, 3.610918, 3.526361, 3.78419, 4.060443, 4.219508, 3.951244, 2.944439, 4.025352, 4.644391, 4.615121, 4.532599, 4.564348, 4.70953, 4.488636, 4.138728, 3.806662, 3.367296, 3.367296, 3.258097, 3.688879, 3.332205, 2.772589, 2.833213, 3.912023, 4.330733, 4.382027, 4.60517, 4.189655, 3.912023, 4.077537, 3.7612, 3.332205, 3.496508, 3.663562, 2.995732, 3.737670, 4.430817, 4.70048, 4.919981, 4.430817, 3.526361, 4.043051, 4.477337, 4.615121, 4.430817, 4.113240, 4.137309, 3.680569, 3.759989, 4.176277, 3.135494, 3.737670, 3.806662, 3.970292, 4.127134, 3.78419, 3.583519, 4.025352, 3.78419, 3.7612, 4.330733, 4.127134, 3.89182, 4.532599, 4.634729, 4.59512, 4.779123, 4.787492, 4.007333, 3.828641, 4.174387, 4.521789, 4.65396, 4.70048, 4.736198, 4.828314, 3.970292, 3.258097, 3.931826, 4.143135, 4.174387, 4.406719, 3.610918, 3.526361, 3.78419, 3.637586, 3.688879, 4.26268, 4.465908, 4.624973, 3.828641, 3.7612, 3.78419, 4.143135, 3.806662, 2.772589, 1.791759, 3.931826, 2.995732, 3.583519, 3.610918, 3.610918, 4.343805, 4.369448, 4.143135, 4.007333, 4.094345, 4.094345, 4.330733, 3.258097, 2.944439, 3.806662, 4.70048, 4.276666, 4.356709, 4.634729, 4.70953, 4.127134, 4.110874, 4.077537, 2.890372, 3.091042, 4.043051, 4.343805, 4.584967, 4.189655, 4.672829, 4.615121, 4.89784, 5.187386, 5.056246, 3.888758, 2.833213, 3.838519, 3.970292, 3.637586, 2.944439, 3.970292, 4.317488, 4.060443, 3.688879, 3.465736, 3.610918, 4.110874, 3.912023, 3.89182, 4.727388, 4.330733, 4.043051, 3.555348, 3.178054, 3.871201, 2.397895, 3.871201, 3.828641, 3.931826, 3.970292, 4.043051, 4.477337, 4.204693, 4.382027, 3.988984, 3.178054, 3.091042, 2.944439, 3.555348, 2.079442, 3.78419, 3.761848, 2.772589, 3.78419, 3.970292, 4.672829, 3.970292, 4.394449, 3.583519, 3.401197, 3.230718, 3.526361, 2.564949, 3.044522, 2.484907, 2.397895, 2.833213, 2.772589, 3.555348, 3.465736, 3.218876, 2.70805, 2.944439, 3.091042, 2.70805, 2.944439, 3.258097, 3.610918, 3.583519, 3.135494, 3.091042, 3.332205, 3.465736, 3.610918, 3.295837, 2.397895, 2.944439, 1.791759, 2.564949, 3.287627, 3.286781, 3.287919, 3.290965, 2.564949, 2.639057, 2.995732, 3.367296, 2.484907, 3.044522, 2.197225, 2.833213, 2.890372, 3.258097, 3.637586, 3.737670, 3.637586, 3.555348, 2.890372, 2.772589, 2.70805, 3.367296, 4.060443, 3.970292, 3.135494, 3.713572, 3.465736, 3.688879, 3.806662, 3.78419, 3.295837, 3.295837, 3.433987, 2.944439, 3.465736, 3.931826, 3.871201, 4.025352, 4.234107, 3.806662, 3.295837, 3.295837, 3.465736, 3.496508, 3.806662, 3.465736, 3.258097, 3.178054, 3.044522, 3.850148, 3.688879, 3.637586, 3.555348, 3.555348, 3.610918, 4.007333, 4.060443, 3.871201, 3.970292, 4.007333, 3.610918, 3.526361, 3.555348, 3.737670, 3.828641, 3.583519, 2.890372, 2.833213, 2.197225, 3.091042, 3.332205, 3.258097, 3.496508, 3.713572, 3.78419, 3.610918, 3.7612, 3.526361, 3.526361, 3.89182, 4.110874, 3.465736, 2.484907, 3.465736, 3.465736, 3.555348, 3.688879, 3.78419, 3.988984, 3.663562, 3.78419, 3.78419, 2.772589, 3.223166, 3.225338, 3.196165, 3.196797, 3.220981, 3.222532, 3.222182, 3.222923, 3.225644, 3.196357, 3.196892, 3.220655, 3.222682, 3.222163, 3.367296, 2.70805, 2.302585, 2.197225, 2.772589, 2.890372, 3.135494, 2.772589, 2.564949, 2.890372, 2.70805, 3.332205, 3.367296, 3.308143, 2.397895, 2.302585, 3.332205, 3.401197, 3.637586, 3.583519, 3.637586, 4.043051, 3.737670, 3.970292, 3.663562, 3.688879, 4.060443, 3.737670, 2.70805, 2.564949, 2.302585, 3.465736, 3.850148, 4.219508, 3.178054, 2.397895, 3.332205, 2.639057, 2.302585, 3.295837, 4.025352, 4.304065, 3.526361, 4.143135, 3.970292, 3.951244, 4.025352, 4.343805, 4.532599, 4.110874, 4.369448, 4.094345, 3.89182, 3.756664, 3.332205, 3.610918, 4.025352, 3.988984, 3.465736, 2.833213, 3.970292, 3.951244, 3.850148, 3.931826, 4.406719, 4.234107, 4.043051, 4.382027, 3.433987, 3.258097, 2.890372, 1.609438, 3.258097, 2.890372, 2.70805, 2.944439, 3.870924, 3.849606, 3.899533, 3.842846, 3.741077, 3.178054, 3.367296, 3.258097, 3.915751, 3.873959, 3.775029, 3.738807, 3.847100, 4.143135, 4.574711, 4.634729, 4.143135, 3.583519, 3.583519, 4.094345, 3.880055, 3.865061, 4.828314, 4.465908, 4.317488, 4.356709, 4.077537, 3.258097, 3.295837, 3.555348, 3.688879, 3.7612, 3.178054, 3.931826, 3.828641, 3.737670, 3.713572, 3.89182, 3.688879, 3.688879, 4.043051, 4.110874, 4.060443, 3.951244, 4.70048, 3.465736, 3.332205, 3.806662, 3.951244, 4.043051, 4.406719, 4.521789, 4.564348, 4.219508, 3.583519, 3.871201, 2.833213, 3.258097, 3.912023, 3.583519, 2.890372, 3.258097, 3.912023, 4.143135, 4.204693, 4.564348, 4.510860, 4.158883, 3.295837, 3.970292, 4.317488, 4.454347, 3.850148, 3.580848, 3.637586, 3.951244, 3.367296, 3.637586, 3.713572, 3.850148, 4.043051, 4.025352, 3.850148, 4.025352, 4.219508, 4.442651, 4.143135, 3.091042, 3.401197, 3.931826, 4.234107, 4.532599, 4.219508, 4.369448, 3.89182, 3.828641, 4.025352, 3.806662, 3.367296, 3.850148, 4.330733, 4.521789, 3.931826, 4.521789, 4.60517, 4.804021, 4.983607, 5.049856, 2.833213, 2.302585, 2.639057, 3.135494, 4.007333, 3.496508, 3.850148, 4.394449, 4.418841, 4.060443, 3.526361, 3.583519, 4.043051, 4.060443, 4.219508, 4.442651, 3.951244, 3.688879, 3.806662, 3.828641, 3.828641, 3.044522, 3.688879, 4.060443, 4.248495, 4.317488, 4.304065, 4.394449, 4.442651, 4.26268, 3.688879, 3.555348, 3.218876, 3.258097, 3.091042, 3.258097, 3.258097, 2.944439, 3.332205, 3.78419, 4.143135, 4.158883, 4.406719, 4.143135, 3.637586, 3.401197, 3.367296, 3.295837, 2.397895, 3.367296, 2.772589, 2.564949, 2.995732, 2.944439, 2.890372, 3.258097, 3.258097, 3.258097, 3.135494, 2.833213, 2.995732, 3.044522, 3.218876, 3.555348, 3.688879, 3.091042, 3.135494, 3.178054, 3.583519, 3.610918, 3.044522, 2.397895, 2.484907, 2.70805, 2.564949, 2.302585, 3.135494, 2.944439, 2.302585, 2.772589, 3.178054, 2.564949, 3.178054, 2.944439, 3.135494, 3.583519, 3.332205, 3.181502, 3.186625, 3.806662, 3.496508, 3.806662, 3.496508, 3.295837, 2.70805, 3.218876, 3.610918, 3.688879, 3.737670, 3.555348, 3.496508, 2.944439, 3.555348, 3.850148, 3.135494, 3.295837, 3.044522, 2.833213, 2.564949, 3.295837, 3.806662, 3.218876, 3.806662, 3.78419, 3.332205, 3.044522, 3.218876, 3.526361, 3.433987, 3.196074, 3.196778, 3.190419, 3.190704, 3.195836, 3.196414, 3.195706, 3.196165, 3.196935, 3.190540, 3.190599, 3.195650, 3.19648, 3.195919, 3.197265, 3.198067, 3.191567, 3.191673, 3.196778, 3.197485, 3.197097, 3.197145, 3.332205, 3.295837, 2.995732, 2.397895, 2.564949, 3.135494, 3.433987, 3.89182, 3.526361, 3.044522, 3.401197, 3.555348, 3.332205, 4.043051, 3.850148, 3.178054, 2.995732, 3.258097, 3.178054, 2.944439, 3.465736, 3.555348, 3.806662, 3.663562, 3.688879, 3.332205, 3.135494, 2.397895, 2.833213, 2.995732, 2.70805, 3.401197, 3.610918, 2.70805, 2.833213, 2.302585, 2.302585, 2.302585, 2.302585, 2.833213, 2.772589, 3.367296, 3.044522, 2.302585, 2.302585, 2.833213, 3.044522, 3.091042, 2.772589, 2.995732, 2.890372, 3.367296, 3.433987, 3.191, 3.401197, 3.806662, 4.26268, 4.110874, 3.663562, 3.912023, 3.496508, 3.688879, 3.89182, 3.637586, 3.871201, 3.526361, 3.737670, 3.044522, 2.302585, 2.772589, 2.944439, 3.526361, 3.912023, 3.78419, 2.890372, 3.970292, 3.7612, 3.496508, 3.091042, 2.944439, 3.091042, 4.189655, 3.89182, 3.806662, 3.850148, 3.850148, 4.189655, 4.234107, 4.477337, 4.615121, 3.912023, 4.369448, 3.988984, 3.555348, 3.044522, 3.178054, 2.772589, 3.637586, 4.007333, 3.663562, 3.465736, 3.970292, 4.219508, 4.543295, 4.564348, 4.672829, 4.584967, 4.406719, 4.49981, 3.737670, 3.295837, 3.135494, 3.295837, 3.135494, 3.091042, 2.772589, 2.564949, 3.663562, 3.970292, 3.526361, 4.158883, 2.564949, 3.135494, 3.091042, 3.401197, 2.772589, 3.713119, 3.691092, 3.664394, 3.678512, 3.702766, 3.70019, 4.624973, 3.806662, 2.564949, 3.737670, 4.007333, 4.060443, 4.317488, 4.762174, 4.574711, 4.248495, 4.290459, 4.094345, 2.564949, 3.332205, 3.178054, 3.850148, 4.060443, 4.025352, 3.871201, 3.912023, 3.951244, 3.713572, 3.806662, 3.637586, 3.806662, 4.382027, 4.418841, 4.317488, 4.454347, 4.442651, 3.218876, 3.218876, 3.258097, 3.737670, 4.276666, 4.158883, 4.488636, 4.143135, 3.610918, 3.332205, 3.7612, 3.258097, 3.496508, 3.715299, 3.637586, 2.70805, 3.332205, 4.26268, 4.158883, 4.204693, 4.343805, 4.65396, 4.060443, 3.931826, 4.077537, 4.488636, 4.634729, 4.70953, 3.135494, 4.276666, 4.317488, 3.583519, 3.7612, 4.248495, 4.290459, 4.465908, 4.343805, 4.343805, 4.317488, 4.488636, 4.634729, 4.770685, 3.295837, 4.60517, 4.75359, 4.060443, 4.49981, 4.795791, 4.804021, 4.49981, 4.59512, 4.394449, 4.356709, 4.26268, 4.672829, 4.624973, 4.744932, 4.418841, 4.770685, 4.770685, 5.043425, 5.164786, 5.198497, 4.26268, 1.609438, 3.830578, 3.825114, 3.840225, 3.683255, 3.7844, 3.841227, 3.697488, 3.821425, 3.686433, 3.692976, 4.682131, 4.343805, 4.70953, 4.744932, 4.26268, 4.043051, 4.394449, 3.931826, 3.988984, 3.433987, 4.234107, 4.532599, 4.634729, 4.356709, 4.49981, 4.718499, 4.532599, 4.418841, 4.110874, 3.850148, 3.583519, 2.302585, 3.135494, 3.806662, 3.583519, 2.564949, 3.7612, 4.158883, 4.465908, 4.330733, 4.406719, 4.574711, 3.7612, 3.240752, 3.713572, 3.583519, 3.091042, 3.433987, 3.258097, 3.178054, 3.295837, 3.218876, 3.583519, 3.78419, 3.828641, 3.178054, 2.995732, 3.295837, 3.135494, 3.496508, 3.806662, 3.970292, 4.007333, 3.688879, 3.044522, 3.610918, 3.7612, 3.78419, 3.465736, 2.772589, 2.484907, 2.833213, 2.70805, 2.484907, 2.772589, 2.564949, 2.639057, 2.639057, 2.890372, 3.433987, 3.401197, 3.332205, 3.367296, 3.332205, 3.496508, 3.295837, 3.295837, 3.970292, 3.951244, 3.828641, 3.583519, 3.135494, 2.890372, 2.995732, 3.583519, 4.007333, 3.970292, 3.583519, 3.688879, 3.465736, 3.526361, 3.871201, 3.931826, 3.465736, 3.433987, 3.258097, 2.944439, 3.367296, 3.637586, 3.713572, 3.806662, 3.850148, 3.555348, 3.044522, 2.079442, 2.833213, 3.496508, 3.912023, 3.806662, 3.663562, 3.465736, 3.218876, 3.688879, 3.713572, 3.610918, 3.688879, 3.713572, 3.713572, 3.951244, 3.850148, 3.850148, 3.828641, 3.806662, 3.555348, 3.526361, 3.7612, 3.637586, 3.89182, 3.555348, 3.496508, 3.637586, 3.496508, 3.258097, 3.044522, 3.367296, 3.526361, 3.688879, 3.828641, 3.433987, 3.496508, 3.583519, 3.433987, 3.269056, 3.272982, 3.262234, 3.26235, 3.266305, 3.270298, 3.268266, 3.737670, 3.806662, 3.912023, 3.737670, 3.871201, 3.555348, 3.637586, 3.135494, 3.295837, 3.044522, 2.890372, 3.135494, 3.688879, 3.828641, 3.912023, 3.258097, 2.772589, 1.609438, 3.367296, 3.78419, 3.178054, 3.583519, 3.367296, 2.772589, 2.995732, 3.555348, 3.526361, 3.254770, 3.255762, 3.258427, 3.251134, 3.251076, 3.252998, 3.256499, 3.264315, 3.265432, 3.269020, 3.258656, 3.259028, 3.262628, 3.266461, 3.264480, 3.828641, 3.637586, 3.78419, 3.637586, 3.526361, 3.931826, 3.465736, 2.772589, 2.564949, 3.091042, 3.526361, 3.89182, 3.828641, 3.295837, 2.772589, 3.258097, 3.135494, 2.772589, 3.258097, 3.806662, 4.025352, 3.688879, 3.871201, 3.713572, 3.637586, 3.988984, 4.189655, 4.143135, 4.077537, 4.043051, 3.970292, 3.970292, 3.258097, 3.178054, 3.091042, 3.688879, 3.713572, 3.295837, 2.772589, 3.526361, 4.007333, 4.025352, 3.850148, 3.970292, 4.060443, 3.828641, 3.89182, 3.465736, 3.044522, 2.70805, 2.564949, 2.944439, 2.484907, 1.791759, 2.079442, 3.367296, 3.688879, 3.637586, 3.871201, 3.332205, 3.295837, 3.178054, 3.091042, 2.772589, 2.564949, 3.044522, 2.397895, 3.555348, 4.189655, 4.406719, 4.454347, 3.912023, 3.332205, 3.433987, 3.912023, 3.815768, 4.317488, 4.382027, 4.219508, 4.025352, 4.158883, 3.555348, 2.564949, 2.772589, 3.465736, 3.931826, 3.806662, 3.7612, 3.367296, 3.828641, 3.295837, 3.367296, 4.043051, 3.89182, 3.496508, 4.317488, 4.356709, 4.488636, 4.382027, 4.343805, 3.332205, 3.433987, 3.688879, 4.043051, 4.043051, 4.077537, 4.158883, 4.110874, 1.94591, 2.079442, 3.044522, 1.386294, 3.89182, 3.89182, 3.931826, 4.110874, 4.204693, 4.204693, 4.406719, 3.89182, 3.295837, 4.025352, 3.583519, 3.850148, 3.526361, 3.713572, 4.158883, 4.204693, 4.110874, 4.127134, 4.158883, 4.189655, 3.828641, 3.583519, 3.663562, 3.218876, 1.94591, 2.564949, 4.204693, 4.49981, 4.465908, 4.394449, 4.025352, 3.610918, 3.931826, 4.219508, 4.442651, 4.564348, 4.394449, 4.043051, 3.970292, 4.356709, 3.931826, 3.970292, 3.988984, 4.304065, 4.510860, 3.828641, 4.430817, 4.70953, 4.919981, 4.912655, 4.787492, 3.135494, 2.944439, 3.135494, 3.044522, 3.78419, 3.465736, 3.828641, 4.317488, 4.521789, 4.077537, 3.178054, 3.931826, 4.110874, 4.204693, 4.204693, 4.406719, 3.89182, 3.295837, 4.025352, 3.583519, 3.850148, 3.526361, 3.713572, 4.158883, 4.204693, 4.110874, 4.127134, 4.158883, 4.189655, 3.828641, 3.583519, 3.663562, 3.218876, 1.94591, 2.564949, 3.741107, 3.792194, 3.838041, 3.787539, 3.807046, 3.610918, 3.931826, 4.219508, 3.044522, 3.218876, 3.135494, 3.221973, 3.178054, 3.091042, 3.496508, 3.091042, 2.944439, 3.091042, 3.091042, 3.135494, 3.496508, 3.7612, 3.178054, 2.70805, 3.135494, 2.302585, 2.484907, 3.295837, 3.610918, 2.564949, 2.079442, 1.791759, 2.639057, 3.223127, 2.564949, 3.044522, 1.791759, 3.89182, 3.871201, 3.78419, 3.688879, 3.496508, 3.433987, 3.465736, 3.465736, 3.433987, 3.433987, 2.197225, 2.995732, 1.098612, 1.791759, 3.401197, 3.367296, 3.295837, 3.295837, 3.295837, 3.291887, 3.292836, 3.272434, 3.275655, 3.29117, 3.292067, 3.218876, 2.944439, 2.944439, 3.401197, 2.772589, 3.290586, 3.850148, 3.850148, 3.496508, 3.367296, 3.295837, 3.044522, 3.401197, 3.555348, 3.526361, 3.496508, 3.663562, 3.610918, 3.465736, 3.465736, 3.332205, 3.135494, 3.806662, 3.610918, 3.465736, 3.401197, 3.610918, 3.637586, 3.931826, 4.007333, 3.951244, 3.828641, 3.970292, 4.060443, 4.189655, 4.204693, 3.555348, 3.465736, 2.772589, 2.995732, 3.044522, 3.304294, 3.688879, 3.465736, 2.890372, 2.944439, 2.564949, 1.94591, 2.302585, 3.044522, 2.70805, 3.091042, 3.135494, 2.639057, 2.890372, 3.258097, 3.737670, 3.555348, 3.806662, 3.295837, 2.833213, 3.258097, 3.091042, 2.995732, 3.218876, 3.496508, 3.465736, 3.496508, 3.465736, 3.433987, 3.367296, 3.433987, 3.135494, 2.995732, 3.135494, 3.465736, 3.610918, 3.258097, 3.135494, 3.044522, 2.772589, 2.302585, 2.944439, 2.944439, 2.944439, 3.178054, 3.295837, 2.197225, 2.70805, 2.995732, 3.091042, 3.258097, 3.044522, 2.833213, 3.044522, 3.135494, 3.091042, 3.332205, 3.295837, 3.258097, 3.258097, 2.833213, 2.833213, 2.944439, 3.295837, 3.218876, 3.295837, 3.091042, 2.833213, 3.044522, 3.555348, 3.688879, 2.890372, 2.639057, 3.044522, 2.639057, 3.295837, 3.555348, 3.135494, 2.995732, 3.044522, 2.564949, 2.397895, 2.302585, 3.258097, 3.295837, 3.332205, 3.178054, 3.433987, 3.433987, 3.610918, 3.912023, 4.189655, 3.931826, 4.025352, 4.127134, 3.713572, 3.555348, 3.295837, 3.218876, 3.091042, 3.871201, 3.433987, 4.330733, 3.332205, 3.828641, 4.317488, 4.110874, 3.988984, 4.007333, 4.077537, 4.356709, 4.189655, 3.637586, 2.995732, 2.944439, 2.197225, 2.944439, 2.397895, 2.302585, 1.386294, 2.772589, 4.025352, 3.135494, 3.526361, 2.302585, 2.079442, 3.178054, 3.258097, 2.890372, 2.890372, 2.944439, 1.386294, 3.583519, 4.442651, 4.663439, 4.60517, 4.025352, 3.135494, 3.496508, 3.931826, 4.204693, 4.488636, 4.672829, 4.454347, 4.158883, 4.442651, 4.158883, 2.639057, 3.465736, 3.610918, 4.025352, 3.806662, 3.688879, 3.78419, 4.110874, 3.871201, 3.931826, 3.7612, 4.025352, 4.060443, 4.304065, 4.442651, 4.644391, 4.330733, 4.330733, 3.526361, 3.295837, 3.7612, 3.970292, 4.394449, 4.615121, 4.304065, 3.555348, 3.332205, 2.944439, 3.044522, 3.218876, 3.496508, 4.248495, 2.995732, 2.484907, 2.772589, 3.135494, 2.772589, 3.7612, 4.382027, 3.713572, 3.595138, 3.044522, 3.178054, 3.89182, 3.610918, 3.688879, 3.511623, 3.401197, 3.367296, 3.178054, 3.044522, 2.564949, 3.78419, 4.158883, 4.330733, 4.007333, 3.610918, 4.248495, 3.951244, 3.178054, 2.944439, 3.178054, 2.944439, 3.295837, 3.931826, 3.7612, 3.465736, 3.688879, 3.78419, 2.772589, 2.995732, 3.367296, 3.332205, 3.663562, 3.044522, 3.295837, 3.912023, 3.713572, 4.60517, 5.056246, 4.934474, 3.465736, 2.772589, 2.772589, 2.890372, 3.401197, 3.178054, 3.871201, 4.174387, 3.7612, 4.234107, 3.091042, 3.610918, 3.828641, 2.833213, 3.178054, 4.442651, 4.394449, 4.077537, 2.890372, 3.178054, 3.828641, 3.526361, 3.713572, 4.077537, 4.356709, 3.951244, 3.912023, 3.295837, 4.043051, 3.78419, 4.025352, 3.433987, 3.367296, 1.609438, 2.397895, 2.833213, 3.332205, 2.639057, 2.833213, 3.737670, 3.871201, 3.465736, 3.931826, 4.356709, 2.890372, 2.772589, 3.295837, 2.890372, 2.484907, 3.044522, 2.302585, 2.772589, 1.94591, 2.639057, 2.944439, 3.044522, 3.367296, 2.639057, 2.944439, 3.367296, 3.332205, 2.995732, 3.555348, 3.912023, 3.828641, 3.496508, 2.484907, 3.135494, 3.367296, 3.737670, 3.091042, 2.484907, 3.135494, 2.397895, 1.94591, 1.94591, 2.484907, 2.70805, 2.197225, 2.397895, 2.70805, 2.944439, 2.995732, 3.044522, 2.70805, 2.302585, 3.433987, 1.94591, 3.135494, 3.465736, 3.526361, 3.610918, 3.218876, 3.332205, 2.397895, 2.995732, 3.401197, 3.970292, 3.7612, 3.433987, 3.433987, 3.496508, 3.713572, 4.007333, 3.185803, 3.188197, 3.192456, 3.140928, 3.125156, 3.183348, 3.367296, 3.135494, 3.295837, 3.496508, 3.401197, 2.564949, 2.397895, 2.890372, 2.70805, 3.555348, 3.367296, 2.890372, 2.833213, 2.890372, 3.663562, 4.007333, 3.555348, 3.295837, 3.7612, 3.367296, 3.526361, 3.737670, 4.060443, 3.970292, 3.7612, 3.465736, 3.332205, 3.496508, 3.610918, 3.663562, 3.433987, 2.772589, 2.70805, 2.484907, 2.197225, 2.70805, 4.025352, 3.091042, 3.228010, 3.367296, 3.295837, 3.367296, 3.496508, 3.367296, 3.637586, 3.828641, 3.401197, 2.397895, 3.044522, 3.295837, 3.610918, 3.7612, 3.871201, 3.78419, 3.931826, 3.713572, 3.091042, 3.258097, 3.610918, 2.833213, 3.663562, 3.295837, 3.583519, 3.7612, 3.177751, 3.179092, 3.183318, 2.302585, 2.079442, 2.833213, 2.944439, 3.332205, 3.044522, 3.295837, 2.197225, 2.484907, 2.564949, 3.332205, 3.637586, 2.995732, 1.94591, 2.890372, 3.091042, 3.218876, 3.688879, 3.496508, 3.89182, 3.496508, 3.688879, 3.091042, 3.713572, 3.526361, 3.555348, 3.78419, 3.951244, 4.189655, 4.110874, 3.850148, 3.89182, 3.433987, 2.564949, 2.397895, 2.772589, 3.135494, 3.931826, 3.828641, 3.367296, 2.772589, 3.044522, 2.397895, 1.94591, 2.944439, 3.555348, 4.025352, 4.127134, 3.931826, 3.970292, 4.025352, 4.204693, 4.304065, 4.532599, 4.60517, 4.442651, 4.418841, 4.158883, 3.178054, 3.332205, 3.465736, 2.944439, 3.583519, 2.772589, 2.079442, 3.651187, 4.174387, 3.401197, 3.367296, 4.025352, 4.007333, 4.127134, 4.521789, 3.465736, 1.94591, 3.295837, 1.94591, 3.647697, 3.612128, 1.94591, 3.652531, 2.944439, 3.433987, 3.218876, 4.060443, 3.713572, 2.890372, 2.639057, 2.639057, 3.295837, 3.608928, 2.944439, 2.079442, 3.637586, 3.828641, 4.025352, 4.49981, 3.951244, 2.397895, 3.433987, 3.7612, 3.465736, 3.433987, 4.60517, 4.174387, 3.7612, 3.367296, 2.995732, 3.562601, 2.564949, 2.197225, 2.079442, 2.639057, 2.079442, 2.564949, 1.94591, 2.484907, 1.94591, 2.397895, 3.549905, 1.94591, 2.995732, 2.639057, 3.295837, 3.637586, 4.488636, 3.218876, 2.484907, 2.079442, 2.70805, 3.295837, 3.178054, 3.295837, 4.49981, 3.583519, 2.564949, 2.890372, 3.044522, 3.465736, 3.713572, 4.158883, 3.135494, 3.828641, 4.330733, 4.343805, 4.682131, 4.691348, 4.804021, 4.532599, 4.110874, 4.007333, 4.394449, 4.624973, 4.564348, 4.007333, 3.871201, 4.234107, 3.970292, 3.258097, 4.025352, 4.234107, 4.418841, 4.276666, 4.127134, 4.248495, 4.718499, 4.584967, 4.394449, 3.806662, 3.951244, 4.043051, 4.234107, 4.234107, 4.543295, 4.941642, 4.488636, 4.369448, 4.584967, 4.234107, 4.158883, 4.094345, 4.584967, 4.584967, 3.970292, 4.744932, 4.955827, 5.111988, 5.17615, 4.997212, 3.610918, 3.555348, 3.496508, 3.583519, 3.970292, 3.044522, 4.290459, 4.356709, 4.584967, 4.276666, 3.828641, 4.330733, 4.418841, 4.682131, 4.553877, 4.682131, 4.043051, 3.555348, 4.189655, 4.043051, 3.912023, 3.526361, 4.077537, 4.356709, 4.394449, 4.442651, 4.430817, 4.394449, 4.290459, 4.454347, 3.988984, 3.806662, 3.258097, 2.772589, 3.295837, 2.944439, 3.218876, 3.218876, 3.737670, 4.290459, 4.442651, 4.26268, 4.574711, 4.584967, 3.401197, 3.526361, 3.401197, 3.555348, 3.637586, 3.610918, 3.713572, 2.890372, 3.258097, 3.044522, 3.218876, 3.526361, 3.871201, 3.52103, 3.458688, 3.437908, 3.500061, 3.258097, 3.931826, 4.094345, 4.043051, 3.332205, 2.772589, 3.332205, 3.7612, 3.871201, 3.7612, 3.091042, 3.218876, 3.583519, 3.295837, 2.639057, 2.70805, 2.564949, 3.332205, 3.258097, 3.091042, 3.332205, 3.433987, 3.610918, 3.526361, 3.433987, 3.526361, 3.465736, 3.401197, 3.828641, 3.850148, 3.465736, 3.496508, 3.401197, 2.639057, 3.218876, 3.912023, 4.094345, 3.637586, 3.401197, 3.806662, 3.526361, 3.951244, 3.78419, 3.516967, 3.520732, 3.526361, 3.850148, 3.332205, 3.510073, 3.523839, 3.517038, 3.520672, 3.531471, 3.467898, 3.446816, 3.510123, 3.523782, 3.295837, 4.158883, 3.828641, 3.737670, 2.890372, 3.258097, 3.610918, 3.737670, 3.828641, 3.737670, 3.433987, 3.688879, 3.931826, 3.828641, 3.7612, 4.143135, 3.610918, 3.258097, 3.637586, 3.912023, 3.713572, 4.127134, 3.610918, 2.890372, 3.526361, 3.295837, 2.639057, 2.944439, 2.890372, 3.526361, 3.7612, 3.688879, 3.295837, 3.610918, 3.713572, 3.737670, 4.077537, 4.110874, 3.465736, 2.890372, 3.465736, 3.258097, 3.367296, 3.496508, 3.89182, 4.077537, 4.043051, 3.871201, 3.688879, 3.401197, 2.944439, 3.218876, 2.772589, 3.044522, 3.663562, 3.806662, 3.401197, 3.178054, 2.564949, 2.079442, 2.302585, 3.044522, 3.465736, 3.465736, 3.713572, 3.526361, 2.639057, 2.564949, 3.401197, 3.465736, 3.258097, 2.70805, 2.772589, 3.218876, 3.332205, 3.218876, 3.583519, 3.637586, 3.89182, 3.713572, 3.89182, 3.496508, 3.988984, 4.007333, 4.189655, 4.369448, 4.094345, 4.330733, 4.26268, 4.406719, 4.189655, 3.78419, 2.944439, 3.295837, 3.828641, 4.26268, 4.382027, 4.077537, 3.850148, 3.688879, 3.688879, 2.944439, 2.302585, 3.737670, 4.060443, 4.127134, 4.248495, 3.988984, 4.143135, 4.248495, 4.70953, 4.779123, 4.804021, 4.882802, 4.49981, 4.204693, 4.025352, 3.433987, 3.433987, 3.78419, 4.110874, 3.828641, 3.828641, 3.465736, 4.143135, 4.127134, 4.290459, 4.276666, 4.406719, 4.532599, 4.795791, 4.962845, 4.304065, 3.555348, 3.367296, 3.258097, 3.610918, 3.295837, 2.995732, 3.89182, 4.143135, 4.204693, 4.189655, 4.204693, 2.995732, 3.583519, 3.583519, 3.737670, 3.178054, 3.044522, 3.044522, 2.302585, 4.110874, 4.65396, 4.962845, 4.488636, 4.110874, 3.433987, 3.89182, 4.158883, 4.304065, 4.770685, 4.85203, 4.553877, 4.382027, 4.59512, 4.234107, 3.044522, 3.465736, 3.688879, 3.912023, 4.007333, 3.637586, 4.007333, 4.094345, 4.164883, 4.168201, 4.26268, 4.304065, 4.060443, 4.219508, 4.290459, 4.234107, 4.189655, 4.26268, 3.218876, 3.332205, 4.025352, 4.127134, 4.330733, 4.615121, 4.718499, 4.369448, 3.044522, 3.663562, 3.931826, 2.484907, 3.713572, 4.060443, 3.178054, 3.178054, 3.583519, 3.988984, 3.988984, 3.951244, 4.060443, 4.532599, 3.637586, 3.663562, 3.828641, 4.204693, 4.488636, 4.49981, 3.768402, 3.844261, 4.127134, 3.737670, 3.044522, 3.555348, 3.988984, 4.356709, 3.970292, 4.110874, 3.988984, 4.488636, 4.290459, 4.691348, 4.26268, 4.418841, 4.204693, 4.158883, 4.234107, 4.127134, 3.912023, 3.465736, 3.555348, 4.174387, 3.332205, 4.356709, 4.779123, 4.804021, 4.394449, 3.610918, 4.488636, 3.806662, 5.187386, 5.023881, 4.867534, 3.713572, 3.135494, 2.484907, 3.367296, 3.401197, 3.526361, 3.931826, 4.317488, 4.521789, 3.828641, 3.465736, 3.871201, 4.553877, 4.49981, 4.564348, 4.644391, 4.060443, 3.295837, 4.025352, 3.135494, 4.007333, 3.737670, 4.043051, 4.248495, 3.912023, 4.369448, 4.70048, 4.736198, 4.394449, 3.850148, 3.401197, 3.295837, 3.367296, 2.397895, 3.135494, 3.258097, 3.367296, 2.995732, 3.401197, 3.89182, 4.330733, 4.127134, 4.290459, 3.988984, 3.401197, 3.135494, 2.944439, 3.367296, 3.367296, 3.610918, 2.833213, 2.70805, 2.944439, 3.044522, 3.135494, 3.332205, 3.663562, 3.178054, 2.890372, 3.091042, 2.944439, 3.178054, 3.583519, 3.610918, 3.871201, 3.332205, 2.302585, 3.135494, 3.044522, 3.218876, 3.135494, 2.772589, 3.433987, 3.401197, 3.526361, 3.332205, 3.433987, 3.401197, 3.78419, 3.258097, 3.465736, 3.433987, 3.367296, 3.610918, 3.135494, 3.367296, 3.555348, 3.178054, 3.401197, 3.496508, 3.737670, 3.465736, 3.401197, 3.178054, 2.995732, 3.044522, 3.806662, 3.828641, 3.367296, 3.433987, 3.555348, 3.367296, 3.871201, 4.025352, 4.110874, 3.951244, 3.688879, 3.737670, 3.555348, 3.583519, 3.713572, 3.806662, 3.806662, 3.850148, 3.828641, 3.433987, 3.465736, 3.610918, 3.044522, 3.737670, 3.637586, 3.526361, 2.772589, 3.465736, 3.332205, 3.688879, 3.78419, 3.871201, 3.871201, 3.496508, 3.89182, 3.828641, 4.26268, 3.970292, 3.218876, 4.248495, 3.295837, 3.433987, 3.737670, 3.255249, 3.526361, 3.465736, 3.218876, 2.944439, 2.397895, 2.70805, 3.135494, 3.044522, 3.332205, 3.178054, 2.944439, 3.218876, 3.465736, 3.555348, 3.931826, 3.988984, 3.258097, 2.639057, 3.526361, 3.433987, 3.332205, 3.555348, 3.583519, 3.713572, 3.332205, 3.526361, 3.526361, 3.688879, 3.178054, 3.218876, 3.178054, 3.044522, 3.496508, 3.688879, 3.7612, 3.583519, 3.218876, 2.772589, 2.772589, 3.135494, 2.995732, 3.135494, 3.433987, 3.258097, 2.70805, 2.833213, 3.295837, 3.332205, 3.258097, 3.135494, 2.944439, 3.178054, 3.178054, 3.332205, 2.995732, 3.332205, 3.713572, 3.806662, 3.828641, 3.583519, 3.637586, 3.828641, 3.871201, 4.025352, 3.912023, 3.970292, 3.610918, 4.043051, 3.988984, 3.401197, 1.94591, 2.890372, 3.258097, 3.332205, 3.828641, 3.583519, 3.295837, 3.688879, 3.135494, 2.944439, 2.639057, 3.465736, 3.583519, 3.258097, 3.688879, 3.688879, 3.610918, 3.688879, 3.850148, 3.970292, 3.78419, 3.912023, 3.988984, 3.988984, 3.496508, 3.78419, 3.433987, 3.555348, 4.007333, 3.806662, 3.583519, 3.258097, 4.143135, 4.330733, 3.806662, 4.043051, 4.330733, 4.343805, 4.143135, 4.094345, 3.737670, 3.970292, 3.135494, 2.484907, 3.044522, 2.944439, 1.386294, 2.890372, 3.496508, 4.369448, 4.330733, 3.871201, 3.178054, 3.295837, 3.044522, 3.367296, 2.995732, 3.583519, 3.401197, 2.397895, 3.850148, 4.189655, 4.553877, 4.356709, 4.234107, 3.526361, 3.713572, 4.158883, 4.343805, 4.510860, 4.85203, 4.844187, 4.615121, 4.442651, 4.343805, 2.397895, 3.526361, 3.610918, 4.110874, 3.912023, 3.806662, 4.219508, 4.330733, 4.26268, 4.127134, 4.442651, 4.488636, 4.465908, 4.65396, 4.49981, 4.59512, 4.477337, 4.564348, 3.912023, 3.178054, 3.871201, 4.248495, 4.465908, 4.672829, 4.727388, 4.49981, 2.772589, 3.610918, 3.526361, 3.806662, 4.094345, 4.26268, 2.833213, 3.135494, 3.044522, 3.367296, 3.555348, 4.189655, 4.430817, 4.672829, 3.295837, 4.564348, 3.561574, 4.26268, 4.828314, 3.48955, 2.079442, 3.555348, 4.744932, 3.564588, 4.290459, 3.850148, 4.564348, 3.496595, 3.548638, 3.564719, 4.418841, 3.737670, 3.89182, 3.912023, 3.871201, 3.78419, 3.663562, 3.806662, 3.871201, 4.127134, 4.290459, 4.189655, 4.158883, 3.951244, 4.060443, 3.78419, 3.7612, 4.356709, 4.442651, 4.317488, 4.691348, 4.49981, 4.682131, 5.141664, 4.844187, 3.258097, 3.091042, 3.589379, 3.571189, 3.597471, 3.450082, 3.536092, 3.598123, 3.44766, 3.583999, 3.414118, 3.487379, 4.094345, 3.688879, 4.025352, 4.787492, 4.127134, 3.89182, 3.367296, 3.401197, 3.78419, 3.496508, 3.688879, 4.143135, 3.828641, 3.912023, 3.912023, 4.204693, 4.290459, 4.418841, 3.951244, 3.688879, 3.401197, 3.258097, 3.433987, 2.995732, 3.367296, 2.564949, 2.995732, 3.737670, 4.143135, 4.025352, 3.850148, 4.418841, 3.610918, 3.367296, 3.11274, 3.433987, 2.079442, 2.484907, 2.564949, 2.772589, 2.639057, 1.94591, 3.401197, 3.583519, 3.091042, 2.639057, 2.639057, 3.178054, 2.564949, 2.995732, 3.135494, 3.663562, 3.610918, 1.609438, 2.890372, 3.332205, 3.610918, 3.806662, 2.995732, 2.484907, 3.178054, 2.772589, 2.564949, 2.484907, 2.484907, 2.639057, 2.197225, 2.772589, 2.639057, 3.295837, 3.496508, 3.218876, 3.091042, 2.944439, 3.433987, 3.178054, 3.610918, 3.850148, 3.988984, 4.025352, 3.850148, 3.526361, 2.833213, 2.833213, 3.610918, 4.077537, 3.806662, 3.555348, 4.094345, 3.7612, 3.828641, 3.988984, 3.970292, 3.044522, 2.484907, 3.178054, 3.135494, 3.091042, 3.295837, 3.332205, 3.433987, 2.70805, 3.465736, 2.772589, 2.079442, 2.890372, 2.944439, 3.217781, 3.221373, 3.198925, 3.200618, 3.215071, 3.218874, 3.216458, 3.217708, 3.221502, 3.19917, 3.200445, 3.214734, 3.219054, 3.216846, 3.223685, 3.227759, 3.465736, 2.397895, 3.713572, 3.637586, 3.89182, 3.583519, 1.94591, 2.944439, 2.944439, 2.944439, 2.70805, 1.791759, 3.295837, 3.610918, 3.555348, 3.258097, 3.332205, 3.663562, 3.401197, 3.806662, 3.951244, 2.833213, 2.995732, 3.178054, 3.465736, 3.295837, 3.610918, 3.951244, 3.850148, 3.806662, 3.688879, 3.367296, 3.091042, 3.044522, 3.258097, 2.944439, 1.386294, 3.465736, 3.200652, 3.496508, 3.465736, 2.944439, 2.397895, 2.484907, 2.890372, 3.178054, 2.995732, 3.178054, 3.332205, 1.386294, 2.772589, 3.135494, 2.890372, 3.465736, 2.564949, 2.639057, 3.433987, 3.583519, 3.912023, 3.970292, 2.302585, 2.484907, 3.401197, 3.555348, 3.367296, 3.688879, 3.555348, 3.610918, 3.219835, 3.223369, 4.025352, 4.060443, 3.7612, 4.465908, 4.110874, 2.564949, 2.397895, 3.044522, 3.295837, 4.043051, 3.89182, 3.78419, 3.367296, 2.564949, 2.302585, 1.94591, 3.044522, 3.806662, 4.143135, 4.174387, 3.951244, 3.970292, 3.850148, 4.060443, 4.234107, 4.521789, 4.219508, 4.369448, 4.174387, 3.912023, 2.944439, 3.258097, 3.258097, 3.850148, 3.78419, 3.295837, 2.079442, 3.433987, 3.871201, 3.367296, 3.688879, 4.418841, 4.110874, 3.828641, 3.970292, 3.465736, 3.044522, 2.70805, 1.386294, 2.564949, 1.609438, 2.302585, 2.484907, 3.555348, 3.7612, 3.663562, 4.007333, 3.295837, 2.397895, 3.044522, 3.218876, 3.332205, 1.386294, 2.995732, 2.197225, 3.135494, 3.555348, 4.025352, 4.234107, 3.988984, 1.386294, 2.397895, 3.583519, 3.465736, 4.043051, 4.60517, 4.094345, 3.931826, 3.850148, 3.555348, 1.386294, 2.890372, 3.044522, 3.135494, 3.555348, 3.401197, 3.713572, 3.465736, 2.397895, 3.295837, 3.737670, 3.526361, 3.367296, 3.555348, 3.912023, 3.970292, 4.025352, 4.418841, 3.367296, 2.890372, 3.713572, 3.496508, 3.806662, 4.290459, 4.060443, 4.727388, 3.496508, 3.044522, 3.78419, 3.465736, 3.258097, 3.367296, 3.871201, 3.044522, 3.583519, 4.158883, 4.077537, 3.951244, 4.219508, 3.871201, 3.401197, 3.7612, 4.143135, 3.492916, 4.025352, 3.610918, 2.995732, 3.871201, 3.528668, 3.380925, 3.525542, 3.522050, 3.465736, 3.526361, 3.218876, 3.258097, 3.258097, 3.401197, 3.367296, 3.713572, 3.433987, 3.89182, 4.248495, 3.828641, 3.295837, 3.401197, 3.135494, 3.135494, 3.401197, 3.555348, 3.401197, 3.526361, 3.513557, 3.951244, 4.304065, 4.290459, 4.060443, 4.077537, 4.615121, 4.727388, 4.65396, 3.465736, 2.564949, 2.397895, 3.688879, 4.077537, 3.295837, 3.828641, 4.110874, 4.025352, 4.158883, 3.688879, 3.637586, 4.060443, 3.688879, 3.713572, 4.442651, 4.219508, 3.427826, 3.419914, 3.381604, 3.570578, 3.413528, 3.417694, 3.462911, 3.391791, 3.384614, 3.78419, 3.931826, 4.060443, 3.688879, 3.258097, 3.465736, 3.218876, 2.833213, 2.564949, 3.091042, 3.367296, 3.178054, 3.465736, 3.090464, 3.250778, 3.737670, 3.931826, 3.688879, 3.465736, 2.639057, 3.044522, 3.332205, 3.135494, 3.044522, 1.94591, 1.94591, 2.484907, 2.772589, 2.833213, 2.639057, 2.302585, 2.079442, 1.94591, 2.639057, 2.890372, 2.564949, 2.833213, 2.995732, 3.433987, 3.178054, 2.397895, 1.94591, 2.944439, 2.890372, 2.302585, 2.197225, 2.639057, 2.397895, 2.484907, 2.484907, 2.484907, 2.302585, 2.70805, 2.564949, 3.091042, 3.091042, 3.044522, 3.295837, 3.091042, 2.397895, 2.944439, 2.995732, 2.995732, 2.944439, 2.890372, 2.944439, 3.332205, 2.833213, 2.639057, 2.772589, 3.091042, 2.944439, 3.135494, 3.218876, 2.890372, 2.564949, 3.258097, 3.295837, 3.258097, 2.639057, 2.197225, 2.890372, 2.484907, 2.639057, 2.833213, 3.091042, 2.564949, 3.044522, 3.135494, 2.484907, 2.302585, 2.772589, 3.135494, 3.258097, 3.295837, 3.465736, 3.178054, 3.258097, 2.772589, 3.044522, 3.135494, 3.367296, 3.218876, 3.433987, 3.091042, 3.295837, 3.496508, 3.465736, 3.367296, 2.833213, 2.70805, 3.135494, 3.178054, 3.044522, 2.995732, 2.995732, 3.218876, 2.772589, 2.302585, 2.484907, 2.639057, 2.833213, 3.091042, 3.044522, 2.772589, 2.70805, 2.944439, 3.091042, 3.401197, 3.555348, 3.332205, 2.079442, 2.772589, 3.135494, 3.044522, 3.044522, 3.258097, 3.401197, 3.465736, 3.583519, 3.135494, 3.496508, 2.772589, 2.772589, 3.295837, 2.944439, 2.079442, 3.073006, 3.258097, 2.833213, 3.044522, 2.197225, 1.94591, 2.079442, 2.484907, 2.833213, 2.772589, 3.135494, 2.079442, 1.94591, 2.079442, 1.94591, 2.197225, 2.079442, 2.302585, 2.772589, 2.890372, 2.397895, 2.833213, 3.258097, 3.332205, 3.218876, 3.258097, 3.332205, 3.295837, 3.044522, 3.367296, 3.583519, 3.806662, 3.610918, 3.367296, 2.995732, 3.178054, 2.70805, 2.079442, 1.94591, 2.944439, 2.197225, 3.135494, 2.484907, 3.218876, 2.833213, 3.135494, 2.564949, 2.484907, 2.397895, 2.70805, 2.944439, 3.258097, 3.332205, 3.295837, 3.258097, 3.555348, 3.583519, 3.295837, 3.258097, 3.401197, 3.555348, 3.295837, 2.484907, 1.94591, 3.258097, 3.367296, 3.912023, 2.944439, 3.178054, 3.555348, 4.394449, 4.007333, 3.89182, 3.970292, 3.610918, 3.401197, 3.688879, 3.496508, 2.833213, 3.044522, 3.466439, 3.135494, 3.35331, 3.548311, 3.509696, 3.383648, 3.369603, 3.610918, 3.555348, 3.332205, 2.890372, 3.332205, 3.258097, 2.833213, 2.397895, 3.401197, 3.044522, 3.465736, 3.89182, 3.871201, 3.583519, 3.713572, 3.951244, 3.663562, 4.060443, 3.89182, 3.89182, 4.718499, 4.418841, 4.406719, 4.290459, 3.89182, 3.135494, 3.135494, 2.833213, 3.496508, 3.526361, 2.833213, 3.258097, 2.772589, 3.295837, 2.484907, 3.610918, 3.951244, 3.663562, 3.828641, 4.189655, 4.158883, 4.454347, 4.276666, 3.713572, 3.637586, 3.555348, 4.043051, 3.546148, 3.7612, 3.931826, 4.189655, 2.484907, 2.484907, 2.944439, 2.772589, 3.713572, 4.025352, 3.931826, 3.401197, 3.218876, 3.044522, 3.044522, 3.178054, 3.044522, 3.401197, 2.944439, 2.484907, 2.772589, 3.135494, 2.564949, 2.944439, 3.555348, 3.135494, 2.302585, 3.218876, 2.302585, 2.639057, 2.564949, 3.044522, 2.944439, 2.70805, 2.079442, 2.397895, 2.944439, 2.772589, 2.944439, 2.564949, 3.802986, 3.931826, 4.234107, 3.637586, 3.89182, 3.044522, 3.135494, 3.555348, 3.295837, 3.401197, 3.951244, 4.127134, 4.418841, 3.78419, 4.094345, 4.174387, 4.26268, 4.59512, 4.70048, 3.850148, 3.044522, 2.772589, 3.091042, 3.295837, 3.091042, 3.89182, 4.394449, 3.713572, 3.737670, 3.555348, 3.637586, 3.951244, 3.7612, 3.89182, 4.430817, 4.060443, 2.995732, 2.995732, 2.944439, 3.663562, 3.663562, 3.846878, 4.007333, 3.7612, 3.850148, 4.174387, 4.143135, 3.713572, 3.258097, 3.135494, 3.616211, 3.705795, 3.921891, 3.737167, 3.704421, 3.813359, 2.772589, 3.496508, 3.637586, 4.204693, 3.912023, 3.931826, 3.401197, 3.218876, 3.044522, 3.044522, 3.178054, 3.044522, 3.401197, 2.944439, 2.484907, 2.772589, 3.135494, 2.564949, 2.944439, 3.555348, 3.135494, 2.302585, 3.218876, 2.302585, 2.639057, 2.564949, 3.044522, 2.944439, 2.70805, 2.079442, 2.397895, 2.944439, 2.772589, 2.944439, 2.564949, 1.609438, 2.079442, 2.302585, 2.639057, 2.772589, 2.639057, 2.70805, 2.639057, 2.944439, 2.890372, 2.995732, 3.091042, 3.044522, 2.890372, 3.135494, 2.890372, 2.944439, 2.944439, 3.135494, 2.833213, 2.70805, 3.091042, 2.564949, 2.302585, 3.295837, 3.465736, 2.995732, 2.944439, 3.295837, 3.044522, 3.496508, 3.688879, 3.583519, 3.583519, 2.639057, 3.401197, 3.295837, 3.295837, 3.332205, 3.465736, 3.332205, 2.639057, 3.526361, 2.995732, 2.833213, 3.044522, 3.091042, 3.401197, 3.367296, 3.332205, 2.564949, 2.944439, 3.332205, 3.496508, 3.367296, 3.7612, 3.7612, 3.688879, 3.806662, 3.828641, 4.025352, 3.78419, 3.526361, 3.295837, 3.295837, 3.178054, 3.465736, 3.258097, 3.218876, 3.091042, 3.091042, 3.091042, 2.564949, 2.079442, 2.564949, 2.564949, 3.332205, 3.218876, 2.639057, 3.044522, 3.178054, 3.555348, 3.688879, 3.688879, 3.332205, 2.397895, 2.944439, 3.091042, 3.091042, 3.367296, 3.332205, 3.637586, 3.465736, 3.526361, 3.526361, 3.713572, 2.995732, 3.295837, 3.044522, 2.890372, 3.465736, 3.610918, 3.610918, 3.465736, 3.295837, 2.890372, 3.178054, 2.890372, 3.178054, 3.332205, 3.295837, 3.091042, 2.70805, 2.944439, 3.178054, 3.295837, 3.218876, 3.526361, 2.639057, 2.890372, 3.135494, 2.944439, 3.218876, 2.772589, 3.465736, 3.496508, 3.610918, 3.555348, 3.295837, 3.526361, 3.526361, 3.7612, 3.806662, 3.688879, 3.332205, 3.610918, 3.465736, 3.091042, 2.397895, 2.564949, 2.639057, 2.890372, 3.433987, 3.135494, 3.258097, 3.295837, 3.091042, 2.639057, 2.302585, 2.772589, 3.218876, 2.944439, 3.178054, 3.367296, 3.465736, 3.401197, 3.555348, 3.610918, 3.465736, 3.401197, 3.610918, 3.7612, 3.465736, 3.332205, 3.465736, 3.555348, 3.931826, 3.806662, 3.258097, 3.295837, 3.931826, 4.276666, 3.610918, 3.610918, 4.007333, 4.189655, 4.025352, 4.077537, 3.610918, 3.044522, 2.397895, 1.609438, 2.890372, 2.890372, 2.079442, 2.484907, 3.496508, 3.912023, 3.871201, 3.433987, 3.091042, 2.70805, 2.890372, 3.178054, 2.772589, 2.995732, 2.890372, 2.397895, 3.091042, 3.637586, 3.871201, 4.189655, 3.988984, 3.258097, 3.496508, 4.127134, 3.970292, 3.988984, 4.744932, 4.70953, 4.510860, 4.330733, 4.248495, 2.890372, 3.526361, 3.875924, 3.905987, 3.822823, 3.795471, 3.881181, 3.878108, 3.909445, 3.912834, 3.91106, 3.816252, 3.810831, 3.904002, 4.127134, 4.204693, 4.477337, 4.60517, 3.806662, 3.258097, 3.89182, 4.043051, 4.174387, 4.219508, 4.663439, 4.510860, 3.526361, 3.367296, 3.401197, 3.583519, 3.610918, 3.988984, 3.367296, 1.94591, 2.772589, 3.218876, 3.135494, 3.970292, 4.290459, 3.806662, 2.772589, 2.197225, 3.178054, 3.260339, 3.259892, 3.271441, 3.180209, 3.218876, 2.639057, 3.332205, 1.94591, 2.995732, 3.663562, 4.219508, 4.234107, 4.060443, 2.302585, 3.7612, 2.890372, 2.397895, 3.172508, 3.178054, 4.110874, 3.178054, 3.806662, 3.610918, 3.713572, 4.204693, 3.555348, 3.258097, 3.367296, 2.079442, 3.433987, 3.871201, 4.025352, 4.204693, 4.26268, 4.094345, 4.532599, 4.969813, 4.70953, 3.465736, 3.336785, 3.178054, 2.995732, 2.944439, 2.079442, 3.912023, 3.871201, 3.178054, 2.772589, 3.325277, 3.433987, 3.178054, 3.367296, 3.713572, 4.553877, 3.931826, 3.912023, 2.302585, 3.135494, 3.367296, 3.218876, 3.178054, 3.912023, 3.135494, 3.496508, 2.995732, 3.89182, 3.850148, 4.043051, 3.970292, 3.931826, 4.110874, 2.995732, 2.079442, 3.688879, 3.178054, 2.484907, 3.044522, 3.258097, 3.871201, 4.174387, 3.555348, 4.077537, 3.135494, 2.772589, 3.005233, 2.639057, 1.609438, 3.005893, 3.135494, 2.302585, 2.079442, 2.484907, 3.178054, 3.496508, 2.397895, 2.564949, 2.70805, 2.639057, 2.639057, 3.044522, 2.833213, 2.890372, 3.008526, 3.000900, 2.999440, 3.004902, 3.006481, 3.005952, 3.006135, 3.008185, 2.991538, 2.990268, 2.995744, 2.997564, 2.639057, 2.079442, 2.079442, 1.94591, 2.397895, 3.178054, 3.178054, 3.258097, 2.772589, 3.465736, 3.178054, 2.772589, 3.970292, 3.663562, 3.806662, 3.610918, 3.610918, 3.091042, 2.484907, 3.258097, 3.465736, 4.007333, 3.737670, 2.944439, 3.555348, 3.465736, 3.555348, 3.496508, 2.833213, 2.997573, 2.833213, 3.044522, 2.70805, 3.178054, 2.995732, 3.178054, 2.995732, 3.258097, 2.397895, 1.94591, 2.397895, 3.044522, 3.178054, 3.258097, 3.295837, 3.258097, 2.995732, 2.772589, 3.496508, 3.610918, 3.526361, 2.639057, 3.091042, 3.178054, 3.713572, 4.025352, 3.332205, 3.931826, 3.526361, 2.995732, 3.526361, 3.526361, 3.555348, 3.637586, 3.295837, 2.397895, 2.079442, 1.386294, 2.70805, 2.302585, 2.995732, 3.332205, 3.178054, 3.465736, 3.465736, 3.583519, 3.496508, 3.663562, 3.583519, 4.007333, 3.526361, 2.890372, 3.218876, 3.044522, 3.555348, 3.610918, 3.688879, 3.828641, 3.637586, 3.688879, 3.401197, 2.772589, 2.70805, 2.944439, 2.70805, 2.944439, 2.944439, 3.526361, 3.401197, 3.332205, 2.70805, 2.983909, 2.484907, 2.833213, 3.258097, 2.890372, 3.135494, 2.484907, 2.079442, 2.079442, 2.944439, 2.302585, 3.135494, 3.970292, 2.995732, 2.772589, 3.091042, 2.995732, 3.295837, 3.401197, 3.555348, 3.258097, 3.465736, 3.332205, 3.713572, 3.688879, 3.465736, 4.143135, 4.060443, 3.912023, 3.737670, 2.992779, 2.994487, 3.496508, 2.302585, 2.772589, 2.944439, 3.044522, 3.713572, 3.637586, 3.871201, 2.70805, 2.833213, 1.94591, 2.079442, 3.218876, 3.688879, 3.610918, 2.564949, 3.806662, 3.610918, 3.526361, 3.737670, 4.007333, 4.343805, 3.713572, 4.219508, 3.637586, 3.295837, 3.044522, 3.044522, 3.555348, 3.178054, 3.178054, 1.609438, 1.386294, 3.295837, 3.7612, 3.526361, 3.367296, 4.060443, 3.663562, 3.401197, 4.430817, 3.218876, 2.772589, 2.772589, 2.564949, 2.833213, 2.397895, 2.397895, 2.639057, 3.401197, 3.737670, 3.295837, 3.637586, 2.397895, 2.944439, 2.833213, 2.772589, 3.555348, 2.772589, 1.94591, 2.397895, 3.332205, 3.401197, 3.295837, 4.094345, 3.091042, 2.944439, 3.295837, 3.295837, 3.401197, 3.688879, 4.304065, 3.988984, 3.737670, 1.94591, 2.995732, 3.332205, 2.944439, 3.044522, 2.833213, 2.772589, 2.639057, 3.367296, 3.091042, 3.295837, 3.044522, 3.439748, 2.995732, 2.564949, 3.526361, 3.295837, 4.369448, 3.828641, 4.094345, 1.94591, 2.639057, 3.496508, 2.995732, 3.713572, 3.871201, 3.89182, 4.510860, 4.356709, 2.772589, 2.70805, 3.043815, 3.241509, 3.439565, 4.527535, 4.525654, 4.215428, 4.201861, 4.501899, 4.577937, 4.57454, 4.919981, 4.564348, 4.488636, 4.477337, 4.919981, 5.068904, 4.727388, 3.401197, 4.553877, 4.465908, 3.7612, 3.806662, 4.369448, 4.503861, 4.502919, 4.571094, 4.350859, 4.169662, 4.546569, 4.48482, 4.470026, 4.433276, 4.499632, 4.238047, 4.211019, 4.488582, 4.525913, 4.521645, 4.502248, 4.522113, 4.265253, 4.028499, 4.424542, 4.505162, 4.51253, 4.905275, 4.510860, 4.272164, 4.859812, 5.370638, 5.389072, 5.17615, 2.397895, 3.178054, 3.218876, 3.871201, 4.584967, 4.219508, 4.543295, 4.672829, 4.867534, 4.615121, 4.189655, 4.477337, 4.564348, 4.672829, 4.882802, 4.955827, 4.454347, 4.143135, 4.477337, 4.317488, 4.234107, 3.970292, 4.276666, 4.532599, 4.248495, 4.521789, 4.795791, 4.70953, 4.859812, 4.812184, 4.26268, 3.970292, 3.806662, 3.988984, 3.871201, 3.688879, 3.713572, 3.091042, 3.871201, 4.584967, 4.584967, 4.60517, 4.997212, 4.962845, 3.871201, 3.988984, 4.276666, 4.204693, 3.367296, 4.077537, 2.772589, 2.397895, 3.367296, 3.044522, 4.043051, 4.127134, 3.806662, 3.332205, 3.218876, 3.496508, 3.401197, 3.526361, 4.26268, 4.477337, 4.442651, 3.713572, 3.332205, 3.970292, 4.276666, 4.343805, 3.555348, 3.367296, 3.218876, 3.549036, 3.367296, 3.295837, 3.091042, 4.102721, 3.78419, 3.401197, 3.401197, 3.871201, 3.89182, 3.988984, 3.828641, 3.828641, 3.806662, 3.433987, 3.89182, 4.290459, 4.077537, 4.276666, 3.78419, 3.737670, 3.091042, 3.871201, 4.127134, 4.532599, 4.330733, 4.077537, 4.143135, 2.197225, 4.317488, 4.406719, 4.077537, 3.988984, 3.871201, 3.583519, 2.995732, 4.043051, 4.234107, 4.234107, 4.158883, 4.143135, 3.931826, 3.178054, 3.526361, 3.663562, 3.850148, 4.077537, 4.262955, 4.204693, 3.663562, 4.158883, 4.174387, 4.248495, 4.077537, 4.094345, 3.850148, 3.737670, 4.343805, 4.234107, 3.988984, 4.189655, 4.025352, 3.663562, 3.7612, 4.060443, 4.007333, 4.276666, 4.043051, 3.295837, 3.737670, 3.367296, 3.931826, 3.7612, 3.806662, 3.89182, 4.158883, 4.025352, 3.526361, 4.077537, 4.234107, 4.127134, 4.330733, 4.406719, 3.663562, 3.332205, 4.127134, 3.970292, 4.043051, 3.970292, 4.158883, 4.304065, 3.572946, 4.369448, 3.737670, 4.007333, 3.637586, 3.912023, 3.367296, 2.995732, 3.806662, 4.110874, 4.007333, 3.988984, 3.401197, 2.890372, 2.639057, 3.295837, 3.496508, 3.367296, 3.526361, 3.555348, 3.135494, 2.833213, 3.555348, 3.637586, 3.688879, 3.218876, 3.931826, 3.295837, 3.332205, 3.78419, 3.931826, 3.931826, 4.127134, 4.127134, 3.951244, 3.583519, 4.158883, 4.290459, 4.430817, 4.330733, 4.330733, 4.276666, 4.077537, 4.343805, 4.691348, 4.248495, 4.248718, 3.637586, 3.496508, 3.89182, 4.543295, 4.663439, 4.418841, 4.406719, 4.219508, 3.526361, 3.135494, 4.330733, 4.564348, 4.59512, 4.644391, 4.60517, 4.454347, 4.077537, 4.744932, 4.770685, 4.644391, 4.584967, 4.70953, 4.553877, 4.077537, 3.871201, 3.850148, 4.486262, 4.382027, 4.382027, 4.219508, 3.688879, 4.007333, 4.49981, 4.532599, 4.437847, 4.795791, 4.454347, 4.418841, 4.736198, 4.077537, 4.025352, 3.555348, 3.401197, 3.7612, 3.258097, 2.995732, 3.465736, 4.343805, 4.564348, 4.762174, 4.521789, 3.7612, 4.422329, 4.094345, 4.204693, 3.828641, 3.828641, 4.025352, 3.737670, 4.59512, 5.003946, 5.036953, 5.043425, 4.482114, 4.189655, 4.094345, 4.691348, 4.820282, 5.087596, 4.905275, 4.812184, 4.615121, 4.682131, 4.110874, 3.688879, 3.555348, 4.644391, 4.718499, 4.418841, 4.488636, 4.442651, 4.65396, 4.532599, 4.532599, 4.804021, 4.983607, 4.574711, 5.01728, 5.214936, 5.170484, 4.762174, 4.85203, 4.234107, 4.26268, 4.644391, 4.736198, 4.836282, 5.117994, 4.94876, 4.718499, 3.555348, 4.330733, 4.442651, 4.290459, 4.465908, 4.394449, 4.069414, 4.104153, 3.900632, 3.905351, 4.086093, 4.158883, 4.356709, 4.75359, 3.912023, 3.737670, 3.713572, 4.369448, 4.615121, 4.663439, 3.931826, 3.912023, 3.583519, 3.89182, 3.401197, 3.78419, 4.276666, 4.488636, 4.382027, 4.219508, 4.356709, 4.564348, 4.394449, 4.26268, 4.26268, 4.127134, 4.521789, 4.26268, 4.615121, 4.477337, 4.025352, 3.871201, 3.988984, 4.406719, 3.583519, 4.234107, 4.356709, 4.532599, 4.691348, 4.382027, 4.828314, 4.787492, 5.225747, 5.099866, 4.983607, 3.737670, 3.401197, 3.526361, 2.944439, 4.115131, 3.946046, 4.158883, 4.454347, 4.26268, 4.110874, 3.7612, 4.304065, 4.744932, 3.988761, 4.477337, 4.736198, 4.077537, 3.688879, 4.127134, 3.7612, 4.077537, 3.871201, 4.110874, 4.430817, 4.343805, 4.343805, 4.510860, 4.454347, 4.204693, 3.951244, 3.295837, 3.526361, 3.295837, 2.197225, 2.995732, 3.135494, 3.496508, 2.944439, 3.610918, 3.89182, 4.382027, 4.127134, 4.49981, 4.060443, 3.465736, 3.367296, 3.610918, 3.610918, 3.465736, 3.713572, 3.091042, 2.890372, 3.295837, 3.295837, 3.178054, 3.295837, 3.737670, 3.401197, 3.401197, 3.178054, 2.302585, 2.639057, 3.526361, 3.526361, 3.663562, 3.401197, 2.397895, 3.258097, 3.637586, 3.713572, 3.479445, 3.484538, 3.7612, 3.737670, 3.713572, 3.367296, 3.850148, 3.465736, 3.526361, 3.332205, 3.713572, 3.610918, 3.610918, 3.555348, 3.367296, 3.367296, 3.496508, 3.465736, 3.713572, 3.737670, 3.78419, 3.637586, 3.583519, 3.258097, 2.944439, 3.295837, 3.806662, 3.78419, 3.555348, 3.713572, 3.637586, 3.401197, 4.043051, 3.871201, 4.094345, 3.7612, 3.496508, 3.496508, 3.367296, 3.367296, 3.583519, 3.526361, 3.583519, 3.737670, 3.663562, 3.465736, 3.555348, 3.555348, 3.332205, 3.713572, 3.663562, 3.663562, 3.178054, 3.295837, 3.465736, 3.713572, 3.713572, 3.89182, 3.871201, 3.806662, 3.806662, 3.970292, 4.189655, 3.871201, 3.663562, 3.526361, 3.135494, 3.555348, 3.496508, 3.89182, 3.332205, 3.332205, 3.091042, 2.995732, 2.397895, 2.302585, 2.70805, 2.833213, 3.367296, 3.218876, 2.772589, 3.258097, 3.496508, 3.583519, 3.7612, 3.7612, 3.465736, 2.833213, 2.890372, 3.295837, 3.465736, 3.637586, 3.7612, 3.828641, 3.526361, 3.806662, 3.737670, 3.526361, 2.995732, 3.401197, 3.135494, 3.135494, 3.465736, 3.737670, 3.7612, 3.583519, 3.295837, 3.044522, 2.302585, 3.332205, 2.995732, 3.401197, 3.178054, 3.367296, 3.135494, 2.197225, 3.218876, 3.465736, 3.258097, 2.944439, 2.484907, 3.295837, 2.890372, 3.465736, 3.465736, 3.433987, 3.78419, 3.78419, 3.850148, 3.688879, 3.78419, 3.806662, 3.871201, 4.356709, 4.077537, 4.025352, 3.806662, 3.988984, 3.871201, 3.637586, 2.70805, 3.295837, 3.610918, 3.496508, 3.912023, 4.007333, 3.401197, 3.663562, 3.610918, 3.178054, 2.639057, 3.637586, 3.526361, 3.583519, 3.931826, 3.912023, 3.828641, 3.688879, 4.110874, 4.127134, 3.912023, 4.356709, 4.143135, 4.077537, 3.89182, 3.7612, 3.637586, 3.7612, 4.060443, 3.828641, 4.060443, 3.688879, 4.204693, 4.406719, 4.204693, 4.065879, 4.032712, 3.870517, 3.844466, 4.126483, 4.128479, 3.996506, 4.113325, 2.079442, 3.258097, 2.70805, 2.197225, 2.639057, 3.806662, 4.189655, 4.127134, 3.850148, 3.044522, 3.401197, 3.218876, 3.433987, 3.044522, 3.295837, 3.332205, 2.70805, 3.610918, 4.110874, 4.49981, 4.779123, 4.488636, 3.663562, 3.737670, 4.276666, 4.382027, 4.454347, 4.934474, 4.844187, 4.634729, 3.976065, 4.125859, 4.024048, 3.637586, 3.713572, 4.219508, 4.077537, 3.78419, 4.204693, 4.406719, 4.488636, 4.204693, 4.49981, 4.442651, 4.234107, 4.26268, 4.097222, 4.132034, 4.634729, 4.744932, 3.970292, 3.433987, 4.127134, 4.304065, 4.406719, 4.532599, 4.70953, 4.532599, 3.688879, 3.496508, 3.433987, 3.526361, 3.931826, 4.095262, 4.510860, 3.258097, 3.806662, 4.094345, 4.219508, 4.553877, 4.615121, 4.941642, 4.543295, 4.49981, 4.317488, 4.564348, 4.820282, 4.488636, 3.218876, 4.158883, 4.234107, 3.637586, 3.713572, 4.465908, 4.584967, 4.510860, 4.382027, 4.356709, 4.532599, 4.510860, 4.553877, 4.510860, 4.234107, 3.970292, 4.369448, 4.14085, 4.250678, 4.249737, 4.260921, 4.245159, 4.394449, 4.317488, 3.89182, 4.190629, 4.189655, 4.430817, 4.882802, 4.304065, 4.85203, 4.941642, 5.081404, 5.252273, 5.111988, 3.218876, 3.091042, 3.091042, 3.178054, 4.543295, 3.806662, 4.369448, 4.624973, 4.663439, 4.043051, 3.688879, 3.931826, 4.369448, 4.510860, 4.718499, 4.727388, 4.304065, 4.094345, 4.204693, 4.094345, 4.007333, 3.433987, 3.89182, 4.418841, 4.343805, 4.430817, 4.75359, 4.736198, 4.75359, 4.65396, 4.189655, 3.871201, 3.367296, 3.091042, 3.555348, 3.367296, 3.526361, 3.526361, 3.89182, 4.234107, 4.406719, 4.442651, 4.454347, 4.574711, 3.713572, 3.213321, 3.7612, 3.332205, 2.197225, 3.583519, 2.772589, 2.944439, 2.484907, 3.295837, 3.526361, 3.806662, 3.688879, 2.772589, 3.091042, 3.496508, 2.564949, 3.367296, 3.931826, 3.988984, 3.850148, 3.044522, 3.044522, 3.178054, 3.610918, 4.025352, 3.465736, 3.135494, 3.496508, 2.772589, 2.833213, 2.70805, 2.833213, 2.995732, 3.433987, 3.367296, 3.044522, 3.258097, 3.332205, 3.555348, 3.465736, 3.367296, 3.688879, 3.367296, 3.526361, 4.330733, 4.110874, 3.970292, 3.637586, 3.610918, 2.944439, 2.944439, 3.688879, 3.912023, 4.234107, 3.806662, 3.7612, 3.610918, 4.025352, 4.110874, 3.828641, 3.295837, 3.258097, 3.258097, 3.044522, 3.258097, 3.367296, 3.555348, 3.713572, 3.583519, 3.610918, 2.772589, 3.044522, 3.367296, 3.367296, 3.970292, 3.806662, 3.713572, 3.465736, 2.564949, 3.583519, 3.688879, 3.871201, 3.806662, 3.637586, 3.713572, 3.912023, 3.871201, 3.526361, 4.060443, 3.737670, 3.401197, 3.713572, 3.951244, 3.912023, 4.110874, 3.737670, 2.995732, 3.295837, 3.135494, 2.833213, 3.178054, 3.295837, 3.637586, 3.931826, 4.025352, 3.401197, 3.610918, 3.912023, 3.951244, 4.143135, 4.234107, 3.663562, 3.222103, 3.555348, 3.465736, 3.526361, 3.555348, 3.970292, 4.060443, 3.871201, 4.110874, 3.871201, 3.367296, 3.258097, 3.367296, 3.295837, 3.044522, 3.713572, 4.007333, 3.806662, 3.7612, 3.135494, 2.833213, 2.833213, 3.091042, 3.583519, 3.178054, 3.433987, 3.367296, 2.772589, 2.890372, 2.995732, 3.526361, 3.433987, 2.944439, 3.091042, 3.367296, 3.401197, 3.737670, 3.78419, 3.7612, 3.7612, 4.060443, 4.060443, 3.583519, 3.871201, 4.025352, 4.007333, 4.276666, 3.503122, 4.276666, 4.060443, 4.060443, 4.532599, 4.007333, 3.044522, 3.295837, 3.637586, 3.7612, 4.234107, 4.189655, 3.871201, 3.951244, 3.713572, 3.401197, 3.091042, 3.737670, 4.174387, 4.418841, 4.343805, 4.543295, 4.406719, 4.025352, 4.510860, 4.59512, 4.727388, 4.465908, 4.624973, 4.564348, 4.234107, 3.951244, 3.637586, 3.78419, 4.174387, 4.304065, 4.290459, 3.637586, 4.189655, 4.488636, 4.543295, 4.59512, 4.859812, 4.718499, 4.454347, 4.682131, 4.007333, 3.7612, 3.433987, 3.258097, 3.806662, 3.044522, 3.178054, 3.496508, 4.317488, 4.488636, 4.634729, 4.691348, 3.89182, 3.828641, 3.78419, 4.219508, 3.496508, 3.663562, 3.912023, 3.258097, 4.189655, 4.89784, 5.068904, 4.406719, 3.433987, 4.043051, 4.356709, 4.49981, 4.927254, 4.875197, 4.574711, 4.564348, 4.70048, 3.850148, 2.70805, 3.78419, 4.248495, 4.454347, 4.418841, 4.442651, 4.290459, 4.454347, 4.615121, 4.26268, 4.510860, 4.828314, 4.564348, 4.875197, 4.976734, 5.056246, 4.820282, 4.75359, 4.143135, 3.970292, 4.276666, 4.343805, 4.615121, 4.962845, 4.997212, 4.736198, 3.688879, 4.127134, 4.382027, 4.158883, 4.276666, 4.430817, 4.70953, 3.988984, 3.295837, 3.555348, 4.158883, 4.276666, 4.521789, 4.727388, 4.89784, 4.430817, 3.951244, 3.951244, 4.477337, 4.574711, 4.477337, 4.094345, 4.060443, 4.043051, 3.637586, 3.496508, 4.143135, 4.26268, 4.317488, 4.290459, 4.094345, 4.26268, 4.624973, 4.59512, 4.488636, 4.343805, 4.406719, 4.189655, 4.219508, 4.394449, 4.691348, 4.867534, 4.369448, 4.290459, 4.382027, 4.406719, 4.110874, 4.343805, 4.356709, 4.430817, 4.025352, 4.779123, 4.836282, 5.056246, 4.812184, 5.164786, 3.555348, 3.135494, 3.218876, 3.637586, 4.304065, 4.007333, 4.127134, 4.382027, 5.01728, 4.248495, 3.871201, 4.025352, 4.276666, 4.682131, 4.634729, 4.564348, 4.094345, 3.433987, 4.26268, 4.110874, 3.555348, 3.044522, 3.828641, 4.304065, 4.174387, 4.143135, 4.488636, 4.406719, 4.430817, 4.406719, 3.912023, 3.7612, 3.663562, 2.397895, 3.433987, 3.367296, 3.401197, 3.218876, 3.583519, 4.127134, 4.26268, 4.26268, 4.532599, 4.60517, 3.091042, 3.526361, 4.025352, 3.89182, 3.737670, 3.806662, 3.332205, 2.944439, 3.332205, 3.091042, 3.555348, 3.610918, 3.7612, 3.401197, 2.944439, 3.295837, 3.178054, 2.890372, 3.871201, 3.850148, 4.060443, 3.218876, 2.890372, 3.555348, 3.637586, 3.988984, 3.78419, 3.332205, 3.091042, 3.367296, 3.465736, 2.833213, 3.178054, 2.995732, 3.433987, 3.178054, 3.178054, 3.610918, 3.610918, 4.007333, 3.367296, 3.496508, 3.295837, 3.526361, 3.688879, 3.850148, 3.931826, 3.637586, 3.526361, 3.367296, 2.197225, 3.367296, 3.78419, 4.025352, 3.583519, 3.433987, 4.043051, 3.367296, 3.850148, 3.89182, 3.806662, 3.433987, 3.295837, 3.401197, 3.091042, 3.367296, 3.7612, 3.828641, 3.713572, 3.828641, 3.610918, 2.639057, 3.688879, 3.7612, 3.526361, 4.382027, 3.931826, 3.871201, 3.218876, 3.218876, 3.433987, 3.583519, 3.871201, 3.78419, 3.367296, 3.218876, 3.871201, 3.737670, 3.610918, 3.89182, 3.610918, 3.218876, 3.218876, 3.78419, 3.713572, 3.951244, 3.295837, 2.197225, 3.218876, 2.484907, 2.890372, 3.401197, 3.218876, 3.401197, 3.637586, 3.367296, 3.044522, 3.465736, 3.332205, 3.737670, 4.060443, 4.143135, 3.367296, 2.639057, 3.401197, 3.218876, 2.890372, 3.526361, 3.713572, 3.526361, 3.737670, 3.828641, 4.143135, 3.044522, 2.639057, 3.135494, 3.044522, 2.772589, 3.295837, 3.828641, 3.583519, 3.555348, 2.890372, 2.397895, 2.197225, 2.397895, 3.367296, 3.295837, 3.307195, 3.309156, 3.296244, 3.296259, 3.304903, 3.091042, 3.091042, 3.367296, 2.995732, 3.135494, 3.367296, 3.433987, 3.465736, 3.637586, 3.688879, 3.806662, 3.951244, 3.465736, 3.931826, 3.89182, 3.988984, 4.204693, 4.127134, 4.174387, 4.127134, 4.060443, 4.043051, 3.637586, 2.995732, 3.258097, 3.496508, 3.850148, 4.094345, 3.78419, 3.988984, 4.025352, 4.204693, 3.258097, 3.178054, 3.951244, 4.174387, 4.219508, 4.248495, 4.189655, 4.317488, 4.127134, 4.49981, 4.615121, 4.624973, 4.634729, 4.644391, 4.304065, 4.127134, 3.78419, 3.7612, 3.850148, 4.025352, 3.7612, 3.737670, 3.7612, 4.49981, 4.394449, 4.290459, 4.382027, 4.382027, 4.644391, 4.890349, 4.70048, 4.127134, 3.637586, 3.367296, 3.332205, 3.610918, 2.70805, 3.091042, 3.496508, 4.007333, 4.219508, 4.330733, 4.369448, 3.332205, 3.332205, 3.637586, 3.637586, 3.295837, 3.258097, 3.583519, 3.258097, 4.356709, 4.718499, 5.192957, 4.94876, 4.744932, 4.369448, 3.988984, 4.330733, 4.521789, 4.912655, 4.990433, 4.812184, 4.564348, 4.574711, 4.234107, 2.944439, 3.688879, 4.110874, 4.26268, 4.025352, 3.637586, 4.204693, 4.49981, 4.317488, 4.454347, 4.477337, 4.574711, 4.219508, 4.644391, 4.584967, 5.023881, 4.143135, 4.189655, 3.583519, 3.433987, 4.465908, 4.382027, 4.682131, 4.672829, 4.691348, 4.442651, 3.637586, 3.931826, 3.931826, 3.583519, 3.931826, 3.931826, 3.367296, 3.091042, 3.044522, 3.367296, 3.496508, 4.442651, 4.343805, 4.406719, 4.430817, 3.295837, 2.944439, 3.663562, 3.78419, 3.806662, 3.555348, 3.496508, 3.663562, 4.077537, 3.806662, 3.295837, 4.127134, 4.304065, 4.077537, 2.944439, 3.871201, 3.951244, 4.007333, 2.995732, 2.772589, 3.178054, 3.610918, 3.555348, 3.688879, 4.094345, 3.850148, 3.988984, 4.127134, 4.077537, 2.833213, 2.639057, 3.496508, 3.78419, 4.343805, 3.951244, 4.442651, 4.543295, 4.828314, 4.983607, 4.779123, 3.583519, 3.465736, 3.135494, 3.496508, 3.044522, 2.772589, 3.610918, 3.78419, 4.143135, 3.465736, 3.258097, 3.806662, 3.828641, 3.806662, 4.382027, 4.382027, 3.988984, 3.737670, 3.806662, 2.639057, 3.496508, 3.258097, 3.610918, 3.433987, 3.295837, 3.218876, 3.258097, 3.091042, 3.178054, 3.912023, 3.828641, 3.637586, 2.079442, 2.833213, 2.639057, 2.079442, 3.178054, 2.890372, 3.135494, 3.663562, 3.951244, 3.806662, 4.007333, 4.304065, 2.890372, 2.639057, 3.258097, 2.995732, 2.397895, 2.079442, 2.564949, 2.564949, 2.397895, 2.772589, 3.218876, 3.091042, 2.639057, 2.564949, 2.397895, 2.995732, 2.079442, 2.079442, 2.890372, 3.258097, 3.295837, 2.079442, 2.564949, 2.302585, 3.178054, 3.637586, 3.218876, 2.302585, 2.484907, 2.484907, 2.70805, 2.302585, 2.079442, 2.079442, 2.397895, 2.079442, 2.302585, 2.833213, 3.178054, 2.772589, 2.890372, 2.944439, 3.135494, 2.944439, 2.995732, 3.024935, 3.465736, 3.526361, 3.178054, 2.397895, 2.079442, 2.484907, 3.258097, 3.610918, 3.526361, 2.70805, 3.218876, 3.135494, 3.526361, 3.295837, 2.890372, 2.079442, 2.079442, 2.639057, 2.079442, 2.772589, 3.433987, 3.433987, 3.332205, 3.295837, 2.890372, 2.484907, 2.772589, 2.890372, 3.135494, 3.7612, 2.484907, 3.295837, 2.564949, 2.564949, 3.610918, 3.332205, 3.178054, 3.295837, 3.663562, 2.890372, 3.332205, 3.871201, 4.158883, 3.367296, 3.295837, 2.70805, 3.135494, 3.367296, 3.258097, 3.332205, 2.70805, 2.302585, 2.079442, 2.197225, 2.079442, 2.564949, 2.079442, 2.079442, 3.526361, 3.332205, 3.044522, 3.135494, 3.091042, 3.295837, 3.465736, 3.433987, 2.772589, 2.564949, 3.044522, 2.70805, 2.995732, 3.091042, 3.610918, 3.610918, 3.688879, 3.737670, 3.583519, 3.295837, 2.484907, 3.091042, 2.890372, 2.944439, 3.218876, 2.772589, 2.772589, 3.218876, 2.197225, 2.079442, 2.079442, 2.302585, 3.044522, 2.833213, 3.178054, 2.639057, 2.197225, 2.079442, 2.639057, 2.833213, 3.044522, 2.890372, 2.079442, 2.833213, 2.995732, 2.564949, 2.995732, 2.772589, 3.218876, 3.091042, 3.178054, 3.367296, 3.295837, 3.555348, 3.583519, 3.89182, 3.7612, 4.043051, 3.637586, 4.043051, 3.555348, 2.397895, 2.564949, 2.397895, 2.833213, 3.135494, 3.688879, 3.332205, 2.564949, 2.197225, 2.70805, 2.079442, 2.079442, 2.397895, 3.135494, 3.526361, 3.7612, 3.713572, 3.258097, 2.564949, 3.178054, 3.637586, 3.583519, 3.258097, 3.688879, 3.713572, 2.564949, 2.639057, 2.564949, 3.178054, 3.78419, 3.295837, 2.397895, 2.397895, 3.218876, 3.258097, 3.218876, 3.258097, 3.970292, 3.526361, 3.78419, 4.127134, 3.871201, 3.178054, 3.091042, 2.564949, 2.397895, 2.772589, 2.197225, 2.564949, 3.688879, 3.713572, 3.737670, 3.737670, 2.564949, 2.079442, 2.833213, 3.496508, 2.944439, 2.944439, 2.079442, 1.609438, 3.044522, 3.496508, 3.871201, 3.637586, 3.091042, 2.944439, 2.564949, 3.465736, 3.465736, 4.248495, 4.532599, 3.806662, 3.637586, 3.135494, 3.555348, 2.995732, 2.995732, 3.178054, 3.258097, 2.995732, 3.044522, 3.218876, 3.465736, 3.295837, 3.663562, 3.737670, 3.465736, 3.091042, 3.526361, 3.496508, 3.555348, 3.583519, 3.610918, 2.70805, 2.833213, 3.496508, 3.218876, 3.496508, 3.7612, 3.912023, 4.382027, 3.433987, 2.70805, 3.178054, 3.044522, 3.091042, 3.135494), .Dim=c( 366,22 ), .Dimnames = list(c( "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255","256","257","258","259","260","261","262","263","264","265","266","267","268","269","270","271","272","273","274","275","276","277","278","279","280","281","282","283","284","285","286","287","288","289","290","291","292","293","294","295","296","297","298","299","300","301","302","303","304","305","306","307","308","309","310","311","312","313","314","315","316","317","318","319","320","321","322","323","324","325","326","327","328","329","330","331","332","333","334","335","336","337","338","339","340","341","342","343","344","345","346","347","348","349","350","351","352","353","354","355","356","357","358","359","360","361","362","363","364","365","366"), c( "Stat1","Stat2","Stat3","Stat4","Stat5","Stat6","Stat7","Stat8","Stat9","Stat10","Stat11", "Stat12","Stat13","Stat14","Stat15","Stat16","Stat17","Stat18","Stat19","Stat20","Stat21","Stat22") )) ))
\name{getCladesofSize} \alias{getCladesofSize} \title{Get all subtrees larger than or equal to a specified size} \usage{ getCladesofSize(tree, clade.size=2) } \arguments{ \item{tree}{is an object of class \code{"phylo"}.} \item{clade.size}{subtree size.} } \description{ This function gets all subtrees that cannot be further subdivided into two reciprocally monophyletic subtrees of size \code{>= clade.size}. } \value{ An object of class \code{"multiPhylo"}. } \references{ Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). \emph{Methods Ecol. Evol.}, \bold{3}, 217-223. } \author{Liam Revell \email{liam.revell@umb.edu}} \seealso{ \code{\link{extract.clade}}, \code{\link{getDescendants}} } \keyword{phylogenetics} \keyword{utilities}
/man/getCladesofSize.Rd
no_license
cran/phytools
R
false
false
820
rd
\name{getCladesofSize} \alias{getCladesofSize} \title{Get all subtrees larger than or equal to a specified size} \usage{ getCladesofSize(tree, clade.size=2) } \arguments{ \item{tree}{is an object of class \code{"phylo"}.} \item{clade.size}{subtree size.} } \description{ This function gets all subtrees that cannot be further subdivided into two reciprocally monophyletic subtrees of size \code{>= clade.size}. } \value{ An object of class \code{"multiPhylo"}. } \references{ Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). \emph{Methods Ecol. Evol.}, \bold{3}, 217-223. } \author{Liam Revell \email{liam.revell@umb.edu}} \seealso{ \code{\link{extract.clade}}, \code{\link{getDescendants}} } \keyword{phylogenetics} \keyword{utilities}
### Cargamos las librerias library(geonames) ### Geonames es una libreria de libre acceso y requiere crear un cuenta library(ggplot2) library(dplyr) ### Cargamos la base de datos cdmx.rutas <- read.csv("cdmx_transporte_raw.csv",stringsAsFactors=T) ### Vemos la información de la base de datos head(cdmx.rutas); tail(cdmx.rutas); summary(cdmx.rutas); dim(cdmx.rutas); ### Seleccionamos los orgines y destino ### Origen origen <- cdmx.rutas[,c("pickup_longitude","pickup_latitude")] head(origen) ### Destino destino <- cdmx.rutas[,c("dropoff_longitude","dropoff_latitude")] head(destino) ### Mediante GNfindNearbyPostalCodes realizamos una prueba para obter el municipio ### Para utilizar geonames creamos una cuenta previamente options(geonamesUsername="cristophercano") ### Municipio de origen (mun.origen.1<-GNfindNearbyPostalCodes(lat = origen[1,2], lng=origen[1,1],radius = "10", maxRows = "1", style = "MEDIUM")) ### Almacenamos solo el nombre del municipio de origen (nombre.mun.o <- mun.origen.1$adminName2) ##La variable que nos devuelve es adminName2 (paste("municipio de origen: ",nombre.mun.o)) ### Municipio de destino (mun.destino.1<-GNfindNearbyPostalCodes(lat = destino[1,2], lng=destino[1,1], radius = "10", maxRows = "1", style = "MEDIUM")) ### Almacenamos solo el nombre del municipio de origen (nombre.mun.d <- mun.destino.1$adminName2) ##La variable que nos devuelve es adminName2 (paste("municipio de destino: ",nombre.mun.d)) ### Podemos corrovorar esta información trazando la ruta en un mapa mediante leaflet y osrmRoute library(leaflet) library(osrm) library(sf) a <- c(origen[1,1],origen[1,2]) b <- c(destino[1,1],destino[1,2]) r<-osrmRoute(src = a, dst = b, returnclass = "sf", overview = "full", osrm.profile = "car") r plot(st_geometry(r), add = TRUE) # Mapa de municipios de la CDMX mapa_municipios <- st_read("https://github.com/JuveCampos/Shapes_Resiliencia_CDMX_CIDE/raw/master/Zona%20Metropolitana/EdosZM.geojson", quiet = T) %>% filter(CVE_ENT == "09") # Mapa de la entidad de la Ciudad de México mapa_cdmx <- st_read("https://github.com/JuveCampos/Shapes_Resiliencia_CDMX_CIDE/raw/master/Zona%20Metropolitana/EstadosZMVM.geojson", quiet = T)[3,] m <- leaflet() %>% addTiles() %>% #addProviderTiles("CartoDB.Positron") %>% addPolylines(data=r$geometry, opacity=1, weight = 3) %>% addMarkers(lng=destino[1,1], lat=destino[1,2], popup = nombre.mun.d, label = nombre.mun.d) %>% addPopups(lng=origen[1,1], lat=origen[1,2], nombre.mun.o,options = popupOptions(closeButton = FALSE)) %>% addPopups(lng=destino[1,1], lat=destino[1,2], nombre.mun.d,options = popupOptions(closeButton = FALSE)) %>% addMarkers(lng=origen[1,1], lat=origen[1,2], popup = nombre.mun.o, label = nombre.mun.o) %>% addPolygons(data = mapa_municipios, color = "#444444", weight = 2, opacity = 0.4, fill = F, label = ~as.character(NOM_MUN)) %>% addPolygons(data = mapa_cdmx, color = "#444444", weight = 4, opacity = 1, fill = F ) m ### El condigo siguiente nos ayudo a realizar la tarea anterior pero aplicandolo a los más de 16,000 datos # Initialize the data frame #####==========ORIGEN=============#### # Se dividieron los datos ya que existe un limite de creditos disponibles por hora 1:500 501:1000 1001:1500 ... 8501:8625 # Ejemplo idx <- 1:20 # Asiganmos un rago para encontrar los municipios origen.sample <-origen[idx,] # Nos aseguramos que sean los datos que queremos head(origen.sample); tail(origen.sample); dim(origen.sample); iter = 0 # Loop para obtener el nombre de los municipios de origen for(i in idx){ iter = iter + 1 result <- GNfindNearbyPostalCodes(lat = origen.sample[iter,2], lng=origen.sample[iter,1],radius = "10", maxRows = "1", style = "MEDIUM")$adminName2 cdmx.rutas$municipios_origen[i] <- result } #print(i) # Resultado final de los municipios de origen encontrados head(cdmx.rutas$municipios_origen[idx]) #####============DESTINO=============###### # El procedimiento es el mismo que el anterior idx <- 1:20 destino.sample <-destino[idx,] # Loop para obtener el nombre de los municipios de destino iter = 0 for(i in idx){ iter = iter + 1 result <- GNfindNearbyPostalCodes(lat = destino.sample[iter,2], lng=destino.sample[iter,1],radius = "10", maxRows = "1", style = "MEDIUM")$adminName2 cdmx.rutas$municipios_destino[i] <- result } print(i) # Resultado final de los municipios destino encontrados head(cdmx.rutas$municipios_destino[idx]) # Guardamos los resultados write.csv(cdmx.rutas,"cdmx_rutas_municipios_save.csv") cdmx.rutas<-read.csv("cdmx_rutas_municipios_save.csv")
/2. Extracción de datos/añadir_municipios_cdmx_uber_taxis.R
no_license
CristopherCano/Proyecto_R_Transporte_CDMX
R
false
false
4,776
r
### Cargamos las librerias library(geonames) ### Geonames es una libreria de libre acceso y requiere crear un cuenta library(ggplot2) library(dplyr) ### Cargamos la base de datos cdmx.rutas <- read.csv("cdmx_transporte_raw.csv",stringsAsFactors=T) ### Vemos la información de la base de datos head(cdmx.rutas); tail(cdmx.rutas); summary(cdmx.rutas); dim(cdmx.rutas); ### Seleccionamos los orgines y destino ### Origen origen <- cdmx.rutas[,c("pickup_longitude","pickup_latitude")] head(origen) ### Destino destino <- cdmx.rutas[,c("dropoff_longitude","dropoff_latitude")] head(destino) ### Mediante GNfindNearbyPostalCodes realizamos una prueba para obter el municipio ### Para utilizar geonames creamos una cuenta previamente options(geonamesUsername="cristophercano") ### Municipio de origen (mun.origen.1<-GNfindNearbyPostalCodes(lat = origen[1,2], lng=origen[1,1],radius = "10", maxRows = "1", style = "MEDIUM")) ### Almacenamos solo el nombre del municipio de origen (nombre.mun.o <- mun.origen.1$adminName2) ##La variable que nos devuelve es adminName2 (paste("municipio de origen: ",nombre.mun.o)) ### Municipio de destino (mun.destino.1<-GNfindNearbyPostalCodes(lat = destino[1,2], lng=destino[1,1], radius = "10", maxRows = "1", style = "MEDIUM")) ### Almacenamos solo el nombre del municipio de origen (nombre.mun.d <- mun.destino.1$adminName2) ##La variable que nos devuelve es adminName2 (paste("municipio de destino: ",nombre.mun.d)) ### Podemos corrovorar esta información trazando la ruta en un mapa mediante leaflet y osrmRoute library(leaflet) library(osrm) library(sf) a <- c(origen[1,1],origen[1,2]) b <- c(destino[1,1],destino[1,2]) r<-osrmRoute(src = a, dst = b, returnclass = "sf", overview = "full", osrm.profile = "car") r plot(st_geometry(r), add = TRUE) # Mapa de municipios de la CDMX mapa_municipios <- st_read("https://github.com/JuveCampos/Shapes_Resiliencia_CDMX_CIDE/raw/master/Zona%20Metropolitana/EdosZM.geojson", quiet = T) %>% filter(CVE_ENT == "09") # Mapa de la entidad de la Ciudad de México mapa_cdmx <- st_read("https://github.com/JuveCampos/Shapes_Resiliencia_CDMX_CIDE/raw/master/Zona%20Metropolitana/EstadosZMVM.geojson", quiet = T)[3,] m <- leaflet() %>% addTiles() %>% #addProviderTiles("CartoDB.Positron") %>% addPolylines(data=r$geometry, opacity=1, weight = 3) %>% addMarkers(lng=destino[1,1], lat=destino[1,2], popup = nombre.mun.d, label = nombre.mun.d) %>% addPopups(lng=origen[1,1], lat=origen[1,2], nombre.mun.o,options = popupOptions(closeButton = FALSE)) %>% addPopups(lng=destino[1,1], lat=destino[1,2], nombre.mun.d,options = popupOptions(closeButton = FALSE)) %>% addMarkers(lng=origen[1,1], lat=origen[1,2], popup = nombre.mun.o, label = nombre.mun.o) %>% addPolygons(data = mapa_municipios, color = "#444444", weight = 2, opacity = 0.4, fill = F, label = ~as.character(NOM_MUN)) %>% addPolygons(data = mapa_cdmx, color = "#444444", weight = 4, opacity = 1, fill = F ) m ### El condigo siguiente nos ayudo a realizar la tarea anterior pero aplicandolo a los más de 16,000 datos # Initialize the data frame #####==========ORIGEN=============#### # Se dividieron los datos ya que existe un limite de creditos disponibles por hora 1:500 501:1000 1001:1500 ... 8501:8625 # Ejemplo idx <- 1:20 # Asiganmos un rago para encontrar los municipios origen.sample <-origen[idx,] # Nos aseguramos que sean los datos que queremos head(origen.sample); tail(origen.sample); dim(origen.sample); iter = 0 # Loop para obtener el nombre de los municipios de origen for(i in idx){ iter = iter + 1 result <- GNfindNearbyPostalCodes(lat = origen.sample[iter,2], lng=origen.sample[iter,1],radius = "10", maxRows = "1", style = "MEDIUM")$adminName2 cdmx.rutas$municipios_origen[i] <- result } #print(i) # Resultado final de los municipios de origen encontrados head(cdmx.rutas$municipios_origen[idx]) #####============DESTINO=============###### # El procedimiento es el mismo que el anterior idx <- 1:20 destino.sample <-destino[idx,] # Loop para obtener el nombre de los municipios de destino iter = 0 for(i in idx){ iter = iter + 1 result <- GNfindNearbyPostalCodes(lat = destino.sample[iter,2], lng=destino.sample[iter,1],radius = "10", maxRows = "1", style = "MEDIUM")$adminName2 cdmx.rutas$municipios_destino[i] <- result } print(i) # Resultado final de los municipios destino encontrados head(cdmx.rutas$municipios_destino[idx]) # Guardamos los resultados write.csv(cdmx.rutas,"cdmx_rutas_municipios_save.csv") cdmx.rutas<-read.csv("cdmx_rutas_municipios_save.csv")
pgString<-"jdbc:postgresql://server:port/db?currentSchema=schema" pgUser<-"user" pgPassword<-"password" oraString<-"jdbc:oracle:thin:@//server:port/db" oraUser<-"user" oraPassword<-"password"
/connections-example.R
no_license
naturalsciences/eml-create-r
R
false
false
193
r
pgString<-"jdbc:postgresql://server:port/db?currentSchema=schema" pgUser<-"user" pgPassword<-"password" oraString<-"jdbc:oracle:thin:@//server:port/db" oraUser<-"user" oraPassword<-"password"
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TransferrableModels.R \name{UpdateTransferrableModel} \alias{UpdateTransferrableModel} \title{Update the display name or note for an imported model.} \usage{ UpdateTransferrableModel(importId, displayName = NULL, note = NULL) } \arguments{ \item{importId}{character. Id of the import.} \item{displayName}{character. The new display name.} \item{note}{character. The new note.} } \value{ A list describing uploaded transferrable model with the following components: \itemize{ \item note. Character string Manually added node about this imported model. \item datasetName. Character string Filename of the dataset used to create the project the model belonged to. \item modelName. Character string Model type describing the model generated by DataRobot. \item displayName. Character string Manually specified human-readable name of the imported model. \item target. Character string The target of the project the model belonged to prior to export. \item projectName. Character string Name of the project the model belonged to prior to export. \item importedByUsername. Character string Username of the user who imported the model. \item importedAt. Character string The time the model was imported. \item version. Numeric Project version of the project the model belonged to. \item projectId. Character id of the project the model belonged to prior to export. \item featurelistName. Character string Name of the featurelist used to train the model. \item createdByUsername. Character string Username of the user who created the model prior to export. \item importedById. Character string id of the user who imported the model. \item id. Character string id of the import. \item createdById. Character string id of the user who created the model prior to export. \item modelId. Character string original id of the model prior to export. \item originUrl. Character string URL. } } \description{ Update the display name or note for an imported model. } \examples{ \dontrun{ id <- UploadTransferrableModel("model.drmodel") UpdateTransferrableModel(id, displayName = "NewName", note = "This is my note.") } }
/man/UpdateTransferrableModel.Rd
no_license
malakz/datarobot
R
false
true
2,231
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TransferrableModels.R \name{UpdateTransferrableModel} \alias{UpdateTransferrableModel} \title{Update the display name or note for an imported model.} \usage{ UpdateTransferrableModel(importId, displayName = NULL, note = NULL) } \arguments{ \item{importId}{character. Id of the import.} \item{displayName}{character. The new display name.} \item{note}{character. The new note.} } \value{ A list describing uploaded transferrable model with the following components: \itemize{ \item note. Character string Manually added node about this imported model. \item datasetName. Character string Filename of the dataset used to create the project the model belonged to. \item modelName. Character string Model type describing the model generated by DataRobot. \item displayName. Character string Manually specified human-readable name of the imported model. \item target. Character string The target of the project the model belonged to prior to export. \item projectName. Character string Name of the project the model belonged to prior to export. \item importedByUsername. Character string Username of the user who imported the model. \item importedAt. Character string The time the model was imported. \item version. Numeric Project version of the project the model belonged to. \item projectId. Character id of the project the model belonged to prior to export. \item featurelistName. Character string Name of the featurelist used to train the model. \item createdByUsername. Character string Username of the user who created the model prior to export. \item importedById. Character string id of the user who imported the model. \item id. Character string id of the import. \item createdById. Character string id of the user who created the model prior to export. \item modelId. Character string original id of the model prior to export. \item originUrl. Character string URL. } } \description{ Update the display name or note for an imported model. } \examples{ \dontrun{ id <- UploadTransferrableModel("model.drmodel") UpdateTransferrableModel(id, displayName = "NewName", note = "This is my note.") } }
\name{cmd_line} \alias{cmd_line} \title{ Function to generate ms-like command lines. } \description{ The function \code{\link{cmd_line}} takes values for the number of samples, the region-specific population mutation and recombination rates, the parameters of the demographic model to simulate... and generates the \code{ms}-like command line with the tags and values required as input by the \R function \code{\link{ms}}. \cr This function is called by the \R functions \code{\link{simulate_data}} and \code{\link{estimate_IMc}}. } \usage{ cmd_line(nsam, theta, howmany=1, rho=0, structure=1, time=0, migration=0, extra="NA", seeds="NA") } \arguments{ \item{}{\strong{REQUIRED ARGUMENTS:}} \item{nsam}{ \code{nsam=}\eqn{n} specifies the total number of chromosomes sampled for the genomic region considered. \cr ATTENTION: \code{\link{cmd_line}} requires that \eqn{n>0} be specified with the argument \code{nsam}. \cr \code{\link{cmd_line}} initiates the \code{ms} command line with the string of characters: \cr \code{"./msR }\eqn{n}\code{ }\eqn{H}\code{"}. \cr \eqn{H} is the number of independent data sets to simulate with different gene genealogy samples for the genomic region considered.\cr By default \eqn{H=1} unless it is specified with the argument \code{howmany=}\eqn{H>0}. \cr ATTENTION, if there are TWO populations (as specified with \code{structure[1]=2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}), \code{\link{cmd_line}} requires \code{nsam=}\eqn{n=n_1+n_2}. } \item{theta}{ ATTENTION: \code{\link{cmd_line}} requires that \eqn{\theta_1*x*v*Z>0} be specified with the argument \code{theta} (i.e., \code{theta}\eqn{\theta_1*x*v*Z}). \cr \code{theta} can be a vector of up to three floating numbers: \cr \code{theta=c(}\eqn{\theta_1*x*v*Z}\code{, }\eqn{\theta_2*x*v*Z}\code{, }\eqn{\theta_A*x*v*Z}\code{)}. \tabular{ll}{ \eqn{\theta_1*x*v*Z} \tab : The region-specific population mutation rate per generation for population 1. \cr \tab \code{\link{cmd_line}} adds the string of characters: \code{"}\code{-t }\eqn{\theta_1*x*v*Z}\code{"} to the \code{ms} command line, specifying the region-specific generational population mutation rate (required to run the \R function \code{\link{ms}}). \cr \eqn{\theta_2*x*v*Z} \tab : The region-specific population mutation rate per generation for population 2. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-n 2 }\eqn{N_2/N_1}\code{"} to the \code{ms} command line. \cr \tab \code{theta[2]} is ignored unless there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \eqn{\theta_A*x*v*Z} \tab : The region-specific ancestral population mutation rate per generation. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-eN }\eqn{T_s}\code{ }\eqn{N_A/N_1}\code{"} to the \code{ms} command line. \cr \tab \code{theta[3]} is ignored unless there is a population split (as specified with \eqn{T_s>0} with the argument \code{time}). } Where: \tabular{ll}{ \eqn{\theta_1=4N_1*\mu} \tab : The population mutation rate per bp per generation for population 1 (required). \cr \eqn{\theta_2=4N_2*\mu} \tab : The population mutation rate per bp per generation for population 2. \cr \eqn{\theta_A=4N_A*\mu} \tab : The ancestral population mutation rate per bp per generation. \cr \eqn{N_1} \tab : The effective population size in population 1 (the reference population so by default and unless specified, \eqn{N_1=N_2=N_A}). \cr \eqn{N_2} \tab : The effective population size in population 2. \cr \eqn{N_A} \tab : The ancestral effective population size. \cr \eqn{\mu} \tab : The genomic generational mutation rate per bp. \cr \eqn{x} \tab : The inheritance scalar for the genomic region considered (i.e., \code{"1"} for autosomal region, \code{"0.75"} for X- and \code{"0.5"} for Y- and mtDNA-linked region). \cr \eqn{v} \tab : The mutation rate scalar for the genomic region considered (which can be estimated e.g., from divergence data). \cr \eqn{Z} \tab : The size in bp of the genomic region considered. } ATTENTION: \code{\link{cmd_line}} requires that \code{theta[i]}\eqn{>0} for any \eqn{i} \eqn{\in} \eqn{[1,3]} when specified. }% end theta \item{}{\strong{OPTIONAL ARGUMENTS:}} \item{howmany}{ Use \code{howmany=}\eqn{H} to specify the number of independent gene genealogy samples to simulate for the genomic region considered.\cr \code{howmany=}\eqn{H=1} by default. \cr \code{\link{cmd_line}} adds \code{"}\eqn{H}\code{"} to the string of characters \code{"}\code{./msR }\eqn{n}\code{ }\eqn{H}\code{"}. \cr ATTENTION: If \eqn{H>1*10^5}, \code{\link{cmd_line}} requires that \code{howmany} be specified as a string of characters (e.g., \code{howmany="100000"}). } \item{rho}{ Use \code{rho=c(}\eqn{\rho*w*(Z-1)}\code{, }\eqn{Z}\code{)} to specify the region-specific population recombination rate per generation. \cr By default there is no recombination. \cr \code{\link{cmd_line}} adds the string of characters \code{"}\code{-r }\eqn{\rho*w*(Z-1)}\code{ }\eqn{Z}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to generate ancestral recombination graphs instead of gene genealogies.\cr Where, \tabular{ll}{ \eqn{\rho=4N_1*c} \tab : The genomic average population intra-region recombination rate per bp per generation. \cr \eqn{c} \tab : The generational cross-over rate per bp. \cr \eqn{w} \tab : The recombination scalar for the genomic region considered.\cr \tab \eqn{w=\beta} is the ratio of the region-specific population recombination rate per bp over \eqn{\rho=4N_1*c}.\cr \tab \eqn{\beta=}\code{"1"} (\code{"0.5"} in \emph{Drosophila}) for autosomal region, \code{"0.5"} for X- and \code{"0"} for Y- and mtDNA-linked region. } ATTENTION: \code{\link{cmd_line}} requires that \code{rho} be a vector of TWO values. } \item{structure}{ Use \code{structure=c(2, }\eqn{n_1}\code{, }\eqn{n_2}\code{)} to specify population structure in a model with at most TWO populations remaining at present. \cr By default, \code{structure=1}\eqn{1} to specify a model without structure. \cr \code{\link{cmd_line}} adds the string of characters \code{"}\code{-I 2 }\eqn{n_1}\code{ }\eqn{n_2}\code{ }\eqn{M_p}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to model population structure. \cr \tabular{ll}{ \eqn{n_1} \tab : The sample size from population 1 for the genomic region considered. \cr \tab \code{structure[2]} is ignored unless \code{structure[1]=}\eqn{2}. \cr \eqn{n_2} \tab : The sample size from population 2 for the genomic region considered.\cr \tab \code{structure[3]} is ignored unless \code{structure[1]=}\eqn{2}. } ATTENTION: \cr -> When there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}), \code{\link{cmd_line}} requires \code{nsam=}\eqn{n=n_1+n_2}. \cr -> \code{\link{cmd_line}} requires that \eqn{M_p>0} be specified with the argument \code{migration} in case of an island model (i.e., \eqn{T_s=0} when specified with the argument \code{time} or unspecified). \cr } \item{time}{ Use \code{time} to specify time of events. \cr \code{time} can take either one value (\code{time=}\eqn{T_s}) and up to TWO floating numbers: \cr \code{time=c(}\eqn{T_s}\code{, }\eqn{T_c}\code{)}. \tabular{ll}{ \eqn{T_s} \tab : The split time in unit of \eqn{4N_1} generations between the TWO populations. \cr \tab By default \eqn{T_s=0} to specify a model without population split. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-ej }\eqn{T_s}\code{ 2 1}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to model a population split. \cr \tab \code{time[1]} is ignored unless there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \eqn{T_c} \tab : The time at which the rate of gene flow changed between the two populations in unit of \eqn{4N_1} generations. \cr \tab By default there is no change of gene flow rate since the split. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-eM }\eqn{T_c}\code{ }\eqn{M_c}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to change gene flow rate from \eqn{M_p} to \eqn{M_c} at time \eqn{T_c}, backward in time. \cr \tab * \eqn{T_c} is ignored unless: \cr \tab --- There is a population split and \eqn{0<T_c<T_s} (as specified with the argument \code{time}). \cr \tab --- \eqn{M_c \not=M_p} (as specified with the argument \code{migration}). } ATTENTION: \code{\link{cmd_line}} requires \eqn{0}\eqn{\le}\eqn{T_c}\eqn{\le}\eqn{T_s} when specified. } \item{migration}{ Use \code{migration} to specify symmetrical gene flow rates between TWO populations in the model. \cr By default there is no gene flow. \cr \code{migration} can take either one value (\code{migration=}\eqn{M_p}) and up to TWO floating numbers: \cr \code{migration=c(}\eqn{M_p}\code{, }\eqn{M_c}\code{)}. \tabular{ll}{ \eqn{M_p=4N_1*m_p} \tab : The number of migrants exchanged each generation by the TWO populations at present. \cr \tab \eqn{M_p} is ignored unless there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \tab \code{\link{cmd_line}} adds \code{"}\eqn{M_p}\code{"} to the string of characters \code{"}\code{-I 2 }\eqn{n_1}\code{ }\eqn{n_2}\code{ }\eqn{M_p}\code{"}. \cr \tab \eqn{M_p} has different definitions depending of the model considered:\cr \tab * \eqn{M_p} is the symmetrical rate of gene flow between two population in an island model (i.e., \eqn{0<t<\inf}) as specified with:\cr \tab -- A population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \tab -- Either \eqn{T_s=0} when specified with the argument \code{time} or unspecified.\cr \tab ATTENTION: \code{\link{cmd_line}} requires that \eqn{M_p>0} be specified in case of an island model. \cr \tab * \eqn{M_p} is the constant symmetrical rate of gene flow since the split until present (i.e., \eqn{0<t<T_s}) if there is a population split (as specified with \eqn{T_s>0} with the argument \code{time}).\cr \tab * \eqn{M_p} is the constant symmetrical rate of gene flow since the time of gene flow rate change until present (i.e., \eqn{0<t<T_c}) if a time at which the gene flow rate changed is specified with:\cr \tab -- \eqn{0<T_c<T_s} (as specified with \eqn{T_s>0} and \eqn{0<T_c<T_s} with the argument \code{time}). \cr \tab -- \eqn{M_c \not=M_p} (as specified with the argument \code{migration}). \cr \eqn{M_c=4N_1*m_c} \tab : The number of migrants exchanged each generation by the TWO populations since the split until the time of gene flow rate change (i.e., \eqn{T_c<t<T_s}). \cr \tab By default there is no change of gene flow rate since the split. \cr \tab * \eqn{M_c} is ignored unless: \cr \tab -- There is a population split and \eqn{0<T_c<T_s} (as specified with the argument \code{time}). \cr \tab -- \eqn{M_c \not=M_p} (as specified with the argument \code{migration}). } Where: \tabular{ll}{ \eqn{m_p} \tab : The generational fraction of migrant individuals at present. \cr \eqn{m_c} \tab : The generational fraction of migrant individuals between \eqn{T_c<t<T_s}. } By default the migration is assumed symmetrical but asymmetrical migration may be specified with the argument \code{extra} instead. } \item{extra}{ Use \code{extra} to add more complications to the model. This argument takes a string of characters with the extra \code{ms} tags to specify any model not possible with the other arguments. To use this argument, the user should be familiar with the documentation of Hudson's \code{ms} (\url{http://pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}). } \item{seeds}{ Use \code{seeds=c(seed1, seed2, seed3)} to specify a random seed to run the \R function \code{\link{ms}}. \code{seeds} is a vector of THREE integers. } }% end arguments \details{ The function \code{\link{cmd_line}} allows up to TWO populations to generate an IM model and a more complex model with a change in migration rate once since the split. \cr The gene flow rates are assumed symmetrical and constant over time. \cr With the argument \code{extra}, command lines for any possible \code{ms} model with any number of populations can be generated (see \url{http: //pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}). } \value{ The function \code{\link{cmd_line}} outputs a string of characters with the tags and values required to run the \R function \code{\link{ms}}. \cr The \code{ms}-like command line \code{cmdline} needs to have a minimum of FIVE "words" (The first word can be any string of characters without white space, but \code{\link{cmd_line}} outputs \code{"./msR"}): \cr \code{"./msR }\eqn{n}\code{ }\eqn{H}\code{ -t }\eqn{\theta*x*v*Z}\code{"}. } \note{ \item{ATTENTION: It is the user's responsibility to mind the following restrictions:}{ -> The user needs to be comfortable with the use of the C program \code{ms} and needs to be familiar with the documentation at \url{http://pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}. \cr -> \code{\link{cmd_line}} requires that \eqn{n>0} be specified with the argument \code{nsam} . \cr -> \code{\link{cmd_line}} requires that \eqn{\theta_1*x*v*Z>0} be specified with the argument \code{theta}. \cr -> \code{\link{cmd_line}} requires that \code{theta[i]}\eqn{>0} for any \eqn{i} \eqn{\in} \eqn{[1,3]} when specified. \cr -> If \eqn{H>1*10^5}, \code{\link{cmd_line}} requires that \code{howmany} be specified as a string of characters (e.g., \code{howmany="100000"}). \cr -> \code{\link{cmd_line}} requires that \code{rho} be a vector of TWO values. \cr -> If there are TWO populations (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}), \code{\link{cmd_line}} requires that \eqn{n=n_1+n_2} be specified with the argument \code{nsam}. \cr -> \code{\link{cmd_line}} requires that \eqn{M_p>0} be specified with the argument \code{migration} in case of an island model. \cr -> \code{\link{cmd_line}} requires \eqn{0}\eqn{\le}\eqn{T_c}\eqn{\le}\eqn{T_s} when specified with the argument \code{time}. } } \author{ Celine Becquet - \email{celine.becquet@gmail.com}. } \references{ Hudson, R. R., 1983. Properties of a neutral allele model with intragenic recombination. Theor. Popul. Biol. 23:183-201. \cr Hudson, R. R., 1990. Gene genealogies and the coalescent process, in D. Futuyma and J. Antonovics (eds), Oxford Surveys in Evolutionary Biology, Vol. 7:1-44. \cr Hudson, R. R., 2002. Generating samples under a Wright-Fisher neutral model of genetic variation. Bioinformatics 18:337-338. \cr \url{http://pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}. } \seealso{ The functions \code{\link{simulate_data}} and \code{\link{estimate_IMc}} call the function \code{\link{cmd_line}}. \cr The \R function \code{\link{ms}} uses the output of the function \code{\link{cmd_line}} as input. \cr Lists of definitions of the symbols and parameters mentioned in this file are found in \code{\link{Rmspack-package}}. } \examples{ ### Create the inputs for the function. np=c(2, 5, 6) # npop n1 n2. ns=np[2]+np[3] # total number of samples. h=2 # independent gene genealogies. s=c("1", "2", "3") # Seed numbers. th=c(5, 10) # 4Ne*mu*Z for pop1 and pop2, here theta2/Theta1=2. rh=c(1, 1000) # 4Ne*c*Z and Z, recombination rate and size of locus in bp. T=c(1, 0.5) # Time of divergence and time of migration rate change in unit of 4Ne generations. M=c(5, 0) # Migration rate until present and eM, the migration rate between T_div and T_change, forward in time. ## Generate a command for an IM model with a change in gene flow rate 0.5/4N_1 generations ago. cmd_line(nsam=ns, howmany=h, theta=th, rho=rh, structure=np, seeds=s, time=T, migration=M) ## Generate a command with a change in effective population size .5/4Ne generations ago. cmd_line(nsam=ns, howmany=h, theta=th, extra=c("-eN 0.5 2")) } \keyword{misc} \keyword{IO}
/2010_R_C_EstL/Rpackage_EstL/Rmspack/man/cmd_line.Rd
no_license
celinesf/personal
R
false
false
17,784
rd
\name{cmd_line} \alias{cmd_line} \title{ Function to generate ms-like command lines. } \description{ The function \code{\link{cmd_line}} takes values for the number of samples, the region-specific population mutation and recombination rates, the parameters of the demographic model to simulate... and generates the \code{ms}-like command line with the tags and values required as input by the \R function \code{\link{ms}}. \cr This function is called by the \R functions \code{\link{simulate_data}} and \code{\link{estimate_IMc}}. } \usage{ cmd_line(nsam, theta, howmany=1, rho=0, structure=1, time=0, migration=0, extra="NA", seeds="NA") } \arguments{ \item{}{\strong{REQUIRED ARGUMENTS:}} \item{nsam}{ \code{nsam=}\eqn{n} specifies the total number of chromosomes sampled for the genomic region considered. \cr ATTENTION: \code{\link{cmd_line}} requires that \eqn{n>0} be specified with the argument \code{nsam}. \cr \code{\link{cmd_line}} initiates the \code{ms} command line with the string of characters: \cr \code{"./msR }\eqn{n}\code{ }\eqn{H}\code{"}. \cr \eqn{H} is the number of independent data sets to simulate with different gene genealogy samples for the genomic region considered.\cr By default \eqn{H=1} unless it is specified with the argument \code{howmany=}\eqn{H>0}. \cr ATTENTION, if there are TWO populations (as specified with \code{structure[1]=2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}), \code{\link{cmd_line}} requires \code{nsam=}\eqn{n=n_1+n_2}. } \item{theta}{ ATTENTION: \code{\link{cmd_line}} requires that \eqn{\theta_1*x*v*Z>0} be specified with the argument \code{theta} (i.e., \code{theta}\eqn{\theta_1*x*v*Z}). \cr \code{theta} can be a vector of up to three floating numbers: \cr \code{theta=c(}\eqn{\theta_1*x*v*Z}\code{, }\eqn{\theta_2*x*v*Z}\code{, }\eqn{\theta_A*x*v*Z}\code{)}. \tabular{ll}{ \eqn{\theta_1*x*v*Z} \tab : The region-specific population mutation rate per generation for population 1. \cr \tab \code{\link{cmd_line}} adds the string of characters: \code{"}\code{-t }\eqn{\theta_1*x*v*Z}\code{"} to the \code{ms} command line, specifying the region-specific generational population mutation rate (required to run the \R function \code{\link{ms}}). \cr \eqn{\theta_2*x*v*Z} \tab : The region-specific population mutation rate per generation for population 2. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-n 2 }\eqn{N_2/N_1}\code{"} to the \code{ms} command line. \cr \tab \code{theta[2]} is ignored unless there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \eqn{\theta_A*x*v*Z} \tab : The region-specific ancestral population mutation rate per generation. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-eN }\eqn{T_s}\code{ }\eqn{N_A/N_1}\code{"} to the \code{ms} command line. \cr \tab \code{theta[3]} is ignored unless there is a population split (as specified with \eqn{T_s>0} with the argument \code{time}). } Where: \tabular{ll}{ \eqn{\theta_1=4N_1*\mu} \tab : The population mutation rate per bp per generation for population 1 (required). \cr \eqn{\theta_2=4N_2*\mu} \tab : The population mutation rate per bp per generation for population 2. \cr \eqn{\theta_A=4N_A*\mu} \tab : The ancestral population mutation rate per bp per generation. \cr \eqn{N_1} \tab : The effective population size in population 1 (the reference population so by default and unless specified, \eqn{N_1=N_2=N_A}). \cr \eqn{N_2} \tab : The effective population size in population 2. \cr \eqn{N_A} \tab : The ancestral effective population size. \cr \eqn{\mu} \tab : The genomic generational mutation rate per bp. \cr \eqn{x} \tab : The inheritance scalar for the genomic region considered (i.e., \code{"1"} for autosomal region, \code{"0.75"} for X- and \code{"0.5"} for Y- and mtDNA-linked region). \cr \eqn{v} \tab : The mutation rate scalar for the genomic region considered (which can be estimated e.g., from divergence data). \cr \eqn{Z} \tab : The size in bp of the genomic region considered. } ATTENTION: \code{\link{cmd_line}} requires that \code{theta[i]}\eqn{>0} for any \eqn{i} \eqn{\in} \eqn{[1,3]} when specified. }% end theta \item{}{\strong{OPTIONAL ARGUMENTS:}} \item{howmany}{ Use \code{howmany=}\eqn{H} to specify the number of independent gene genealogy samples to simulate for the genomic region considered.\cr \code{howmany=}\eqn{H=1} by default. \cr \code{\link{cmd_line}} adds \code{"}\eqn{H}\code{"} to the string of characters \code{"}\code{./msR }\eqn{n}\code{ }\eqn{H}\code{"}. \cr ATTENTION: If \eqn{H>1*10^5}, \code{\link{cmd_line}} requires that \code{howmany} be specified as a string of characters (e.g., \code{howmany="100000"}). } \item{rho}{ Use \code{rho=c(}\eqn{\rho*w*(Z-1)}\code{, }\eqn{Z}\code{)} to specify the region-specific population recombination rate per generation. \cr By default there is no recombination. \cr \code{\link{cmd_line}} adds the string of characters \code{"}\code{-r }\eqn{\rho*w*(Z-1)}\code{ }\eqn{Z}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to generate ancestral recombination graphs instead of gene genealogies.\cr Where, \tabular{ll}{ \eqn{\rho=4N_1*c} \tab : The genomic average population intra-region recombination rate per bp per generation. \cr \eqn{c} \tab : The generational cross-over rate per bp. \cr \eqn{w} \tab : The recombination scalar for the genomic region considered.\cr \tab \eqn{w=\beta} is the ratio of the region-specific population recombination rate per bp over \eqn{\rho=4N_1*c}.\cr \tab \eqn{\beta=}\code{"1"} (\code{"0.5"} in \emph{Drosophila}) for autosomal region, \code{"0.5"} for X- and \code{"0"} for Y- and mtDNA-linked region. } ATTENTION: \code{\link{cmd_line}} requires that \code{rho} be a vector of TWO values. } \item{structure}{ Use \code{structure=c(2, }\eqn{n_1}\code{, }\eqn{n_2}\code{)} to specify population structure in a model with at most TWO populations remaining at present. \cr By default, \code{structure=1}\eqn{1} to specify a model without structure. \cr \code{\link{cmd_line}} adds the string of characters \code{"}\code{-I 2 }\eqn{n_1}\code{ }\eqn{n_2}\code{ }\eqn{M_p}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to model population structure. \cr \tabular{ll}{ \eqn{n_1} \tab : The sample size from population 1 for the genomic region considered. \cr \tab \code{structure[2]} is ignored unless \code{structure[1]=}\eqn{2}. \cr \eqn{n_2} \tab : The sample size from population 2 for the genomic region considered.\cr \tab \code{structure[3]} is ignored unless \code{structure[1]=}\eqn{2}. } ATTENTION: \cr -> When there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}), \code{\link{cmd_line}} requires \code{nsam=}\eqn{n=n_1+n_2}. \cr -> \code{\link{cmd_line}} requires that \eqn{M_p>0} be specified with the argument \code{migration} in case of an island model (i.e., \eqn{T_s=0} when specified with the argument \code{time} or unspecified). \cr } \item{time}{ Use \code{time} to specify time of events. \cr \code{time} can take either one value (\code{time=}\eqn{T_s}) and up to TWO floating numbers: \cr \code{time=c(}\eqn{T_s}\code{, }\eqn{T_c}\code{)}. \tabular{ll}{ \eqn{T_s} \tab : The split time in unit of \eqn{4N_1} generations between the TWO populations. \cr \tab By default \eqn{T_s=0} to specify a model without population split. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-ej }\eqn{T_s}\code{ 2 1}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to model a population split. \cr \tab \code{time[1]} is ignored unless there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \eqn{T_c} \tab : The time at which the rate of gene flow changed between the two populations in unit of \eqn{4N_1} generations. \cr \tab By default there is no change of gene flow rate since the split. \cr \tab \code{\link{cmd_line}} adds the string of characters \code{"}\code{-eM }\eqn{T_c}\code{ }\eqn{M_c}\code{"} to the \code{ms} command line, instructing the \R function \code{\link{ms}} to change gene flow rate from \eqn{M_p} to \eqn{M_c} at time \eqn{T_c}, backward in time. \cr \tab * \eqn{T_c} is ignored unless: \cr \tab --- There is a population split and \eqn{0<T_c<T_s} (as specified with the argument \code{time}). \cr \tab --- \eqn{M_c \not=M_p} (as specified with the argument \code{migration}). } ATTENTION: \code{\link{cmd_line}} requires \eqn{0}\eqn{\le}\eqn{T_c}\eqn{\le}\eqn{T_s} when specified. } \item{migration}{ Use \code{migration} to specify symmetrical gene flow rates between TWO populations in the model. \cr By default there is no gene flow. \cr \code{migration} can take either one value (\code{migration=}\eqn{M_p}) and up to TWO floating numbers: \cr \code{migration=c(}\eqn{M_p}\code{, }\eqn{M_c}\code{)}. \tabular{ll}{ \eqn{M_p=4N_1*m_p} \tab : The number of migrants exchanged each generation by the TWO populations at present. \cr \tab \eqn{M_p} is ignored unless there is population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \tab \code{\link{cmd_line}} adds \code{"}\eqn{M_p}\code{"} to the string of characters \code{"}\code{-I 2 }\eqn{n_1}\code{ }\eqn{n_2}\code{ }\eqn{M_p}\code{"}. \cr \tab \eqn{M_p} has different definitions depending of the model considered:\cr \tab * \eqn{M_p} is the symmetrical rate of gene flow between two population in an island model (i.e., \eqn{0<t<\inf}) as specified with:\cr \tab -- A population structure (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}). \cr \tab -- Either \eqn{T_s=0} when specified with the argument \code{time} or unspecified.\cr \tab ATTENTION: \code{\link{cmd_line}} requires that \eqn{M_p>0} be specified in case of an island model. \cr \tab * \eqn{M_p} is the constant symmetrical rate of gene flow since the split until present (i.e., \eqn{0<t<T_s}) if there is a population split (as specified with \eqn{T_s>0} with the argument \code{time}).\cr \tab * \eqn{M_p} is the constant symmetrical rate of gene flow since the time of gene flow rate change until present (i.e., \eqn{0<t<T_c}) if a time at which the gene flow rate changed is specified with:\cr \tab -- \eqn{0<T_c<T_s} (as specified with \eqn{T_s>0} and \eqn{0<T_c<T_s} with the argument \code{time}). \cr \tab -- \eqn{M_c \not=M_p} (as specified with the argument \code{migration}). \cr \eqn{M_c=4N_1*m_c} \tab : The number of migrants exchanged each generation by the TWO populations since the split until the time of gene flow rate change (i.e., \eqn{T_c<t<T_s}). \cr \tab By default there is no change of gene flow rate since the split. \cr \tab * \eqn{M_c} is ignored unless: \cr \tab -- There is a population split and \eqn{0<T_c<T_s} (as specified with the argument \code{time}). \cr \tab -- \eqn{M_c \not=M_p} (as specified with the argument \code{migration}). } Where: \tabular{ll}{ \eqn{m_p} \tab : The generational fraction of migrant individuals at present. \cr \eqn{m_c} \tab : The generational fraction of migrant individuals between \eqn{T_c<t<T_s}. } By default the migration is assumed symmetrical but asymmetrical migration may be specified with the argument \code{extra} instead. } \item{extra}{ Use \code{extra} to add more complications to the model. This argument takes a string of characters with the extra \code{ms} tags to specify any model not possible with the other arguments. To use this argument, the user should be familiar with the documentation of Hudson's \code{ms} (\url{http://pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}). } \item{seeds}{ Use \code{seeds=c(seed1, seed2, seed3)} to specify a random seed to run the \R function \code{\link{ms}}. \code{seeds} is a vector of THREE integers. } }% end arguments \details{ The function \code{\link{cmd_line}} allows up to TWO populations to generate an IM model and a more complex model with a change in migration rate once since the split. \cr The gene flow rates are assumed symmetrical and constant over time. \cr With the argument \code{extra}, command lines for any possible \code{ms} model with any number of populations can be generated (see \url{http: //pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}). } \value{ The function \code{\link{cmd_line}} outputs a string of characters with the tags and values required to run the \R function \code{\link{ms}}. \cr The \code{ms}-like command line \code{cmdline} needs to have a minimum of FIVE "words" (The first word can be any string of characters without white space, but \code{\link{cmd_line}} outputs \code{"./msR"}): \cr \code{"./msR }\eqn{n}\code{ }\eqn{H}\code{ -t }\eqn{\theta*x*v*Z}\code{"}. } \note{ \item{ATTENTION: It is the user's responsibility to mind the following restrictions:}{ -> The user needs to be comfortable with the use of the C program \code{ms} and needs to be familiar with the documentation at \url{http://pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}. \cr -> \code{\link{cmd_line}} requires that \eqn{n>0} be specified with the argument \code{nsam} . \cr -> \code{\link{cmd_line}} requires that \eqn{\theta_1*x*v*Z>0} be specified with the argument \code{theta}. \cr -> \code{\link{cmd_line}} requires that \code{theta[i]}\eqn{>0} for any \eqn{i} \eqn{\in} \eqn{[1,3]} when specified. \cr -> If \eqn{H>1*10^5}, \code{\link{cmd_line}} requires that \code{howmany} be specified as a string of characters (e.g., \code{howmany="100000"}). \cr -> \code{\link{cmd_line}} requires that \code{rho} be a vector of TWO values. \cr -> If there are TWO populations (as specified with \code{structure[1]=}\eqn{2} and \eqn{n_1>0} and \eqn{n_2>0} with the argument \code{structure}), \code{\link{cmd_line}} requires that \eqn{n=n_1+n_2} be specified with the argument \code{nsam}. \cr -> \code{\link{cmd_line}} requires that \eqn{M_p>0} be specified with the argument \code{migration} in case of an island model. \cr -> \code{\link{cmd_line}} requires \eqn{0}\eqn{\le}\eqn{T_c}\eqn{\le}\eqn{T_s} when specified with the argument \code{time}. } } \author{ Celine Becquet - \email{celine.becquet@gmail.com}. } \references{ Hudson, R. R., 1983. Properties of a neutral allele model with intragenic recombination. Theor. Popul. Biol. 23:183-201. \cr Hudson, R. R., 1990. Gene genealogies and the coalescent process, in D. Futuyma and J. Antonovics (eds), Oxford Surveys in Evolutionary Biology, Vol. 7:1-44. \cr Hudson, R. R., 2002. Generating samples under a Wright-Fisher neutral model of genetic variation. Bioinformatics 18:337-338. \cr \url{http://pps-spud.uchicago.edu/~cbecquet/msdoc.pdf}. } \seealso{ The functions \code{\link{simulate_data}} and \code{\link{estimate_IMc}} call the function \code{\link{cmd_line}}. \cr The \R function \code{\link{ms}} uses the output of the function \code{\link{cmd_line}} as input. \cr Lists of definitions of the symbols and parameters mentioned in this file are found in \code{\link{Rmspack-package}}. } \examples{ ### Create the inputs for the function. np=c(2, 5, 6) # npop n1 n2. ns=np[2]+np[3] # total number of samples. h=2 # independent gene genealogies. s=c("1", "2", "3") # Seed numbers. th=c(5, 10) # 4Ne*mu*Z for pop1 and pop2, here theta2/Theta1=2. rh=c(1, 1000) # 4Ne*c*Z and Z, recombination rate and size of locus in bp. T=c(1, 0.5) # Time of divergence and time of migration rate change in unit of 4Ne generations. M=c(5, 0) # Migration rate until present and eM, the migration rate between T_div and T_change, forward in time. ## Generate a command for an IM model with a change in gene flow rate 0.5/4N_1 generations ago. cmd_line(nsam=ns, howmany=h, theta=th, rho=rh, structure=np, seeds=s, time=T, migration=M) ## Generate a command with a change in effective population size .5/4Ne generations ago. cmd_line(nsam=ns, howmany=h, theta=th, extra=c("-eN 0.5 2")) } \keyword{misc} \keyword{IO}
Newtons<-function(fun,x,ep=1e-5,it_max=100){ index<-0;k<-1 while(k<=it_max){ x1<-x;obj<-fun(x); x<-x-solve(obj$j,obj$f); norm<-sqrt((x-x1)%*%(x-x1)) if(norm<ep){ index<-1;break } k<-k+1 } obj<-fun(x) list(root=x,it=k,index=index,funVal=obj$f) } funs<-function(x){ f<-c(x[1]^2+x[2]^2-5,(x[1]+1)*x[2]-(3*x[1]+1)) j<-matrix(c(2*x[1],2*x[2],x[2]-3,x[1]+1),nrow=2,byrow=T) list(f=f,j=j) } Newtons(funs,c(0,1))
/test/test6.R
no_license
sakur0zxy/R-practice
R
false
false
496
r
Newtons<-function(fun,x,ep=1e-5,it_max=100){ index<-0;k<-1 while(k<=it_max){ x1<-x;obj<-fun(x); x<-x-solve(obj$j,obj$f); norm<-sqrt((x-x1)%*%(x-x1)) if(norm<ep){ index<-1;break } k<-k+1 } obj<-fun(x) list(root=x,it=k,index=index,funVal=obj$f) } funs<-function(x){ f<-c(x[1]^2+x[2]^2-5,(x[1]+1)*x[2]-(3*x[1]+1)) j<-matrix(c(2*x[1],2*x[2],x[2]-3,x[1]+1),nrow=2,byrow=T) list(f=f,j=j) } Newtons(funs,c(0,1))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ccle.R, R/get_pancan_value.R \name{get_ccle_cn_value} \alias{get_ccle_cn_value} \alias{get_ccle_gene_value} \alias{get_ccle_protein_value} \alias{get_ccle_mutation_status} \alias{get_pancan_value} \alias{get_pancan_gene_value} \alias{get_pancan_transcript_value} \alias{get_pancan_protein_value} \alias{get_pancan_mutation_status} \alias{get_pancan_cn_value} \alias{get_pancan_methylation_value} \alias{get_pancan_miRNA_value} \title{Fetch Identifier Value from Pan-cancer Dataset} \usage{ get_ccle_cn_value(identifier) get_ccle_gene_value(identifier) get_ccle_protein_value(identifier) get_ccle_mutation_status(identifier) get_pancan_value( identifier, subtype = NULL, dataset = NULL, host = available_hosts(), samples = NULL ) get_pancan_gene_value(identifier) get_pancan_transcript_value(identifier) get_pancan_protein_value(identifier) get_pancan_mutation_status(identifier) get_pancan_cn_value(identifier, use_thresholded_data = TRUE) get_pancan_methylation_value(identifier, type = c("450K", "27K")) get_pancan_miRNA_value(identifier) } \arguments{ \item{identifier}{a length-1 character representing a gene symbol, ensembl gene id, or probe id. Gene symbol is highly recommended.} \item{subtype}{a length-1 chracter representing a regular expression for matching \code{DataSubtype} column of \link[UCSCXenaTools:XenaData]{UCSCXenaTools::XenaData}.} \item{dataset}{a length-1 chracter representing a regular expression for matching \code{XenaDatasets} of \link[UCSCXenaTools:XenaData]{UCSCXenaTools::XenaData}.} \item{host}{a character vector representing host name(s), e.g. "toilHub".} \item{samples}{a character vector representing samples want to be returned.} \item{use_thresholded_data}{if \code{TRUE} (default), use GISTIC2-thresholded value.} \item{type}{methylation type, one of "450K" and "27K".} } \value{ a named vector or \code{list} } \description{ Identifier includes gene/probe etc. } \section{Functions}{ \itemize{ \item \code{get_ccle_cn_value}: Fetch copy number value from CCLE dataset \item \code{get_ccle_gene_value}: Fetch gene expression value from CCLE dataset \item \code{get_ccle_protein_value}: Fetch gene protein expression value from CCLE dataset \item \code{get_ccle_mutation_status}: Fetch gene mutation info from CCLE dataset \item \code{get_pancan_value}: Fetch identifier value from pan-cancer dataset \item \code{get_pancan_gene_value}: Fetch gene expression value from pan-cancer dataset \item \code{get_pancan_transcript_value}: Fetch gene transcript expression value from pan-cancer dataset \item \code{get_pancan_protein_value}: Fetch protein expression value from pan-cancer dataset \item \code{get_pancan_mutation_status}: Fetch mutation status value from pan-cancer dataset \item \code{get_pancan_cn_value}: Fetch gene copy number value from pan-cancer dataset processed by GISTIC 2.0 \item \code{get_pancan_methylation_value}: Fetch gene expression value from CCLE dataset \item \code{get_pancan_miRNA_value}: Fetch miRNA expression value from pan-cancer dataset }} \examples{ \dontrun{ # Fetch TP53 expression value from pan-cancer dataset t1 <- get_pancan_value("TP53", dataset = "TcgaTargetGtex_rsem_isoform_tpm", host = "toilHub" ) t2 <- get_pancan_gene_value("TP53") t3 <- get_pancan_protein_value("AKT") t4 <- get_pancan_mutation_status("TP53") t5 <- get_pancan_cn_value("TP53") } }
/man/get_pancan_value.Rd
permissive
fei0810/UCSCXenaShiny
R
false
true
3,460
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ccle.R, R/get_pancan_value.R \name{get_ccle_cn_value} \alias{get_ccle_cn_value} \alias{get_ccle_gene_value} \alias{get_ccle_protein_value} \alias{get_ccle_mutation_status} \alias{get_pancan_value} \alias{get_pancan_gene_value} \alias{get_pancan_transcript_value} \alias{get_pancan_protein_value} \alias{get_pancan_mutation_status} \alias{get_pancan_cn_value} \alias{get_pancan_methylation_value} \alias{get_pancan_miRNA_value} \title{Fetch Identifier Value from Pan-cancer Dataset} \usage{ get_ccle_cn_value(identifier) get_ccle_gene_value(identifier) get_ccle_protein_value(identifier) get_ccle_mutation_status(identifier) get_pancan_value( identifier, subtype = NULL, dataset = NULL, host = available_hosts(), samples = NULL ) get_pancan_gene_value(identifier) get_pancan_transcript_value(identifier) get_pancan_protein_value(identifier) get_pancan_mutation_status(identifier) get_pancan_cn_value(identifier, use_thresholded_data = TRUE) get_pancan_methylation_value(identifier, type = c("450K", "27K")) get_pancan_miRNA_value(identifier) } \arguments{ \item{identifier}{a length-1 character representing a gene symbol, ensembl gene id, or probe id. Gene symbol is highly recommended.} \item{subtype}{a length-1 chracter representing a regular expression for matching \code{DataSubtype} column of \link[UCSCXenaTools:XenaData]{UCSCXenaTools::XenaData}.} \item{dataset}{a length-1 chracter representing a regular expression for matching \code{XenaDatasets} of \link[UCSCXenaTools:XenaData]{UCSCXenaTools::XenaData}.} \item{host}{a character vector representing host name(s), e.g. "toilHub".} \item{samples}{a character vector representing samples want to be returned.} \item{use_thresholded_data}{if \code{TRUE} (default), use GISTIC2-thresholded value.} \item{type}{methylation type, one of "450K" and "27K".} } \value{ a named vector or \code{list} } \description{ Identifier includes gene/probe etc. } \section{Functions}{ \itemize{ \item \code{get_ccle_cn_value}: Fetch copy number value from CCLE dataset \item \code{get_ccle_gene_value}: Fetch gene expression value from CCLE dataset \item \code{get_ccle_protein_value}: Fetch gene protein expression value from CCLE dataset \item \code{get_ccle_mutation_status}: Fetch gene mutation info from CCLE dataset \item \code{get_pancan_value}: Fetch identifier value from pan-cancer dataset \item \code{get_pancan_gene_value}: Fetch gene expression value from pan-cancer dataset \item \code{get_pancan_transcript_value}: Fetch gene transcript expression value from pan-cancer dataset \item \code{get_pancan_protein_value}: Fetch protein expression value from pan-cancer dataset \item \code{get_pancan_mutation_status}: Fetch mutation status value from pan-cancer dataset \item \code{get_pancan_cn_value}: Fetch gene copy number value from pan-cancer dataset processed by GISTIC 2.0 \item \code{get_pancan_methylation_value}: Fetch gene expression value from CCLE dataset \item \code{get_pancan_miRNA_value}: Fetch miRNA expression value from pan-cancer dataset }} \examples{ \dontrun{ # Fetch TP53 expression value from pan-cancer dataset t1 <- get_pancan_value("TP53", dataset = "TcgaTargetGtex_rsem_isoform_tpm", host = "toilHub" ) t2 <- get_pancan_gene_value("TP53") t3 <- get_pancan_protein_value("AKT") t4 <- get_pancan_mutation_status("TP53") t5 <- get_pancan_cn_value("TP53") } }
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- function(inverse) inv <<- inverse getInverse <- function() inv list(set = set , get = get , setInverse = setInverse , getInverse = getInverse) ## Write a short comment describing this function cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' inv <- x$getInverse() if (!is.null(inv)) { message("getting cached data") return(inv) } mat <- x$get() inv <- solve(mat , ...) x$setInverse(inv) inv }
/cachematrix.R
no_license
Samira-frd/ProgrammingAssignment2
R
false
false
927
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- function(inverse) inv <<- inverse getInverse <- function() inv list(set = set , get = get , setInverse = setInverse , getInverse = getInverse) ## Write a short comment describing this function cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' inv <- x$getInverse() if (!is.null(inv)) { message("getting cached data") return(inv) } mat <- x$get() inv <- solve(mat , ...) x$setInverse(inv) inv }
### Lista 03 ################################################################### # Aluno: Manuel Ferreira Junior # Disciplina: Series Temporais library(urca) # DUVIDA 1 - SOBRE DEFASAGENS************* ##### defasagens #gerando modelo AR(1), \phi=0.7, tamanho da série igual a 100. y =arima.sim(list(order = c(1,0,0), ar = 0.7), n = 100) y = numeric(100) yt = numeric(100) et = rnorm(100) for (i in 2:100){ y[i] = 0.5*y[i-1] + et[i] yt[i] = 1*yt[i-1] + et[i] } par(mfrow = c(1,2)) plot(y[3:100], y[1:98]) plot(yt[3:100], yt[1:98]) #defasagem igual a 1, ou seja, y_{t-1} y.1 = lag(y,-1) y.1[1:10] #defasagem igual a 2, ou seja, y_{t-2} y.2 = lag(y,-2) y.2[1:10] #defasagem igual a 3, ou seja, y_{t-3} y.3 = lag(y,-3) y.3[1:10] # concatenando a serie temporal e # as defasagens cbind(y, y.1, y.2, y.3) ### Agora vamos encontrar as correlações #tamanho da série n=length(y) n #inicio da serie start.y=1 start.y #correlação (*) cor(y[1:99], y.1[2:100]) cor(y[1:98], y.2[3:100]) cor(y[1:97], y.2[4:100]) cor(y[1:96], y.2[5:100]) cor(y[1:95], y.2[6:100]) #plot (**) pacf(y) # acf(y)$acf # valores das correlações (***) pacf(y)$acf # agora, pessoal, olhem os valores das correlações que # estão em (*) e compare com os valores de (**) e (***) # Notem ainda, pessoal, que os valores que estão na # linha pontilhada de (**) são os limites de confiança (aproximados) # de 95% (mais ou menos 2/sqrt(tamanho.da.serie)). # Nesse exemplo, temos mais ou menos 2/sqrt(100) # *********DUVIDA 2 - SOBRE GERAÇÃO DE MODELOS AR/MA/ARMA ************* arima.sim(n = 100, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488))) # *********DUVIDA 3 - modelo MA(2) - covariância ************* # (enviarei as contas)
/Prova 01/listas/lista03.R
no_license
Manuelfjr/ST
R
false
false
1,769
r
### Lista 03 ################################################################### # Aluno: Manuel Ferreira Junior # Disciplina: Series Temporais library(urca) # DUVIDA 1 - SOBRE DEFASAGENS************* ##### defasagens #gerando modelo AR(1), \phi=0.7, tamanho da série igual a 100. y =arima.sim(list(order = c(1,0,0), ar = 0.7), n = 100) y = numeric(100) yt = numeric(100) et = rnorm(100) for (i in 2:100){ y[i] = 0.5*y[i-1] + et[i] yt[i] = 1*yt[i-1] + et[i] } par(mfrow = c(1,2)) plot(y[3:100], y[1:98]) plot(yt[3:100], yt[1:98]) #defasagem igual a 1, ou seja, y_{t-1} y.1 = lag(y,-1) y.1[1:10] #defasagem igual a 2, ou seja, y_{t-2} y.2 = lag(y,-2) y.2[1:10] #defasagem igual a 3, ou seja, y_{t-3} y.3 = lag(y,-3) y.3[1:10] # concatenando a serie temporal e # as defasagens cbind(y, y.1, y.2, y.3) ### Agora vamos encontrar as correlações #tamanho da série n=length(y) n #inicio da serie start.y=1 start.y #correlação (*) cor(y[1:99], y.1[2:100]) cor(y[1:98], y.2[3:100]) cor(y[1:97], y.2[4:100]) cor(y[1:96], y.2[5:100]) cor(y[1:95], y.2[6:100]) #plot (**) pacf(y) # acf(y)$acf # valores das correlações (***) pacf(y)$acf # agora, pessoal, olhem os valores das correlações que # estão em (*) e compare com os valores de (**) e (***) # Notem ainda, pessoal, que os valores que estão na # linha pontilhada de (**) são os limites de confiança (aproximados) # de 95% (mais ou menos 2/sqrt(tamanho.da.serie)). # Nesse exemplo, temos mais ou menos 2/sqrt(100) # *********DUVIDA 2 - SOBRE GERAÇÃO DE MODELOS AR/MA/ARMA ************* arima.sim(n = 100, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488))) # *********DUVIDA 3 - modelo MA(2) - covariância ************* # (enviarei as contas)
#!/usr/bin/env Rscript source("SQLShareLib.R") #get the interaction energies between residue types getInteractionEnergy <- function(dataset, username=FALSE, random=FALSE, glycine=FALSE, cystine=FALSE, countMatrix=fetchContacts(paste(paste(dataset,"backbone","contacts", sep="_"), "csv" ,sep="."), username)) { #re-order it anames <- colnames(countMatrix[-c(1,2)]) aanum <- length(anames) anames.ord <- order(anames) countMatrix <- countMatrix[c(1,2,anames.ord + 2)] #sum it contactMatrix <- sampleContacts(countMatrix, random=random) contactMatrix[1:aanum,] <- contactMatrix[order(rownames(contactMatrix)[1:aanum]),] rownames(contactMatrix) <- c(sort(rownames(contactMatrix)[1:aanum]), rownames(contactMatrix)[-(1:aanum)]) #Adjust sums, so that pairs which were double counted or multiple pairings are fixed for(i in 1:aanum) { contactMatrix[1:aanum,i] <- contactMatrix[1:aanum,i] * (contactMatrix["TOTAL", i] - contactMatrix["FREE", i]) / sum(contactMatrix[1:aanum,i]) } #Make it symmetric contactMatrix[1:aanum, 1:aanum] <- (contactMatrix[1:aanum,1:aanum] + t(contactMatrix[1:aanum, 1:aanum])) / 2 #normalize it so all events sum to 1 normRows <- c(1:aanum, which(rownames(contactMatrix) == "FREE")) contactMatrix[normRows, 1:aanum] <- contactMatrix[normRows, 1:aanum] / sum(contactMatrix[normRows, 1:aanum]) #Get the categories to consider aromatic <- c("PHE", "TYR", "TRP") polar <- c("SER", "THR", "PRO", "ASN", "GLN", "GLY") charged <- c("GLU", "LYS", "ARG", "ASP", "HIS") hydrophobic <- c("ALA", "VAL", "LEU", "ILE", "MET") categories <- list(Aromatic=aromatic, Polar=polar, Charged=charged, Hydrophobic=hydrophobic) #make it relative to being a free residue mat <- matrix(rep(0, aanum * (aanum + length(categories))), nrow=aanum + length(categories)) rownames(mat) <- c(sort(anames), names(categories)) colnames(mat) <- sort(anames) for(i in 1:aanum) { for(j in 1:aanum) { mat[i,j] <- contactMatrix[i,j] / (sum(contactMatrix[1:aanum,i]) * sum( contactMatrix[1:aanum, j])) } } for(i in 1:length(categories)) { for(j in 1:aanum) { mat[names(categories)[i] ,j] <- sum(contactMatrix[j,categories[[i]]]) / (sum(sapply(categories[[i]], function(x) {contactMatrix[1:aanum,x]})) * sum( contactMatrix[1:aanum, j])) } } mat <- -log(mat) #make glycine 0, if wanted if(!glycine) { mat["GLY", ] <- 0 mat[,"GLY"] <- 0 } #make cystine 0, if wanted if(!cystine) { mat["CYS", ] <- 0 mat[ ,"CYS"] <- 0 } return(mat) }
/ProtLib.R
no_license
whitead/psurf
R
false
false
2,573
r
#!/usr/bin/env Rscript source("SQLShareLib.R") #get the interaction energies between residue types getInteractionEnergy <- function(dataset, username=FALSE, random=FALSE, glycine=FALSE, cystine=FALSE, countMatrix=fetchContacts(paste(paste(dataset,"backbone","contacts", sep="_"), "csv" ,sep="."), username)) { #re-order it anames <- colnames(countMatrix[-c(1,2)]) aanum <- length(anames) anames.ord <- order(anames) countMatrix <- countMatrix[c(1,2,anames.ord + 2)] #sum it contactMatrix <- sampleContacts(countMatrix, random=random) contactMatrix[1:aanum,] <- contactMatrix[order(rownames(contactMatrix)[1:aanum]),] rownames(contactMatrix) <- c(sort(rownames(contactMatrix)[1:aanum]), rownames(contactMatrix)[-(1:aanum)]) #Adjust sums, so that pairs which were double counted or multiple pairings are fixed for(i in 1:aanum) { contactMatrix[1:aanum,i] <- contactMatrix[1:aanum,i] * (contactMatrix["TOTAL", i] - contactMatrix["FREE", i]) / sum(contactMatrix[1:aanum,i]) } #Make it symmetric contactMatrix[1:aanum, 1:aanum] <- (contactMatrix[1:aanum,1:aanum] + t(contactMatrix[1:aanum, 1:aanum])) / 2 #normalize it so all events sum to 1 normRows <- c(1:aanum, which(rownames(contactMatrix) == "FREE")) contactMatrix[normRows, 1:aanum] <- contactMatrix[normRows, 1:aanum] / sum(contactMatrix[normRows, 1:aanum]) #Get the categories to consider aromatic <- c("PHE", "TYR", "TRP") polar <- c("SER", "THR", "PRO", "ASN", "GLN", "GLY") charged <- c("GLU", "LYS", "ARG", "ASP", "HIS") hydrophobic <- c("ALA", "VAL", "LEU", "ILE", "MET") categories <- list(Aromatic=aromatic, Polar=polar, Charged=charged, Hydrophobic=hydrophobic) #make it relative to being a free residue mat <- matrix(rep(0, aanum * (aanum + length(categories))), nrow=aanum + length(categories)) rownames(mat) <- c(sort(anames), names(categories)) colnames(mat) <- sort(anames) for(i in 1:aanum) { for(j in 1:aanum) { mat[i,j] <- contactMatrix[i,j] / (sum(contactMatrix[1:aanum,i]) * sum( contactMatrix[1:aanum, j])) } } for(i in 1:length(categories)) { for(j in 1:aanum) { mat[names(categories)[i] ,j] <- sum(contactMatrix[j,categories[[i]]]) / (sum(sapply(categories[[i]], function(x) {contactMatrix[1:aanum,x]})) * sum( contactMatrix[1:aanum, j])) } } mat <- -log(mat) #make glycine 0, if wanted if(!glycine) { mat["GLY", ] <- 0 mat[,"GLY"] <- 0 } #make cystine 0, if wanted if(!cystine) { mat["CYS", ] <- 0 mat[ ,"CYS"] <- 0 } return(mat) }
library(glmnet) mydata = read.table("./TrainingSet/ReliefF/cervix.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.85,family="gaussian",standardize=FALSE) sink('./Model/EN/ReliefF/cervix/cervix_086.txt',append=TRUE) print(glm$glmnet.fit) sink()
/Model/EN/ReliefF/cervix/cervix_086.R
no_license
leon1003/QSMART
R
false
false
353
r
library(glmnet) mydata = read.table("./TrainingSet/ReliefF/cervix.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.85,family="gaussian",standardize=FALSE) sink('./Model/EN/ReliefF/cervix/cervix_086.txt',append=TRUE) print(glm$glmnet.fit) sink()
setwd("C:/Users/HP/Desktop/AnalytixLabs/R_Language/R Case Studies_Sharable/CaseStudy_R_Visualizations/CaseStudy_R_Visualizations") sales <- read.csv("SalesData.csv") head(sales) str(sales) ## Required library library(dplyr) library(ggplot2) library(plotly) library(reshape2) library(plotrix) ## 1. Compare Sales by region for 2016 with 2015 using bar chart Res1 <- sales %>% group_by(Region) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res1 <- reshape2::melt(Res1,id.vars= "Region",variable.name="Year",value.name="sales") plot1 <- ggplot(Res1)+aes(x=Region,y=sales,fill=Year)+geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot1) ## 2. What are the contributing factors to the sales for each region in 2016. Visualize it using a Pie Chart. ### For 3D Pie Chart ### install.packages("plotrix") Res2 <- sales %>% group_by(Region) %>% dplyr::summarise(Total_Sales2016=sum(Sales2016)) pct <- round(Res2$Total_Sales2016/sum(Res2$Total_Sales2016)*100) labels <- paste(pct,"%",":",c("Central","East","West")) par(mfrow = c(1,2)) pie(Res2$Total_Sales2016,labels=labels,main="Pie chart of Sales in 2016") pie3D(Res2$Total_Sales2016,labels=labels,explode=0.1,main="Pie chart of Sales in 2016") ## 3. Compare the total sales of 2015 and 2016 with respect to Region and Tiers Res3 <- sales %>% group_by(Region,Tier) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res3 <- reshape2::melt(Res3,id.vars= c("Region","Tier"),variable.name="Year",value.name="sales") plot3 <- ggplot(Res3)+ aes(x=Tier,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge")+ facet_grid(.~Region) plotly::ggplotly(plot3) ## 4. In East region, which state registered a decline in 2016 as compared to 2015? Res4 <- sales %>% group_by(Region,State) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res4 <- Res4[Res4$Region=="East",] Res4 <- reshape2::melt(Res4,id.vars= c("Region","State"),variable.name="Year",value.name="sales") plot4 <- ggplot(Res4)+ aes(x=State,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot4) ## 5. In all the High tier, which Division saw a decline in number of units sold in 2016 compared to 2015? Res5 <- sales %>% group_by(Tier,Division) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res5 <- Res5[Res5$Tier=="High",] Res5 <- reshape2::melt(Res5,id.vars= c("Tier","Division"),variable.name="Year",value.name="sales") plot5 <- ggplot(Res5)+ aes(x=Division,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot5) ## 6. Create a new column Qtr using ifelse() or any suitable utility in the imported dataset. ## The Quarters are based on months and defined as sales$Qtr <- ifelse(sales$Month%in% c("Jan","Feb","Mar"),"Q1", ifelse(sales$Month%in% c("Apr","May","Jun"),"Q2", ifelse(sales$Month%in% c("Jul","Aug","Sep"),"Q3","Q4"))) ## 7. Compare Qtr wise sales in 2015 and 2016 in a bar plot Res7 <- sales %>% group_by(Qtr) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res7 <- reshape2::melt(Res7,id.vars= "Qtr",variable.name="Year",value.name="sales") plot7 <- ggplot(Res7)+ aes(x=Qtr,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot7) ## 8. Determine the composition of Qtr wise sales in and 2016 with regards to all the Tiers in a pie chart. #(Draw 4 pie charts representing a Quarter for each Tier) Res8 <- sales %>% group_by(Qtr,Tier) %>% dplyr::summarise(TotalSales2016=sum(Sales2016)) Res8<- reshape2::melt(Res8,id.vars= c("Qtr","Tier"),variable.name="Year",value.name="sales") ggplot(Res8, aes(x = factor(1), y = sales, fill = factor(Tier))) + geom_bar(stat = "identity", width = 1) + coord_polar(theta = "y") + facet_wrap(~Qtr) ## Save in EData formate save.image(file = "~/R Data Visualization Case Study.RData")
/Data Visualizations/Data Visualization.R
no_license
mayankverma01/Data-Visualizations-and-Analysis-usingR-Language
R
false
false
4,113
r
setwd("C:/Users/HP/Desktop/AnalytixLabs/R_Language/R Case Studies_Sharable/CaseStudy_R_Visualizations/CaseStudy_R_Visualizations") sales <- read.csv("SalesData.csv") head(sales) str(sales) ## Required library library(dplyr) library(ggplot2) library(plotly) library(reshape2) library(plotrix) ## 1. Compare Sales by region for 2016 with 2015 using bar chart Res1 <- sales %>% group_by(Region) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res1 <- reshape2::melt(Res1,id.vars= "Region",variable.name="Year",value.name="sales") plot1 <- ggplot(Res1)+aes(x=Region,y=sales,fill=Year)+geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot1) ## 2. What are the contributing factors to the sales for each region in 2016. Visualize it using a Pie Chart. ### For 3D Pie Chart ### install.packages("plotrix") Res2 <- sales %>% group_by(Region) %>% dplyr::summarise(Total_Sales2016=sum(Sales2016)) pct <- round(Res2$Total_Sales2016/sum(Res2$Total_Sales2016)*100) labels <- paste(pct,"%",":",c("Central","East","West")) par(mfrow = c(1,2)) pie(Res2$Total_Sales2016,labels=labels,main="Pie chart of Sales in 2016") pie3D(Res2$Total_Sales2016,labels=labels,explode=0.1,main="Pie chart of Sales in 2016") ## 3. Compare the total sales of 2015 and 2016 with respect to Region and Tiers Res3 <- sales %>% group_by(Region,Tier) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res3 <- reshape2::melt(Res3,id.vars= c("Region","Tier"),variable.name="Year",value.name="sales") plot3 <- ggplot(Res3)+ aes(x=Tier,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge")+ facet_grid(.~Region) plotly::ggplotly(plot3) ## 4. In East region, which state registered a decline in 2016 as compared to 2015? Res4 <- sales %>% group_by(Region,State) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res4 <- Res4[Res4$Region=="East",] Res4 <- reshape2::melt(Res4,id.vars= c("Region","State"),variable.name="Year",value.name="sales") plot4 <- ggplot(Res4)+ aes(x=State,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot4) ## 5. In all the High tier, which Division saw a decline in number of units sold in 2016 compared to 2015? Res5 <- sales %>% group_by(Tier,Division) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res5 <- Res5[Res5$Tier=="High",] Res5 <- reshape2::melt(Res5,id.vars= c("Tier","Division"),variable.name="Year",value.name="sales") plot5 <- ggplot(Res5)+ aes(x=Division,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot5) ## 6. Create a new column Qtr using ifelse() or any suitable utility in the imported dataset. ## The Quarters are based on months and defined as sales$Qtr <- ifelse(sales$Month%in% c("Jan","Feb","Mar"),"Q1", ifelse(sales$Month%in% c("Apr","May","Jun"),"Q2", ifelse(sales$Month%in% c("Jul","Aug","Sep"),"Q3","Q4"))) ## 7. Compare Qtr wise sales in 2015 and 2016 in a bar plot Res7 <- sales %>% group_by(Qtr) %>% dplyr::summarise(TotalSales2015=sum(Sales2015),TotalSales2016=sum(Sales2016)) Res7 <- reshape2::melt(Res7,id.vars= "Qtr",variable.name="Year",value.name="sales") plot7 <- ggplot(Res7)+ aes(x=Qtr,y=sales,fill=Year)+ geom_bar(stat = "identity",position = "dodge") plotly::ggplotly(plot7) ## 8. Determine the composition of Qtr wise sales in and 2016 with regards to all the Tiers in a pie chart. #(Draw 4 pie charts representing a Quarter for each Tier) Res8 <- sales %>% group_by(Qtr,Tier) %>% dplyr::summarise(TotalSales2016=sum(Sales2016)) Res8<- reshape2::melt(Res8,id.vars= c("Qtr","Tier"),variable.name="Year",value.name="sales") ggplot(Res8, aes(x = factor(1), y = sales, fill = factor(Tier))) + geom_bar(stat = "identity", width = 1) + coord_polar(theta = "y") + facet_wrap(~Qtr) ## Save in EData formate save.image(file = "~/R Data Visualization Case Study.RData")
####################################################################################### ### source in the setup.R script using the path on your computer source('setup.R') ### Load data load('analysisData.rda') # Bring in upperincome data load('upperIncomeData.rda') ui = modelData[,c('cname', 'upperincome', 'oecd')] %>% unique() toDrop = setdiff(aData$cname, modelData$cname) aData = aData[which(!aData$cname %in% toDrop),] # Subset to post 1987 aData = aData[aData$year>=1987,] ####################################################################################### ############################################################################### # Cross-validation # Model setup # Set up models dv='propRights_Fraser'; dvName='Property Rights (Fraser)'; fileFE='LpropRightsFraserFE.rda' ; yrRange = 2000:2010; crossValFileName = 'crossValLevel_fraser.tex'; ylabBrk = seq(2000,2010,2) # dispute var ivDisp = c( 'mvs2_iDispB', 'mvs5_iDispB','iDispBC' ) # Other covariates ivOther=c( 'gdpGr' ,'gdpCapLog' ,'popLog' ,'inflLog' , 'intConf' ,'extConf' ,'rbitNoDuplC' ,'kaopen' ,'polity' ) # Untrans IVs ivs=c(ivDisp, ivOther) ivAll=lapply(ivDisp, function(x) FUN= c( lagLab(x,1), lagLab(ivOther,1) ) ) ########## # Sample assessment dvSamp = aData[,c('ccode','year',dv, unique(unlist(ivAll)))] %>% na.omit() length(unique(dvSamp$ccode)) summary(dvSamp$year) ########## modForm=lapply(ivAll, function(x){ as.formula( paste(dv, paste(x, collapse=' + '), sep=' ~ ') ) }) ############################################################################### ############################################################################### # Run yearly models yrs=yrRange coefCross=NULL for(ii in 1:length(yrs)){ # By year slice=aData[which(aData$year == yrs[ii]), ] regData=slice[,c('ccode','year',dv, unique(unlist(ivAll)))] %>% na.omit() mult = lapply(ivAll, function(x){ sd(regData[,x[1]])/sd(regData[,dv]) }) modResults=lapply(modForm, function(x) FUN=lm(x, data=regData) ) modSumm=lapply(modResults, function(x) FUN=coeftest(x)) # Combining results dispSumm=do.call(rbind, lapply(1:length(modSumm),function(x){ if( sum( grepl(c('ispB'), rownames(modSumm[[x]])) ) == 0 ){ missVar = modResults[[x]] $model %>% names() %>% .[2] empty = matrix(NA, nrow=1, ncol=4, dimnames=list(missVar, NULL)) return(empty) } betaStats=modSumm[[x]][2,,drop=FALSE] betaStats[1:2]=betaStats[1:2]*mult[[x]] return(betaStats) } ) ) dispSumm=dispSumm[which(rownames(dispSumm) %in% lagLab(ivDisp, 1)), ] coefCross=rbind(coefCross, cbind(dispSumm,cross=yrs[ii])) } ############################################################################### ############################################################################### # Plotting VARS=unique(rownames(coefCross)) VARSname=c( 'ICSID (past two years)','ICSID (past five years)','Cumulative ICSID$_{t-1}$' ) tmp = ggcoefplot(coefData=coefCross, vars=VARS, varNames=VARSname, Noylabel=FALSE, coordFlip=FALSE, revVar=FALSE, facet=TRUE, facetColor=FALSE, colorGrey=FALSE, facetName='cross', facetDim=c(2,3), facetBreaks=yrs, facetLabs=yrs, allBlack=FALSE ) tmp=tmp + ylab('$\\beta$ for Dispute Variables') + scale_x_discrete(breaks=ylabBrk,labels=ylabBrk) tmp=tmp + theme(axis.title.y=element_text(vjust=1)) tmp = tmp + theme_bw() tmp = tmp + theme( legend.position='none', panel.border=element_blank(), axis.ticks=element_blank(), axis.text.x=element_text(angle=45) ) ggsave(tmp, file='fig7.pdf',width=8,height=3.5) ###############################################################################
/replicationArchive/fig7.R
no_license
s7minhas/disputesReputation
R
false
false
3,610
r
####################################################################################### ### source in the setup.R script using the path on your computer source('setup.R') ### Load data load('analysisData.rda') # Bring in upperincome data load('upperIncomeData.rda') ui = modelData[,c('cname', 'upperincome', 'oecd')] %>% unique() toDrop = setdiff(aData$cname, modelData$cname) aData = aData[which(!aData$cname %in% toDrop),] # Subset to post 1987 aData = aData[aData$year>=1987,] ####################################################################################### ############################################################################### # Cross-validation # Model setup # Set up models dv='propRights_Fraser'; dvName='Property Rights (Fraser)'; fileFE='LpropRightsFraserFE.rda' ; yrRange = 2000:2010; crossValFileName = 'crossValLevel_fraser.tex'; ylabBrk = seq(2000,2010,2) # dispute var ivDisp = c( 'mvs2_iDispB', 'mvs5_iDispB','iDispBC' ) # Other covariates ivOther=c( 'gdpGr' ,'gdpCapLog' ,'popLog' ,'inflLog' , 'intConf' ,'extConf' ,'rbitNoDuplC' ,'kaopen' ,'polity' ) # Untrans IVs ivs=c(ivDisp, ivOther) ivAll=lapply(ivDisp, function(x) FUN= c( lagLab(x,1), lagLab(ivOther,1) ) ) ########## # Sample assessment dvSamp = aData[,c('ccode','year',dv, unique(unlist(ivAll)))] %>% na.omit() length(unique(dvSamp$ccode)) summary(dvSamp$year) ########## modForm=lapply(ivAll, function(x){ as.formula( paste(dv, paste(x, collapse=' + '), sep=' ~ ') ) }) ############################################################################### ############################################################################### # Run yearly models yrs=yrRange coefCross=NULL for(ii in 1:length(yrs)){ # By year slice=aData[which(aData$year == yrs[ii]), ] regData=slice[,c('ccode','year',dv, unique(unlist(ivAll)))] %>% na.omit() mult = lapply(ivAll, function(x){ sd(regData[,x[1]])/sd(regData[,dv]) }) modResults=lapply(modForm, function(x) FUN=lm(x, data=regData) ) modSumm=lapply(modResults, function(x) FUN=coeftest(x)) # Combining results dispSumm=do.call(rbind, lapply(1:length(modSumm),function(x){ if( sum( grepl(c('ispB'), rownames(modSumm[[x]])) ) == 0 ){ missVar = modResults[[x]] $model %>% names() %>% .[2] empty = matrix(NA, nrow=1, ncol=4, dimnames=list(missVar, NULL)) return(empty) } betaStats=modSumm[[x]][2,,drop=FALSE] betaStats[1:2]=betaStats[1:2]*mult[[x]] return(betaStats) } ) ) dispSumm=dispSumm[which(rownames(dispSumm) %in% lagLab(ivDisp, 1)), ] coefCross=rbind(coefCross, cbind(dispSumm,cross=yrs[ii])) } ############################################################################### ############################################################################### # Plotting VARS=unique(rownames(coefCross)) VARSname=c( 'ICSID (past two years)','ICSID (past five years)','Cumulative ICSID$_{t-1}$' ) tmp = ggcoefplot(coefData=coefCross, vars=VARS, varNames=VARSname, Noylabel=FALSE, coordFlip=FALSE, revVar=FALSE, facet=TRUE, facetColor=FALSE, colorGrey=FALSE, facetName='cross', facetDim=c(2,3), facetBreaks=yrs, facetLabs=yrs, allBlack=FALSE ) tmp=tmp + ylab('$\\beta$ for Dispute Variables') + scale_x_discrete(breaks=ylabBrk,labels=ylabBrk) tmp=tmp + theme(axis.title.y=element_text(vjust=1)) tmp = tmp + theme_bw() tmp = tmp + theme( legend.position='none', panel.border=element_blank(), axis.ticks=element_blank(), axis.text.x=element_text(angle=45) ) ggsave(tmp, file='fig7.pdf',width=8,height=3.5) ###############################################################################
# 1. calibrate_reconstructions ----------- #' Calibrate using reconstructed shapes #' #' Calculate and displays reconstructed shapes using a #' range of harmonic number. Compare them visually with the maximal fit. #' #' @param x the \code{Coo} object on which to calibrate_reconstructions #' @param method any method from \code{c('efourier', 'rfourier', 'tfourier')} #' for \code{Out}, or from \code{c('opoly', 'npoly', 'dfourier')} for \code{Opn} #' @param id the shape on which to perform calibrate_reconstructions #' @param range vector of harmonics on which to perform calibrate_reconstructions #' @param baseline1 \eqn{(x; y)} coordinates for the first point of the baseline #' @param baseline2 \eqn{(x; y)} coordinates for the second point of the baseline #' @param ... only used for the generic #' @return a ggplot object #' @family calibration #' @examples #' data(bot) #' calibrate_reconstructions(bot, "efourier") #' #' data(olea) #' calibrate_reconstructions(olea, "dfourier") #' @export calibrate_reconstructions <- function(x, method, id, range, baseline1, baseline2) { UseMethod("calibrate_reconstructions") } #' @export calibrate_reconstructions.Out <- function(x, method = c("efourier", "rfourier", "tfourier"), id, range = 1:9, baseline1=NULL, baseline2=NULL) { # we detect the method # Out dispatcher Out <- x if (missing(method)) { message("method not provided. efourier is used") method <- efourier method_i <- efourier_i } else { p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) if (is.na(p)) { warning("unvalid method. efourier is used") } else { method <- switch(p, efourier, rfourier, tfourier) method_i <- switch(p, efourier_i, rfourier_i, tfourier_i) } } # we sample a shape if (missing(id)) id <- sample(length(Out$coo), 1) coo <- Out$coo[[id]] coo <- coo_center(coo) # check for too ambitious harm.range max.h <- nrow(coo)/2 - 1 if (max(range) > max.h) { range <- floor(seq(1, max.h, length = 9)) message("range was too high and set to ", range) } # we calculate all shapes res <- list() for (i in seq(along = range)) { res[[i]] <- method_i(method(coo, nb.h = max(range)), nb.h = range[i]) } # we prepare the plot names(res) <- range coos <- ldply(res, data.frame) colnames(coos) <- c("id", "x", "y") coos$id <- as.numeric(coos$id) best <- method_i(method(coo, nb.h = max.h)) best <- coo_close(best) best <- data.frame(x=best[, 1], y=best[, 2]) # cosmectics theme_empty <- theme(axis.line=element_blank(), axis.text.x=element_blank(), axis.text.y=element_blank(), axis.ticks=element_blank(), axis.title.x=element_blank(), axis.title.y=element_blank(), legend.position="none", panel.background=element_blank(), panel.border=element_blank(), panel.grid.major=element_blank(), panel.grid.minor=element_blank(), plot.background=element_blank(), strip.background=element_rect(fill="grey95"), strip.text=element_text(colour = "grey10"), strip.text.x=element_text(colour = "grey10"), strip.text.y=element_text(colour = "grey10")) gg <- ggplot(data=coos, aes_string(x="x", y="y")) + coord_equal() + geom_polygon(aes(fill=id), alpha=0.5) + geom_path(data=best, aes_string(x="x", y="y")) + facet_wrap(~ id) + labs(x=NULL, y=NULL, title=names(Out)[id]) + theme_light() + theme_empty return(gg) } #' @export calibrate_reconstructions.Opn <- function(x, method = c("npoly", "opoly", "dfourier"), id, range = 2:10, baseline1 = c(-1, 0), baseline2 = c(1, 0)) { # Opn dispatcher Opn <- x if (missing(method)) { message("method not provided. opoly is used") method <- opoly method_i <- opoly_i p <- 2 } else { p <- pmatch(tolower(method), c("npoly", "opoly", "dfourier")) if (is.na(p)) { warning("unvalid method. opoly is used.\n") } else { method <- switch(p, npoly, opoly, dfourier) method_i <- switch(p, npoly_i, opoly_i, dfourier_i) } } # we sample a shape if (missing(id)) id <- sample(length(Opn$coo), 1) coo <- Opn$coo[[id]] coo <- coo_baseline(coo, ldk1 = 1, ldk2 = nrow(coo), t1 = baseline1, t2 = baseline2) # we check for too ambitious range # special case for opoly # todo if (p == 2) { if (max(range) > 20) range <- 2:20 } if (max(range) > (nrow(coo) - 1)) { range <- 2:10 message("range was too high and set to ", range) } # we loop res <- list() for (i in seq(along = range)) { res[[i]] <- method_i(method(coo, range[i])) } # we prepare the plot names(res) <- range coos <- ldply(res, data.frame) colnames(coos) <- c("id", "x", "y") coos$id <- as.numeric(coos$id) best <- res[[length(res)]] best <- data.frame(x=best[, 1], y=best[, 2]) # cosmectics theme_empty <- theme(axis.line=element_blank(), axis.text.x=element_blank(), axis.text.y=element_blank(), axis.ticks=element_blank(), axis.title.x=element_blank(), axis.title.y=element_blank(), legend.position="none", panel.background=element_blank(), panel.border=element_blank(), panel.grid.major=element_blank(), panel.grid.minor=element_blank(), plot.background=element_blank(), strip.background=element_rect(fill="grey95"), strip.text=element_text(colour = "grey10"), strip.text.x=element_text(colour = "grey10"), strip.text.y=element_text(colour = "grey10")) gg <- ggplot(data=coos, aes_string(x="x", y="y")) + coord_equal() + geom_path(data=best, aes_string(x="x", y="y"), alpha=0.5) + geom_path(aes(col=id)) + # scale_color_gradient2() + facet_wrap(~ id) + labs(x=NULL, y=NULL, title=names(Opn)[id]) + theme_light() + theme_empty return(gg) } # 2. calibrate_deviations ------------------------- #' Quantitative calibration, through deviations, for Out and Opn objects #' #' Calculate deviations from original and reconstructed shapes using a #' range of harmonic number. #' #' @param x and \code{Out} or \code{Opn} object on which to calibrate_deviations #' @param method any method from \code{c('efourier', 'rfourier', 'tfourier')} and #' \code{'dfourier'}. #' @param id the shape on which to perform calibrate_deviations #' @param range vector of harmonics (or degree for opoly and npoly on Opn) on which to perform calibrate_deviations. #' If not provided, the harmonics corresponding to 0.9, 0.95 and 0.99% of harmonic power #' are used. #' @param norm.centsize logical whether to normalize deviation by the centroid size #' @param dist.method a method such as \link{edm_nearest} to calculate deviations #' @param dist.nbpts numeric the number of points to use for deviations calculations #' @details For *poly methods on Opn objects, the deviations are calculated from a degree 12 polynom. #' @return a ggplot object #' @family calibration #' @examples #' data(bot) #' calibrate_deviations(bot) #' \dontrun{ #' #' # on Opn #' data(olea) #' camibrate_deviations(olea) #' #' # lets customize the ggplot #' library(ggplot2) #' gg <- calibrate_deviations(bot, id=1:20)$gg #' gg + geom_hline(yintercept=c(0.001, 0.005), linetype=3) #' gg + labs(col="Number of harmonics", fill="Number of harmonics", #' title="Harmonic power") + theme_bw() #' gg + coord_polar() #' } #' @export calibrate_deviations <- function(x, method, id, range, norm.centsize, dist.method, dist.nbpts) { UseMethod("calibrate_deviations") } #' @export calibrate_deviations.Out <- function(x, method = c("efourier", "rfourier", "tfourier"), id = 1, range, norm.centsize = TRUE, dist.method = edm_nearest, dist.nbpts = 120) { Coo <- x # missing lineat.y if (missing(range)) { hr <- calibrate_harmonicpower(Coo, plot=FALSE, verbose=FALSE) range <- unique(hr$minh) } if (missing(method)) { message("method not provided. efourier is used") method <- efourier method.i <- efourier_i } else { p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) if (is.na(p)) { warning("unvalid method. efourier is used") } else { method <- switch(p, efourier, rfourier, tfourier) method.i <- switch(p, efourier_i, rfourier_i, tfourier_i) } } # We define the highest possible nb.h along Coo@coo[id] min.nb.pts <- min(sapply(Coo$coo[id], nrow)) nb.h.best <- floor(min.nb.pts/2) - 1 # we handle too ambitious range if (max(range) > nb.h.best) { range <- floor(seq(4, nb.h.best, length = 6)) message("'range' was too high and set to ", range) } # we prepare the results array nb.pts <- ifelse(dist.nbpts == "max", 2 * nb.h.best, dist.nbpts) nr <- length(range) nc <- nb.pts nk <- length(id) res <- array(NA, dim = c(nr, nc, nk), dimnames = list(paste0("h", range), paste("pt", 1:nb.pts), names(Coo)[id])) # progressbar if (nk > 5) { pb <- txtProgressBar(1, nk) t <- TRUE } else { t <- FALSE } # the core loops that will calculate deviations for (ind in seq(along = id)) { coo <- Coo$coo[[id[ind]]] #Coo[id]? # below, the best possible fit coo_best <- method.i(method(coo, nb.h = nb.h.best), nb.pts = nb.pts) for (i in seq(along = range)) { # for each number of harmonics we calculate deviation with # the FUN=method coo_i <- method.i(method(coo, nb.h = range[i]), nb.pts = nb.pts) res[i, , ind] <- dist.method(coo_best, coo_i) } # we normalize by the centroid size and prepare the y.title if (norm.centsize) { res[, , ind] <- res[, , ind]/coo_centsize(coo) y.title <- "Deviation (in % of the centroid size)" } else { y.title <- "Deviation (in original units)" } if (t) setTxtProgressBar(pb, ind) } # below we manage for single/several individuals if more than # 1, we calculate median and sd if (nk > 1) { m <- apply(res, 1:2, median) d <- apply(res, 1:2, sd) # we prepare a df xx <- melt(m) xx <- cbind(xx, melt(d)$value) xx$Var2 <- as.numeric(xx$Var2) colnames(xx) <- c("harm", "pt", "med", "sd") # hideous but avoid the aes_string problem fro ribbon xx$mmsd <- xx$med - xx$sd xx$mpsd <- xx$med + xx$sd # we ggplot gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_ribbon(aes_string(ymin="mmsd", ymax="mpsd", fill="harm"), linetype=0, alpha=0.1) + geom_line(aes_string(x="pt", y="med", col="harm")) + labs(x="Points along the outline", y=y.title, col=NULL, fill=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$mpsd))) } else { m <- res[, , 1] d <- NULL # we prepare a df xx <- melt(m) xx$Var2 <- as.numeric(xx$Var2) colnames(xx) <- c("harm", "pt", "med") gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_line() + labs(x="Points along the outline", y=y.title, col=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$med))) } # # horizontal lines # if (!is.null(thresh)) { # gg <- gg + geom_hline(aes(yintercept=thresh)) # } # we plot the ggplot print(gg) #### invisible(list(gg=gg, res = res, m = m, d = d)) } #' @export calibrate_deviations.Opn<- function(x, method = c("npoly", "opoly", "dfourier"), id = 1, range, norm.centsize = TRUE, dist.method = edm_nearest, dist.nbpts = 120) { Coo <- x # missing lineat.y if (missing(range)) { # hr <- calibrate_harmonicpower(Coo, plot=FALSE, verbose=FALSE, # lineat.y = c(95, 99, 99.9)) # range <- unique(hr$minh) # message("range missing and set to 1:8") range <- 1:8 } if (missing(method)) { message("method not provided. dfourier is used") method <- dfourier method.i <- dfourier_i p <- 3 } else { p <- pmatch(tolower(method), c("npoly", "opoly", "dfourier")) if (is.na(p)) { warning("unvalid method. dfourier is used.\n") method <- dfourier method.i <- dfourier_i p <- 3 } else { method <- switch(p, npoly, opoly, dfourier) method.i <- switch(p, npoly_i, opoly_i, dfourier_i) } } if (p==3){ # dfourier # We define the highest possible nb.h along Coo@coo[id] min.nb.pts <- min(sapply(Coo$coo[id], nrow)) nb.h.best <- floor(min.nb.pts/2) - 1 # we handle too ambitious range if (max(range) > nb.h.best) { range <- floor(seq(4, nb.h.best, length = 6)) message("'range' was too high and set to ", range) } # we prepare the results array nb.pts <- ifelse(dist.nbpts == "max", 2 * nb.h.best, dist.nbpts) } else { #poly methods nb.pts <- min.nb.pts <- min(sapply(Coo$coo[id], function(x) nrow(unique(x)))) nb.h.best <- 12 message("deviations calculated from a degree 12 polynom") } nr <- length(range) nc <- nb.pts nk <- length(id) if (p==3){ res <- array(NA, dim = c(nr, nc, nk), dimnames = list(paste0("h", range), paste("pt", 1:nb.pts), names(Coo)[id])) } else { res <- array(NA, dim = c(nr, nc, nk), dimnames = list(paste0("d", range), paste("pt", 1:nb.pts), names(Coo)[id])) } # progressbar if (nk > 5) { pb <- txtProgressBar(1, nk) t <- TRUE } else { t <- FALSE } # the core loops that will calculate deviations for (ind in seq(along = id)) { coo <- Coo$coo[[id[ind]]] #Coo[id]? # below, the best possible fit coo_best <- method.i(method(coo, nb.h.best), nb.pts = nb.pts) for (i in seq(along = range)) { # for each number of harmonics we calculate deviation with # the FUN=method coo_i <- method.i(method(coo, range[i]), nb.pts = nb.pts) res[i, , ind] <- dist.method(coo_best, coo_i) } # we normalize by the centroid size and prepare the y.title if (norm.centsize) { res[, , ind] <- res[, , ind]/coo_centsize(coo) y.title <- "Deviation (in % of the centroid size)" } else { y.title <- "Deviation (in original units)" } if (t) setTxtProgressBar(pb, ind) } # below we manage for single/several individuals if more than # 1, we calculate median and sd if (nk > 1) { m <- apply(res, 1:2, median) d <- apply(res, 1:2, sd) # we prepare a df xx <- melt(m) xx <- cbind(xx, melt(d)$value) xx$Var2 <- as.numeric(xx$Var2) colnames(xx) <- c("harm", "pt", "med", "sd") # hideous but avoid the aes_string problem fro ribbon xx$mmsd <- xx$med - xx$sd xx$mpsd <- xx$med + xx$sd # we ggplot gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_ribbon(aes_string(ymin="mmsd", ymax="mpsd", fill="harm"), linetype=0, alpha=0.1) + geom_line(aes_string(x="pt", y="med", col="harm")) + labs(x="Points along the open outline", y=y.title, col=NULL, fill=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$mpsd))) } else { m <- res[, , 1] d <- NULL # we prepare a df xx <- melt(m) xx$Var2 <- as.numeric(xx$Var2) # if (p==3){ colnames(xx) <- c("harm", "pt", "med") # } else { # colnames(xx) <- c("deg", "pt", "med") # } gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_line() + labs(x="Points along the open outline", y=y.title, col=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$med))) } # # horizontal lines # if (!is.null(thresh)) { # gg <- gg + geom_hline(aes(yintercept=thresh)) # } # we plot the ggplot print(gg) #### invisible(list(gg=gg, res = res, m = m, d = d)) } # 3. calibrate_harmonicpower ---------------- #' Quantitative calibration, through harmonic power, for Out and Opn objects #' #' Estimates the number of harmonics required for the four Fourier methods #' implemented in Momocs: elliptical Fourier analysis #' (see \link{efourier}), radii variation analysis (see \link{rfourier}) #' and tangent angle analysis (see \link{tfourier}) and #' discrete Fourier transform (see \link{dfourier}). #' It returns and can plot cumulated harmonic power whether dropping #' the first harmonic or not, and based and the maximum possible number #' of harmonics on the \code{Coo} object. #' #' @param x a \code{Coo} of \code{Opn} object #' @param method any method from \code{c('efourier', 'rfourier', 'tfourier')} for \code{Out}s and #' \code{dfourier} for \code{Out}s. #' @param id the shapes on which to perform calibrate_harmonicpower. All of them by default #' @param nb.h numeric the maximum number of harmonic, on which to base the cumsum #' @param drop numeric the number of harmonics to drop for the cumulative sum #' @param thresh vector of numeric for drawing horizontal lines, and also used for #' \code{minh} below #' @param plot logical whether to plot the result or simply return the matrix #' @param verbose whether to print results #' @return returns a list with component: #' \itemize{ #' \item \code{gg} a ggplot object, \code{q} the quantile matrix #' \item \code{minh} a quick summary that returns the number of harmonics required to achieve #' a certain proportion of the total harmonic power. #' } #' @details #' The power of a given harmonic \eqn{n} is calculated as follows for #' elliptical Fourier analysis and the n-th harmonic: #' \eqn{HarmonicPower_n \frac{A^2_n+B^2_n+C^2_n+D^2_n}{2}} #' and as follows for radii variation and tangent angle: #' \eqn{HarmonicPower_n= \frac{A^2_n+B^2_n+C^2_n+D^2_n}{2}} #' @family calibration #' @examples #' data(bot) #' cal <- calibrate_harmonicpower(bot) #' \dontrun{ #' # for Opn objects #' data(olea) #' calibrate_harmonicpower(olea, "dfourier") #' #' # let customize the ggplot #' library(ggplot2) #' cal$gg + theme_minimal() + #' coord_cartesian(xlim=c(3.5, 12.5), ylim=c(90, 100)) + #' ggtitle("Harmonic power calibration") #' } #' # if you want to do efourier with 99% calibrate_harmonicpower in one step #' # efourier(bot, nb.h=calibrate_harmonicpower(bot, "efourier", plot=FALSE)$minh["99%"]) #' #' @export calibrate_harmonicpower <- function(x, method, id, nb.h, drop, thresh, plot, verbose) { UseMethod("calibrate_harmonicpower") } #' @export calibrate_harmonicpower.Out <- function(x, method = "efourier", id = 1:length(x), nb.h, drop = 1, thresh = c(90, 95, 99, 99.9), plot=TRUE, verbose=TRUE) { Out <- x # we swith among methods, with a messsage if (missing(method)) { if (verbose) message("method not provided. efourier is used") method <- efourier } else { p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) if (is.na(p)) { warning("unvalid method. efourier is used") } else { method <- switch(p, efourier, rfourier, tfourier) } } # here we define the maximum nb.h, if missing if (missing(nb.h)){ nb.h <- floor(min(sapply(Out$coo, nrow))/2) } # we prepare the result matrix res <- matrix(nrow = length(id), ncol = (nb.h - drop)) x <- (drop + 1):nb.h for (i in seq(along = id)) { xf <- method(Out$coo[[id[i]]], nb.h = nb.h) res[i, ] <- harm_pow(xf)[x] } rownames(res) <- names(Out)[id] colnames(res) <- paste0("h", 1:ncol(res)) # we remove dropped harmonics #res <- res[, -drop] # we calculte cumsum and percentages res <- t(apply(res, 1, function(x) cumsum(x) / sum(x))) * 100 # we ggplot h_display <- which(apply(res, 2, median) >= 99)[1] + 2 # cosmectics xx <- melt(res) colnames(xx) <- c("shp", "harm", "hp") if (length(id) > 2) { gg <- ggplot(xx, aes_string(x="harm", y="hp")) + geom_boxplot() + labs(x="Harmonic rank", y="Cumulative sum harmonic power") + coord_cartesian(xlim=c(0.5, h_display+0.5)) } else { gg <- ggplot(xx, aes_string(x="harm", y="hp")) + geom_point() + labs(x="Harmonic rank", y="Cumulative sum harmonic power") + coord_cartesian(xlim=c(0.5, h_display+0.5)) } if (plot) print(gg) # we calculate quantiles and add nice rowcolnames # also the median (independently of probs [0.5, etc]) since # thresh may change med.res <- apply(res, 2, median) minh <- numeric(length(thresh)) names(minh) <- paste0(thresh, "%") for (i in seq(along=thresh)){ wi <- which(med.res > thresh[i]) minh[i] <- ifelse(length(wi)==0, NA, min(wi))} minh <- minh+drop # talk to me if (verbose){ # cat("\n$minh:\n") print(minh)} # we return the full matrix, the ggplot and the thresholds invisible(list(gg=gg, q=res, minh=minh)) } #' @export calibrate_harmonicpower.Opn <- function(x, method = "dfourier", id = 1:length(x), nb.h, drop = 1, thresh = c(90, 95, 99, 99.9), plot=TRUE, verbose=TRUE) { Opn <- x # we swith among methods, with a messsage if (missing(method)) { if (verbose) message("Method not provided. dfourier is used") method <- dfourier } else if (method != "dfourier"){ if (verbose) message("only available for dfourier. dfourier is used") method <- dfourier } else { method <- dfourier } # } else { # p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) # if (is.na(p)) { # warning("Unvalid method. efourier is used.") # } else { # method <- switch(p, efourier, rfourier, tfourier) # } # } # here we define the maximum nb.h, if missing if (missing(nb.h)){ nb.h <- floor(min(sapply(Opn$coo, nrow))/2) } # we prepare the result matrix res <- matrix(nrow = length(id), ncol = (nb.h - drop)) x <- (drop + 1):nb.h for (i in seq(along = id)) { xf <- method(Opn$coo[[id[i]]], nb.h = nb.h) res[i, ] <- harm_pow(xf)[x]} rownames(res) <- names(Opn) colnames(res) <- paste0("h", 1:ncol(res)) # we remove dropped harmonics #res <- res[, -drop] # we calculte cumsum and percentages res <- t(apply(res, 1, function(x) cumsum(x) / sum(x))) * 100 # we ggplot h_display <- which(apply(res, 2, median) >= 99)[1] + 2 # cosmetics xx <- melt(res) colnames(xx) <- c("shp", "harm", "hp") gg <- ggplot(xx, aes_string(x="harm", y="hp")) + geom_boxplot() + labs(x="Harmonic rank", y="Cumulative sum harmonic power") + coord_cartesian(xlim=c(0.5, h_display+0.5)) if (plot) print(gg) # we calculate quantiles and add nice rowcolnames # also the median (independently of probs [0.5, etc]) since # thresh may change med.res <- apply(res, 2, median) minh <- numeric(length(thresh)) names(minh) <- paste0(thresh, "%") for (i in seq(along=thresh)){ wi <- which(med.res > thresh[i]) minh[i] <- ifelse(length(wi)==0, NA, min(wi))} minh <- minh+drop # talk to me if (verbose){ # cat("\n$minh:\n") print(minh)} # we return the full matrix, the ggplot and the thresholds invisible(list(gg=gg, q=res, minh=minh)) } # 4. calibrate_r2 ---------------- #' Quantitative r2 calibration for Opn objects #' #' Estimates the r2 to calibrate the degree for \link{npoly} and \link{opoly} methods. #' Also returns a plot #' #' @param Opn an Opn object #' @param method one of 'npoly' or 'opoly' #' @param id the ids of shapes on which to calculate r2 (all by default) #' @param degree.range on which to calculate r2 #' @param thresh the threshold to return diagnostic #' @param plot logical whether to print the plot #' @param verbose logical whether to print messages #' @param ... useless here #' @details May be long, so you can estimate it on a sample either with id here, or one of #' \link{sample_n} or \link{sample_frac} #' @family calibration #' @examples #' \dontrun{ #' calibrate_r2(olea, "opoly", degree.range=1:5, thresh=c(0.9, 0.99)) #' } #' #' @export calibrate_r2 <- function(Opn, method = "opoly", id = 1:length(Opn), degree.range=1:8, thresh = c(0.90, 0.95, 0.99, 0.999), plot=TRUE, verbose=TRUE, ...) { if (!is.Opn(Opn)) stop("only defined on Opn objects") # we swith among methods, with a messsage if (missing(method)) { if (verbose) message("method not provided. opoly is used") method <- opoly } else { p <- pmatch(tolower(method), c("npoly", "opoly")) if (is.na(p)) { warning("unvalid method. opoly is used.\n") } else { method <- switch(p, npoly, opoly) } } # we prepare the result matrix res <- matrix(nrow = length(id), ncol = length(degree.range)) for (i in id) { for (j in degree.range) { res[i, j] <- method(Opn$coo[[i]], degree = j)$r2 } } rownames(res) <- names(Opn) colnames(res) <- paste0("degree", degree.range) # we ggplot h_display <- which(apply(res, 2, median) >= 0.99)[1] + 2 # cosmectics xx <- melt(res) colnames(xx) <- c("shp", "degree", "r2") gg <- ggplot(xx, aes_string(x="degree", y="r2")) + geom_boxplot() + labs(x="Degree", y="r2") + coord_cartesian(xlim=c(0.5, h_display+0.5)) if (plot) print(gg) # we calculate quantiles and add nice rowcolnames # also the median (independently of probs [0.5, etc]) since # thresh may change med.res <- apply(res, 2, median) minh <- numeric(length(thresh)) names(minh) <- thresh for (i in seq(along=thresh)){ wi <- which(med.res > thresh[i]) minh[i] <- ifelse(length(wi)==0, NA, min(wi))} mind <- minh # talk to me if (verbose){ # cat("\n$minh:\n") print(mind)} # we return the full matrix, the ggplot and the thresholds invisible(list(gg=gg, q=res, mind=mind)) }
/R/core-outopn-calibrate.R
no_license
stas-malavin/Momocs
R
false
false
27,132
r
# 1. calibrate_reconstructions ----------- #' Calibrate using reconstructed shapes #' #' Calculate and displays reconstructed shapes using a #' range of harmonic number. Compare them visually with the maximal fit. #' #' @param x the \code{Coo} object on which to calibrate_reconstructions #' @param method any method from \code{c('efourier', 'rfourier', 'tfourier')} #' for \code{Out}, or from \code{c('opoly', 'npoly', 'dfourier')} for \code{Opn} #' @param id the shape on which to perform calibrate_reconstructions #' @param range vector of harmonics on which to perform calibrate_reconstructions #' @param baseline1 \eqn{(x; y)} coordinates for the first point of the baseline #' @param baseline2 \eqn{(x; y)} coordinates for the second point of the baseline #' @param ... only used for the generic #' @return a ggplot object #' @family calibration #' @examples #' data(bot) #' calibrate_reconstructions(bot, "efourier") #' #' data(olea) #' calibrate_reconstructions(olea, "dfourier") #' @export calibrate_reconstructions <- function(x, method, id, range, baseline1, baseline2) { UseMethod("calibrate_reconstructions") } #' @export calibrate_reconstructions.Out <- function(x, method = c("efourier", "rfourier", "tfourier"), id, range = 1:9, baseline1=NULL, baseline2=NULL) { # we detect the method # Out dispatcher Out <- x if (missing(method)) { message("method not provided. efourier is used") method <- efourier method_i <- efourier_i } else { p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) if (is.na(p)) { warning("unvalid method. efourier is used") } else { method <- switch(p, efourier, rfourier, tfourier) method_i <- switch(p, efourier_i, rfourier_i, tfourier_i) } } # we sample a shape if (missing(id)) id <- sample(length(Out$coo), 1) coo <- Out$coo[[id]] coo <- coo_center(coo) # check for too ambitious harm.range max.h <- nrow(coo)/2 - 1 if (max(range) > max.h) { range <- floor(seq(1, max.h, length = 9)) message("range was too high and set to ", range) } # we calculate all shapes res <- list() for (i in seq(along = range)) { res[[i]] <- method_i(method(coo, nb.h = max(range)), nb.h = range[i]) } # we prepare the plot names(res) <- range coos <- ldply(res, data.frame) colnames(coos) <- c("id", "x", "y") coos$id <- as.numeric(coos$id) best <- method_i(method(coo, nb.h = max.h)) best <- coo_close(best) best <- data.frame(x=best[, 1], y=best[, 2]) # cosmectics theme_empty <- theme(axis.line=element_blank(), axis.text.x=element_blank(), axis.text.y=element_blank(), axis.ticks=element_blank(), axis.title.x=element_blank(), axis.title.y=element_blank(), legend.position="none", panel.background=element_blank(), panel.border=element_blank(), panel.grid.major=element_blank(), panel.grid.minor=element_blank(), plot.background=element_blank(), strip.background=element_rect(fill="grey95"), strip.text=element_text(colour = "grey10"), strip.text.x=element_text(colour = "grey10"), strip.text.y=element_text(colour = "grey10")) gg <- ggplot(data=coos, aes_string(x="x", y="y")) + coord_equal() + geom_polygon(aes(fill=id), alpha=0.5) + geom_path(data=best, aes_string(x="x", y="y")) + facet_wrap(~ id) + labs(x=NULL, y=NULL, title=names(Out)[id]) + theme_light() + theme_empty return(gg) } #' @export calibrate_reconstructions.Opn <- function(x, method = c("npoly", "opoly", "dfourier"), id, range = 2:10, baseline1 = c(-1, 0), baseline2 = c(1, 0)) { # Opn dispatcher Opn <- x if (missing(method)) { message("method not provided. opoly is used") method <- opoly method_i <- opoly_i p <- 2 } else { p <- pmatch(tolower(method), c("npoly", "opoly", "dfourier")) if (is.na(p)) { warning("unvalid method. opoly is used.\n") } else { method <- switch(p, npoly, opoly, dfourier) method_i <- switch(p, npoly_i, opoly_i, dfourier_i) } } # we sample a shape if (missing(id)) id <- sample(length(Opn$coo), 1) coo <- Opn$coo[[id]] coo <- coo_baseline(coo, ldk1 = 1, ldk2 = nrow(coo), t1 = baseline1, t2 = baseline2) # we check for too ambitious range # special case for opoly # todo if (p == 2) { if (max(range) > 20) range <- 2:20 } if (max(range) > (nrow(coo) - 1)) { range <- 2:10 message("range was too high and set to ", range) } # we loop res <- list() for (i in seq(along = range)) { res[[i]] <- method_i(method(coo, range[i])) } # we prepare the plot names(res) <- range coos <- ldply(res, data.frame) colnames(coos) <- c("id", "x", "y") coos$id <- as.numeric(coos$id) best <- res[[length(res)]] best <- data.frame(x=best[, 1], y=best[, 2]) # cosmectics theme_empty <- theme(axis.line=element_blank(), axis.text.x=element_blank(), axis.text.y=element_blank(), axis.ticks=element_blank(), axis.title.x=element_blank(), axis.title.y=element_blank(), legend.position="none", panel.background=element_blank(), panel.border=element_blank(), panel.grid.major=element_blank(), panel.grid.minor=element_blank(), plot.background=element_blank(), strip.background=element_rect(fill="grey95"), strip.text=element_text(colour = "grey10"), strip.text.x=element_text(colour = "grey10"), strip.text.y=element_text(colour = "grey10")) gg <- ggplot(data=coos, aes_string(x="x", y="y")) + coord_equal() + geom_path(data=best, aes_string(x="x", y="y"), alpha=0.5) + geom_path(aes(col=id)) + # scale_color_gradient2() + facet_wrap(~ id) + labs(x=NULL, y=NULL, title=names(Opn)[id]) + theme_light() + theme_empty return(gg) } # 2. calibrate_deviations ------------------------- #' Quantitative calibration, through deviations, for Out and Opn objects #' #' Calculate deviations from original and reconstructed shapes using a #' range of harmonic number. #' #' @param x and \code{Out} or \code{Opn} object on which to calibrate_deviations #' @param method any method from \code{c('efourier', 'rfourier', 'tfourier')} and #' \code{'dfourier'}. #' @param id the shape on which to perform calibrate_deviations #' @param range vector of harmonics (or degree for opoly and npoly on Opn) on which to perform calibrate_deviations. #' If not provided, the harmonics corresponding to 0.9, 0.95 and 0.99% of harmonic power #' are used. #' @param norm.centsize logical whether to normalize deviation by the centroid size #' @param dist.method a method such as \link{edm_nearest} to calculate deviations #' @param dist.nbpts numeric the number of points to use for deviations calculations #' @details For *poly methods on Opn objects, the deviations are calculated from a degree 12 polynom. #' @return a ggplot object #' @family calibration #' @examples #' data(bot) #' calibrate_deviations(bot) #' \dontrun{ #' #' # on Opn #' data(olea) #' camibrate_deviations(olea) #' #' # lets customize the ggplot #' library(ggplot2) #' gg <- calibrate_deviations(bot, id=1:20)$gg #' gg + geom_hline(yintercept=c(0.001, 0.005), linetype=3) #' gg + labs(col="Number of harmonics", fill="Number of harmonics", #' title="Harmonic power") + theme_bw() #' gg + coord_polar() #' } #' @export calibrate_deviations <- function(x, method, id, range, norm.centsize, dist.method, dist.nbpts) { UseMethod("calibrate_deviations") } #' @export calibrate_deviations.Out <- function(x, method = c("efourier", "rfourier", "tfourier"), id = 1, range, norm.centsize = TRUE, dist.method = edm_nearest, dist.nbpts = 120) { Coo <- x # missing lineat.y if (missing(range)) { hr <- calibrate_harmonicpower(Coo, plot=FALSE, verbose=FALSE) range <- unique(hr$minh) } if (missing(method)) { message("method not provided. efourier is used") method <- efourier method.i <- efourier_i } else { p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) if (is.na(p)) { warning("unvalid method. efourier is used") } else { method <- switch(p, efourier, rfourier, tfourier) method.i <- switch(p, efourier_i, rfourier_i, tfourier_i) } } # We define the highest possible nb.h along Coo@coo[id] min.nb.pts <- min(sapply(Coo$coo[id], nrow)) nb.h.best <- floor(min.nb.pts/2) - 1 # we handle too ambitious range if (max(range) > nb.h.best) { range <- floor(seq(4, nb.h.best, length = 6)) message("'range' was too high and set to ", range) } # we prepare the results array nb.pts <- ifelse(dist.nbpts == "max", 2 * nb.h.best, dist.nbpts) nr <- length(range) nc <- nb.pts nk <- length(id) res <- array(NA, dim = c(nr, nc, nk), dimnames = list(paste0("h", range), paste("pt", 1:nb.pts), names(Coo)[id])) # progressbar if (nk > 5) { pb <- txtProgressBar(1, nk) t <- TRUE } else { t <- FALSE } # the core loops that will calculate deviations for (ind in seq(along = id)) { coo <- Coo$coo[[id[ind]]] #Coo[id]? # below, the best possible fit coo_best <- method.i(method(coo, nb.h = nb.h.best), nb.pts = nb.pts) for (i in seq(along = range)) { # for each number of harmonics we calculate deviation with # the FUN=method coo_i <- method.i(method(coo, nb.h = range[i]), nb.pts = nb.pts) res[i, , ind] <- dist.method(coo_best, coo_i) } # we normalize by the centroid size and prepare the y.title if (norm.centsize) { res[, , ind] <- res[, , ind]/coo_centsize(coo) y.title <- "Deviation (in % of the centroid size)" } else { y.title <- "Deviation (in original units)" } if (t) setTxtProgressBar(pb, ind) } # below we manage for single/several individuals if more than # 1, we calculate median and sd if (nk > 1) { m <- apply(res, 1:2, median) d <- apply(res, 1:2, sd) # we prepare a df xx <- melt(m) xx <- cbind(xx, melt(d)$value) xx$Var2 <- as.numeric(xx$Var2) colnames(xx) <- c("harm", "pt", "med", "sd") # hideous but avoid the aes_string problem fro ribbon xx$mmsd <- xx$med - xx$sd xx$mpsd <- xx$med + xx$sd # we ggplot gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_ribbon(aes_string(ymin="mmsd", ymax="mpsd", fill="harm"), linetype=0, alpha=0.1) + geom_line(aes_string(x="pt", y="med", col="harm")) + labs(x="Points along the outline", y=y.title, col=NULL, fill=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$mpsd))) } else { m <- res[, , 1] d <- NULL # we prepare a df xx <- melt(m) xx$Var2 <- as.numeric(xx$Var2) colnames(xx) <- c("harm", "pt", "med") gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_line() + labs(x="Points along the outline", y=y.title, col=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$med))) } # # horizontal lines # if (!is.null(thresh)) { # gg <- gg + geom_hline(aes(yintercept=thresh)) # } # we plot the ggplot print(gg) #### invisible(list(gg=gg, res = res, m = m, d = d)) } #' @export calibrate_deviations.Opn<- function(x, method = c("npoly", "opoly", "dfourier"), id = 1, range, norm.centsize = TRUE, dist.method = edm_nearest, dist.nbpts = 120) { Coo <- x # missing lineat.y if (missing(range)) { # hr <- calibrate_harmonicpower(Coo, plot=FALSE, verbose=FALSE, # lineat.y = c(95, 99, 99.9)) # range <- unique(hr$minh) # message("range missing and set to 1:8") range <- 1:8 } if (missing(method)) { message("method not provided. dfourier is used") method <- dfourier method.i <- dfourier_i p <- 3 } else { p <- pmatch(tolower(method), c("npoly", "opoly", "dfourier")) if (is.na(p)) { warning("unvalid method. dfourier is used.\n") method <- dfourier method.i <- dfourier_i p <- 3 } else { method <- switch(p, npoly, opoly, dfourier) method.i <- switch(p, npoly_i, opoly_i, dfourier_i) } } if (p==3){ # dfourier # We define the highest possible nb.h along Coo@coo[id] min.nb.pts <- min(sapply(Coo$coo[id], nrow)) nb.h.best <- floor(min.nb.pts/2) - 1 # we handle too ambitious range if (max(range) > nb.h.best) { range <- floor(seq(4, nb.h.best, length = 6)) message("'range' was too high and set to ", range) } # we prepare the results array nb.pts <- ifelse(dist.nbpts == "max", 2 * nb.h.best, dist.nbpts) } else { #poly methods nb.pts <- min.nb.pts <- min(sapply(Coo$coo[id], function(x) nrow(unique(x)))) nb.h.best <- 12 message("deviations calculated from a degree 12 polynom") } nr <- length(range) nc <- nb.pts nk <- length(id) if (p==3){ res <- array(NA, dim = c(nr, nc, nk), dimnames = list(paste0("h", range), paste("pt", 1:nb.pts), names(Coo)[id])) } else { res <- array(NA, dim = c(nr, nc, nk), dimnames = list(paste0("d", range), paste("pt", 1:nb.pts), names(Coo)[id])) } # progressbar if (nk > 5) { pb <- txtProgressBar(1, nk) t <- TRUE } else { t <- FALSE } # the core loops that will calculate deviations for (ind in seq(along = id)) { coo <- Coo$coo[[id[ind]]] #Coo[id]? # below, the best possible fit coo_best <- method.i(method(coo, nb.h.best), nb.pts = nb.pts) for (i in seq(along = range)) { # for each number of harmonics we calculate deviation with # the FUN=method coo_i <- method.i(method(coo, range[i]), nb.pts = nb.pts) res[i, , ind] <- dist.method(coo_best, coo_i) } # we normalize by the centroid size and prepare the y.title if (norm.centsize) { res[, , ind] <- res[, , ind]/coo_centsize(coo) y.title <- "Deviation (in % of the centroid size)" } else { y.title <- "Deviation (in original units)" } if (t) setTxtProgressBar(pb, ind) } # below we manage for single/several individuals if more than # 1, we calculate median and sd if (nk > 1) { m <- apply(res, 1:2, median) d <- apply(res, 1:2, sd) # we prepare a df xx <- melt(m) xx <- cbind(xx, melt(d)$value) xx$Var2 <- as.numeric(xx$Var2) colnames(xx) <- c("harm", "pt", "med", "sd") # hideous but avoid the aes_string problem fro ribbon xx$mmsd <- xx$med - xx$sd xx$mpsd <- xx$med + xx$sd # we ggplot gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_ribbon(aes_string(ymin="mmsd", ymax="mpsd", fill="harm"), linetype=0, alpha=0.1) + geom_line(aes_string(x="pt", y="med", col="harm")) + labs(x="Points along the open outline", y=y.title, col=NULL, fill=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$mpsd))) } else { m <- res[, , 1] d <- NULL # we prepare a df xx <- melt(m) xx$Var2 <- as.numeric(xx$Var2) # if (p==3){ colnames(xx) <- c("harm", "pt", "med") # } else { # colnames(xx) <- c("deg", "pt", "med") # } gg <- ggplot(xx, aes_string(x="pt", y="med", col="harm")) + geom_line() + labs(x="Points along the open outline", y=y.title, col=NULL) + coord_cartesian(xlim=range(xx$pt), ylim=c(0, max(xx$med))) } # # horizontal lines # if (!is.null(thresh)) { # gg <- gg + geom_hline(aes(yintercept=thresh)) # } # we plot the ggplot print(gg) #### invisible(list(gg=gg, res = res, m = m, d = d)) } # 3. calibrate_harmonicpower ---------------- #' Quantitative calibration, through harmonic power, for Out and Opn objects #' #' Estimates the number of harmonics required for the four Fourier methods #' implemented in Momocs: elliptical Fourier analysis #' (see \link{efourier}), radii variation analysis (see \link{rfourier}) #' and tangent angle analysis (see \link{tfourier}) and #' discrete Fourier transform (see \link{dfourier}). #' It returns and can plot cumulated harmonic power whether dropping #' the first harmonic or not, and based and the maximum possible number #' of harmonics on the \code{Coo} object. #' #' @param x a \code{Coo} of \code{Opn} object #' @param method any method from \code{c('efourier', 'rfourier', 'tfourier')} for \code{Out}s and #' \code{dfourier} for \code{Out}s. #' @param id the shapes on which to perform calibrate_harmonicpower. All of them by default #' @param nb.h numeric the maximum number of harmonic, on which to base the cumsum #' @param drop numeric the number of harmonics to drop for the cumulative sum #' @param thresh vector of numeric for drawing horizontal lines, and also used for #' \code{minh} below #' @param plot logical whether to plot the result or simply return the matrix #' @param verbose whether to print results #' @return returns a list with component: #' \itemize{ #' \item \code{gg} a ggplot object, \code{q} the quantile matrix #' \item \code{minh} a quick summary that returns the number of harmonics required to achieve #' a certain proportion of the total harmonic power. #' } #' @details #' The power of a given harmonic \eqn{n} is calculated as follows for #' elliptical Fourier analysis and the n-th harmonic: #' \eqn{HarmonicPower_n \frac{A^2_n+B^2_n+C^2_n+D^2_n}{2}} #' and as follows for radii variation and tangent angle: #' \eqn{HarmonicPower_n= \frac{A^2_n+B^2_n+C^2_n+D^2_n}{2}} #' @family calibration #' @examples #' data(bot) #' cal <- calibrate_harmonicpower(bot) #' \dontrun{ #' # for Opn objects #' data(olea) #' calibrate_harmonicpower(olea, "dfourier") #' #' # let customize the ggplot #' library(ggplot2) #' cal$gg + theme_minimal() + #' coord_cartesian(xlim=c(3.5, 12.5), ylim=c(90, 100)) + #' ggtitle("Harmonic power calibration") #' } #' # if you want to do efourier with 99% calibrate_harmonicpower in one step #' # efourier(bot, nb.h=calibrate_harmonicpower(bot, "efourier", plot=FALSE)$minh["99%"]) #' #' @export calibrate_harmonicpower <- function(x, method, id, nb.h, drop, thresh, plot, verbose) { UseMethod("calibrate_harmonicpower") } #' @export calibrate_harmonicpower.Out <- function(x, method = "efourier", id = 1:length(x), nb.h, drop = 1, thresh = c(90, 95, 99, 99.9), plot=TRUE, verbose=TRUE) { Out <- x # we swith among methods, with a messsage if (missing(method)) { if (verbose) message("method not provided. efourier is used") method <- efourier } else { p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) if (is.na(p)) { warning("unvalid method. efourier is used") } else { method <- switch(p, efourier, rfourier, tfourier) } } # here we define the maximum nb.h, if missing if (missing(nb.h)){ nb.h <- floor(min(sapply(Out$coo, nrow))/2) } # we prepare the result matrix res <- matrix(nrow = length(id), ncol = (nb.h - drop)) x <- (drop + 1):nb.h for (i in seq(along = id)) { xf <- method(Out$coo[[id[i]]], nb.h = nb.h) res[i, ] <- harm_pow(xf)[x] } rownames(res) <- names(Out)[id] colnames(res) <- paste0("h", 1:ncol(res)) # we remove dropped harmonics #res <- res[, -drop] # we calculte cumsum and percentages res <- t(apply(res, 1, function(x) cumsum(x) / sum(x))) * 100 # we ggplot h_display <- which(apply(res, 2, median) >= 99)[1] + 2 # cosmectics xx <- melt(res) colnames(xx) <- c("shp", "harm", "hp") if (length(id) > 2) { gg <- ggplot(xx, aes_string(x="harm", y="hp")) + geom_boxplot() + labs(x="Harmonic rank", y="Cumulative sum harmonic power") + coord_cartesian(xlim=c(0.5, h_display+0.5)) } else { gg <- ggplot(xx, aes_string(x="harm", y="hp")) + geom_point() + labs(x="Harmonic rank", y="Cumulative sum harmonic power") + coord_cartesian(xlim=c(0.5, h_display+0.5)) } if (plot) print(gg) # we calculate quantiles and add nice rowcolnames # also the median (independently of probs [0.5, etc]) since # thresh may change med.res <- apply(res, 2, median) minh <- numeric(length(thresh)) names(minh) <- paste0(thresh, "%") for (i in seq(along=thresh)){ wi <- which(med.res > thresh[i]) minh[i] <- ifelse(length(wi)==0, NA, min(wi))} minh <- minh+drop # talk to me if (verbose){ # cat("\n$minh:\n") print(minh)} # we return the full matrix, the ggplot and the thresholds invisible(list(gg=gg, q=res, minh=minh)) } #' @export calibrate_harmonicpower.Opn <- function(x, method = "dfourier", id = 1:length(x), nb.h, drop = 1, thresh = c(90, 95, 99, 99.9), plot=TRUE, verbose=TRUE) { Opn <- x # we swith among methods, with a messsage if (missing(method)) { if (verbose) message("Method not provided. dfourier is used") method <- dfourier } else if (method != "dfourier"){ if (verbose) message("only available for dfourier. dfourier is used") method <- dfourier } else { method <- dfourier } # } else { # p <- pmatch(tolower(method), c("efourier", "rfourier", "tfourier")) # if (is.na(p)) { # warning("Unvalid method. efourier is used.") # } else { # method <- switch(p, efourier, rfourier, tfourier) # } # } # here we define the maximum nb.h, if missing if (missing(nb.h)){ nb.h <- floor(min(sapply(Opn$coo, nrow))/2) } # we prepare the result matrix res <- matrix(nrow = length(id), ncol = (nb.h - drop)) x <- (drop + 1):nb.h for (i in seq(along = id)) { xf <- method(Opn$coo[[id[i]]], nb.h = nb.h) res[i, ] <- harm_pow(xf)[x]} rownames(res) <- names(Opn) colnames(res) <- paste0("h", 1:ncol(res)) # we remove dropped harmonics #res <- res[, -drop] # we calculte cumsum and percentages res <- t(apply(res, 1, function(x) cumsum(x) / sum(x))) * 100 # we ggplot h_display <- which(apply(res, 2, median) >= 99)[1] + 2 # cosmetics xx <- melt(res) colnames(xx) <- c("shp", "harm", "hp") gg <- ggplot(xx, aes_string(x="harm", y="hp")) + geom_boxplot() + labs(x="Harmonic rank", y="Cumulative sum harmonic power") + coord_cartesian(xlim=c(0.5, h_display+0.5)) if (plot) print(gg) # we calculate quantiles and add nice rowcolnames # also the median (independently of probs [0.5, etc]) since # thresh may change med.res <- apply(res, 2, median) minh <- numeric(length(thresh)) names(minh) <- paste0(thresh, "%") for (i in seq(along=thresh)){ wi <- which(med.res > thresh[i]) minh[i] <- ifelse(length(wi)==0, NA, min(wi))} minh <- minh+drop # talk to me if (verbose){ # cat("\n$minh:\n") print(minh)} # we return the full matrix, the ggplot and the thresholds invisible(list(gg=gg, q=res, minh=minh)) } # 4. calibrate_r2 ---------------- #' Quantitative r2 calibration for Opn objects #' #' Estimates the r2 to calibrate the degree for \link{npoly} and \link{opoly} methods. #' Also returns a plot #' #' @param Opn an Opn object #' @param method one of 'npoly' or 'opoly' #' @param id the ids of shapes on which to calculate r2 (all by default) #' @param degree.range on which to calculate r2 #' @param thresh the threshold to return diagnostic #' @param plot logical whether to print the plot #' @param verbose logical whether to print messages #' @param ... useless here #' @details May be long, so you can estimate it on a sample either with id here, or one of #' \link{sample_n} or \link{sample_frac} #' @family calibration #' @examples #' \dontrun{ #' calibrate_r2(olea, "opoly", degree.range=1:5, thresh=c(0.9, 0.99)) #' } #' #' @export calibrate_r2 <- function(Opn, method = "opoly", id = 1:length(Opn), degree.range=1:8, thresh = c(0.90, 0.95, 0.99, 0.999), plot=TRUE, verbose=TRUE, ...) { if (!is.Opn(Opn)) stop("only defined on Opn objects") # we swith among methods, with a messsage if (missing(method)) { if (verbose) message("method not provided. opoly is used") method <- opoly } else { p <- pmatch(tolower(method), c("npoly", "opoly")) if (is.na(p)) { warning("unvalid method. opoly is used.\n") } else { method <- switch(p, npoly, opoly) } } # we prepare the result matrix res <- matrix(nrow = length(id), ncol = length(degree.range)) for (i in id) { for (j in degree.range) { res[i, j] <- method(Opn$coo[[i]], degree = j)$r2 } } rownames(res) <- names(Opn) colnames(res) <- paste0("degree", degree.range) # we ggplot h_display <- which(apply(res, 2, median) >= 0.99)[1] + 2 # cosmectics xx <- melt(res) colnames(xx) <- c("shp", "degree", "r2") gg <- ggplot(xx, aes_string(x="degree", y="r2")) + geom_boxplot() + labs(x="Degree", y="r2") + coord_cartesian(xlim=c(0.5, h_display+0.5)) if (plot) print(gg) # we calculate quantiles and add nice rowcolnames # also the median (independently of probs [0.5, etc]) since # thresh may change med.res <- apply(res, 2, median) minh <- numeric(length(thresh)) names(minh) <- thresh for (i in seq(along=thresh)){ wi <- which(med.res > thresh[i]) minh[i] <- ifelse(length(wi)==0, NA, min(wi))} mind <- minh # talk to me if (verbose){ # cat("\n$minh:\n") print(mind)} # we return the full matrix, the ggplot and the thresholds invisible(list(gg=gg, q=res, mind=mind)) }
#' Do the columns contain numeric values? #' #' The `col_is_numeric()` validation function, the `expect_col_is_numeric()` #' expectation function, and the `test_col_is_numeric()` test function all check #' whether one or more columns in a table is of the numeric type. Like many of #' the `col_is_*()`-type functions in **pointblank**, the only requirement is a #' specification of the column names. The validation function can be used #' directly on a data table or with an *agent* object (technically, a #' `ptblank_agent` object) whereas the expectation and test functions can only #' be used with a data table. The types of data tables that can be used include #' data frames, tibbles, and even database tables of `tbl_dbi` class. Each #' validation step or expectation will operate over a single test unit, which is #' whether the column is a numeric-type column or not. #' #' If providing multiple column names, the result will be an expansion of #' validation steps to that number of column names (e.g., `vars(col_a, col_b)` #' will result in the entry of two validation steps). Aside from column names in #' quotes and in `vars()`, **tidyselect** helper functions are available for #' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, #' `matches()`, and `everything()`. #' #' Often, we will want to specify `actions` for the validation. This argument, #' present in every validation function, takes a specially-crafted list #' object that is best produced by the [action_levels()] function. Read that #' function's documentation for the lowdown on how to create reactions to #' above-threshold failure levels in validation. The basic gist is that you'll #' want at least a single threshold level (specified as either the fraction test #' units failed, or, an absolute value), often using the `warn_at` argument. #' This is especially true when `x` is a table object because, otherwise, #' nothing happens. For the `col_is_*()`-type functions, using #' `action_levels(warn_at = 1)` or `action_levels(stop_at = 1)` are good choices #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' #' Want to describe this validation step in some detail? Keep in mind that this #' is only useful if `x` is an *agent*. If that's the case, `brief` the agent #' with some text that fits. Don't worry if you don't want to do it. The #' *autobrief* protocol is kicked in when `brief = NULL` and a simple brief will #' then be automatically generated. #' #' @inheritParams col_vals_gt #' #' @return For the validation function, the return value is either a #' `ptblank_agent` object or a table object (depending on whether an agent #' object or a table was passed to `x`). The expectation function invisibly #' returns its input but, in the context of testing data, the function is #' called primarily for its potential side-effects (e.g., signaling failure). #' The test function returns a logical value. #' #' @examples #' # The `small_table` dataset in the #' # package has a `d` column that is #' # known to be numeric; the following #' # examples will validate that that #' # column is indeed of the `numeric` #' # class #' #' # A: Using an `agent` with validation #' # functions and then `interrogate()` #' #' # Validate that the column `d` has #' # the `numeric` class #' agent <- #' create_agent(small_table) %>% #' col_is_numeric(vars(d)) %>% #' interrogate() #' #' # Determine if this validation #' # had no failing test units (1) #' all_passed(agent) #' #' # Calling `agent` in the console #' # prints the agent's report; but we #' # can get a `gt_tbl` object directly #' # with `get_agent_report(agent)` #' #' # B: Using the validation function #' # directly on the data (no `agent`) #' #' # This way of using validation functions #' # acts as a data filter: data is passed #' # through but should `stop()` if there #' # is a single test unit failing; the #' # behavior of side effects can be #' # customized with the `actions` option #' small_table %>% #' col_is_numeric(vars(d)) %>% #' dplyr::slice(1:5) #' #' # C: Using the expectation function #' #' # With the `expect_*()` form, we would #' # typically perform one validation at a #' # time; this is primarily used in #' # testthat tests #' expect_col_is_numeric( #' small_table, vars(d) #' ) #' #' # D: Using the test function #' #' # With the `test_*()` form, we should #' # get a single logical value returned #' # to us #' small_table %>% #' test_col_is_numeric(vars(d)) #' #' @family validation functions #' @section Function ID: #' 2-17 #' #' @name col_is_numeric NULL #' @rdname col_is_numeric #' @import rlang #' @export col_is_numeric <- function(x, columns, actions = NULL, brief = NULL, active = TRUE) { preconditions <- NULL values <- NULL # Capture the `columns` expression columns <- rlang::enquo(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) if (is_a_table_object(x)) { secret_agent <- create_agent(x, name = "::QUIET::") %>% col_is_numeric( columns = columns, brief = brief, actions = prime_actions(actions), active = active ) %>% interrogate() return(x) } agent <- x if (is.null(brief)) { brief <- generate_autobriefs(agent, columns, preconditions, values, "col_is_numeric") } # Add one or more validation steps based on the # length of the `columns` variable for (i in seq(columns)) { agent <- create_validation_step( agent = agent, assertion_type = "col_is_numeric", column = columns[i], preconditions = NULL, actions = covert_actions(actions, agent), brief = brief[i], active = active ) } agent } #' @rdname col_is_numeric #' @import rlang #' @export expect_col_is_numeric <- function(object, columns, threshold = 1) { fn_name <- "expect_col_is_numeric" vs <- create_agent(tbl = object, name = "::QUIET::") %>% col_is_numeric( columns = {{ columns }}, actions = action_levels(notify_at = threshold) ) %>% interrogate() %>% .$validation_set x <- vs$notify %>% all() threshold_type <- get_threshold_type(threshold = threshold) if (threshold_type == "proportional") { failed_amount <- vs$f_failed } else { failed_amount <- vs$n_failed } if (inherits(vs$capture_stack[[1]]$warning, "simpleWarning")) { warning(conditionMessage(vs$capture_stack[[1]]$warning)) } if (inherits(vs$capture_stack[[1]]$error, "simpleError")) { stop(conditionMessage(vs$capture_stack[[1]]$error)) } act <- testthat::quasi_label(enquo(x), arg = "object") column_text <- prep_column_text(vs$column[[1]]) col_type <- "numeric" testthat::expect( ok = identical(!as.vector(act$val), TRUE), failure_message = glue::glue(failure_message_gluestring(fn_name = fn_name, lang = "en")) ) act$val <- object invisible(act$val) } #' @rdname col_is_numeric #' @import rlang #' @export test_col_is_numeric <- function(object, columns, threshold = 1) { vs <- create_agent(tbl = object, name = "::QUIET::") %>% col_is_numeric( columns = {{ columns }}, actions = action_levels(notify_at = threshold) ) %>% interrogate() %>% .$validation_set if (inherits(vs$capture_stack[[1]]$warning, "simpleWarning")) { warning(conditionMessage(vs$capture_stack[[1]]$warning)) } if (inherits(vs$capture_stack[[1]]$error, "simpleError")) { stop(conditionMessage(vs$capture_stack[[1]]$error)) } all(!vs$notify) }
/R/col_is_numeric.R
permissive
jordanmllr5/pointblank
R
false
false
7,942
r
#' Do the columns contain numeric values? #' #' The `col_is_numeric()` validation function, the `expect_col_is_numeric()` #' expectation function, and the `test_col_is_numeric()` test function all check #' whether one or more columns in a table is of the numeric type. Like many of #' the `col_is_*()`-type functions in **pointblank**, the only requirement is a #' specification of the column names. The validation function can be used #' directly on a data table or with an *agent* object (technically, a #' `ptblank_agent` object) whereas the expectation and test functions can only #' be used with a data table. The types of data tables that can be used include #' data frames, tibbles, and even database tables of `tbl_dbi` class. Each #' validation step or expectation will operate over a single test unit, which is #' whether the column is a numeric-type column or not. #' #' If providing multiple column names, the result will be an expansion of #' validation steps to that number of column names (e.g., `vars(col_a, col_b)` #' will result in the entry of two validation steps). Aside from column names in #' quotes and in `vars()`, **tidyselect** helper functions are available for #' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, #' `matches()`, and `everything()`. #' #' Often, we will want to specify `actions` for the validation. This argument, #' present in every validation function, takes a specially-crafted list #' object that is best produced by the [action_levels()] function. Read that #' function's documentation for the lowdown on how to create reactions to #' above-threshold failure levels in validation. The basic gist is that you'll #' want at least a single threshold level (specified as either the fraction test #' units failed, or, an absolute value), often using the `warn_at` argument. #' This is especially true when `x` is a table object because, otherwise, #' nothing happens. For the `col_is_*()`-type functions, using #' `action_levels(warn_at = 1)` or `action_levels(stop_at = 1)` are good choices #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' #' Want to describe this validation step in some detail? Keep in mind that this #' is only useful if `x` is an *agent*. If that's the case, `brief` the agent #' with some text that fits. Don't worry if you don't want to do it. The #' *autobrief* protocol is kicked in when `brief = NULL` and a simple brief will #' then be automatically generated. #' #' @inheritParams col_vals_gt #' #' @return For the validation function, the return value is either a #' `ptblank_agent` object or a table object (depending on whether an agent #' object or a table was passed to `x`). The expectation function invisibly #' returns its input but, in the context of testing data, the function is #' called primarily for its potential side-effects (e.g., signaling failure). #' The test function returns a logical value. #' #' @examples #' # The `small_table` dataset in the #' # package has a `d` column that is #' # known to be numeric; the following #' # examples will validate that that #' # column is indeed of the `numeric` #' # class #' #' # A: Using an `agent` with validation #' # functions and then `interrogate()` #' #' # Validate that the column `d` has #' # the `numeric` class #' agent <- #' create_agent(small_table) %>% #' col_is_numeric(vars(d)) %>% #' interrogate() #' #' # Determine if this validation #' # had no failing test units (1) #' all_passed(agent) #' #' # Calling `agent` in the console #' # prints the agent's report; but we #' # can get a `gt_tbl` object directly #' # with `get_agent_report(agent)` #' #' # B: Using the validation function #' # directly on the data (no `agent`) #' #' # This way of using validation functions #' # acts as a data filter: data is passed #' # through but should `stop()` if there #' # is a single test unit failing; the #' # behavior of side effects can be #' # customized with the `actions` option #' small_table %>% #' col_is_numeric(vars(d)) %>% #' dplyr::slice(1:5) #' #' # C: Using the expectation function #' #' # With the `expect_*()` form, we would #' # typically perform one validation at a #' # time; this is primarily used in #' # testthat tests #' expect_col_is_numeric( #' small_table, vars(d) #' ) #' #' # D: Using the test function #' #' # With the `test_*()` form, we should #' # get a single logical value returned #' # to us #' small_table %>% #' test_col_is_numeric(vars(d)) #' #' @family validation functions #' @section Function ID: #' 2-17 #' #' @name col_is_numeric NULL #' @rdname col_is_numeric #' @import rlang #' @export col_is_numeric <- function(x, columns, actions = NULL, brief = NULL, active = TRUE) { preconditions <- NULL values <- NULL # Capture the `columns` expression columns <- rlang::enquo(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) if (is_a_table_object(x)) { secret_agent <- create_agent(x, name = "::QUIET::") %>% col_is_numeric( columns = columns, brief = brief, actions = prime_actions(actions), active = active ) %>% interrogate() return(x) } agent <- x if (is.null(brief)) { brief <- generate_autobriefs(agent, columns, preconditions, values, "col_is_numeric") } # Add one or more validation steps based on the # length of the `columns` variable for (i in seq(columns)) { agent <- create_validation_step( agent = agent, assertion_type = "col_is_numeric", column = columns[i], preconditions = NULL, actions = covert_actions(actions, agent), brief = brief[i], active = active ) } agent } #' @rdname col_is_numeric #' @import rlang #' @export expect_col_is_numeric <- function(object, columns, threshold = 1) { fn_name <- "expect_col_is_numeric" vs <- create_agent(tbl = object, name = "::QUIET::") %>% col_is_numeric( columns = {{ columns }}, actions = action_levels(notify_at = threshold) ) %>% interrogate() %>% .$validation_set x <- vs$notify %>% all() threshold_type <- get_threshold_type(threshold = threshold) if (threshold_type == "proportional") { failed_amount <- vs$f_failed } else { failed_amount <- vs$n_failed } if (inherits(vs$capture_stack[[1]]$warning, "simpleWarning")) { warning(conditionMessage(vs$capture_stack[[1]]$warning)) } if (inherits(vs$capture_stack[[1]]$error, "simpleError")) { stop(conditionMessage(vs$capture_stack[[1]]$error)) } act <- testthat::quasi_label(enquo(x), arg = "object") column_text <- prep_column_text(vs$column[[1]]) col_type <- "numeric" testthat::expect( ok = identical(!as.vector(act$val), TRUE), failure_message = glue::glue(failure_message_gluestring(fn_name = fn_name, lang = "en")) ) act$val <- object invisible(act$val) } #' @rdname col_is_numeric #' @import rlang #' @export test_col_is_numeric <- function(object, columns, threshold = 1) { vs <- create_agent(tbl = object, name = "::QUIET::") %>% col_is_numeric( columns = {{ columns }}, actions = action_levels(notify_at = threshold) ) %>% interrogate() %>% .$validation_set if (inherits(vs$capture_stack[[1]]$warning, "simpleWarning")) { warning(conditionMessage(vs$capture_stack[[1]]$warning)) } if (inherits(vs$capture_stack[[1]]$error, "simpleError")) { stop(conditionMessage(vs$capture_stack[[1]]$error)) } all(!vs$notify) }
library(iso3166) context("Alpha 2") test_that("country names", { expect_equal(country_alpha_2("DE"), "Germany") expect_equal(country_alpha_2("ZA"), "South Africa") })
/tests/testthat/test_country_alpha_2.R
no_license
datawookie/pkg-iso-3166
R
false
false
173
r
library(iso3166) context("Alpha 2") test_that("country names", { expect_equal(country_alpha_2("DE"), "Germany") expect_equal(country_alpha_2("ZA"), "South Africa") })
# GOAL: create a more-flexible program that relies on functions as much as possible # possible precursor to writing a package # code folding ---- # alt-o, shift-alt-o # alt-l, shift-alt-l # alt-r # notes ---- # libraries ---- source(here::here("include", "libraries.r")) # remotes::install_github("tidyverse/dplyr") if needed devtools::session_info() (.packages()) %>% sort # globals ---- dbox <- "C:/Users/donbo/Dropbox (Personal)/50state_taxdata/" (fns <- paste0(c("acs_10krecs_5states", "acs_100krecs_20states", "acs_200krecs_50states", "acs_400krecs_50states"), ".rds")) # functions ---- source(here::here("include", "functions_scaling.r")) source(here::here("include", "functions_prep_dev.r")) # soon we will replace functions_prep.r with the dev version source(here::here("include", "functions_check_inputs.r")) source(here::here("include", "functions_ipopt.r")) # GET AND PREPARE SAVED DATA ---- # to create data used in this program, run the program below: # # create_ACS_subset_from_extract.r # # to create a subset suitable for targeting # choose which file to use samp1 <- readRDS(here::here("data", fns[2])) %>% select(-nrecs, -pop) # note that we no longer need nrecs; pop ordinarily would not be in the data so drop here and create later glimpse(samp1) summary(samp1) count(samp1, mar) # djb note that we have nrecs and pop variables -- I want to make sure they are not needed for anything ---- # if you want to target the total number of weighted records we need a variable that is 1 for all records ---- # PREPARE DATA ---- #.. modify the sample (don't think we need a function for this) ---- # - define income groups # - create an indicator for each income variable as to whether it is nonzero # _ expand categoricals into dummies as needed # if we don't have a variable such as pop where all values are 1, we should create it as it makes it easy to get weighted record counts samp2 <- samp1 %>% mutate(pid=row_number(), # pid -- an id variable for each person in the file incgroup=ntile(pincp, 10), # divide the data into 10 income ranges pop=1, # it's useful to have a variable that is 1 on every record # convert categoricals to dummies if we will base targets upon them mar1=ifelse(mar==1, 1, 0), # married mar5=ifelse(mar==5, 1, 0), # single marx15=ifelse(mar %nin% c(1, 5), 1, 0) ) summary(samp2) ht(samp2) #.. define the kinds of (weighted) targets we want and prepare the file accordingly ---- # sum: sum of values # nnz: number of nonzero values # sumneg: sum of negative values # nneg: number of zero values # sumpos: sum of positive value # npos: number of positive values # For the PUF the SOI data provide only the first two kinds of targets, but for the ACS we could have any of them. # TRY TO AVOID DEPENDENT CONSTRAINTS - redundancy - as they can make the problem very hard to solve. # For example, suppose there are 3 kinds of income (wages, interest, retirement) plus a total (sum of the 3) # -- don't create targets for each of the 3 kinds plus a target for the total -- leave one item out # Another, less obvious example: don't target the total number of returns plus the number for each marital status - leave one out. nnz_vars <- c("pop", "mar1", "mar5", "pincp", "wagp") # note that I leave the 3rd marital status out -- marx15 sum_vars <- c("pincp", "wagp", "intp", "pap", "retp", "ssip", "ssp") # DO NOT include total plus all sums - leave one out (otherincp) sumneg_vars <- "otherincp" # define a vector of variable names for "possible" targets (a superset) -- we may not target all possible_target_vars <- make_target_names( list(nnz_vars, sum_vars, sumneg_vars), c("nnz", "sum", "sumneg")) possible_target_vars # prepare data by creating variables with those names: # nnz, nneg, and npos will have 1 for rows where the respective variable is nz, neg, or pos, respectively, and 0 otherwise # sum will have its respective variable's value # sumneg and sumpos will have the variable's value if negative or positive, respectively, and 0 otherwise samp <- prep_data(samp2, possible_target_vars) glimpse(samp) ht(samp) summary(samp) # make sure there are no NAs -- there shouldn't be count(samp, stabbr) count(samp, incgroup) # SUMMARIZE the data ---- #.. count records ---- # the following requires the dev version of dplyr # remotes::install_github("tidyverse/dplyr") # may not be worth installing just for this count_recs(samp) %>% kable(format="rst", format.args = list(big.mark=",")) # this is just for information, not needed to move forward #.. get weighted summary values needed for developing constraints ---- summary_vals <- get_summary_vals(samp, .weight=pwgtp, .sum_vars=possible_target_vars, stabbr, incgroup) summary_vals # look at the summary values tlist <- get_tabs(summary_vals, .popvar=pop_nnz) names(tlist) tlist$wsum tlist$wcount tlist$wmean tlist$pctnz # Create a data frame with all targets for all states and income groups ---- # for the PUF, we will create this using information from Historical Table 2 # for the ACS, we construct the targets from the ACS data itself all_target_values <- summary_vals # now we have: # 1) properly-prepared data that includes all income groups, # 2) a set of targets for all income groups and all states # the next step is to prepare data and targets for a single income group # so that we can solve for optimal values # we will wrap that in functions so that we can loop through income groups # wrap everything we need for a single income group into a function that returns a list ---- # SINGLE INCOME GROUP ---- #.. define target incgroup, target variable names, and target values for each state in the income group ---- target_incgroup <- 2 # define target income group possible_target_vars (target_vars <- possible_target_vars[c(1, 3, 6, 7)]) target_vars <- possible_target_vars target_vars <- setdiff(possible_target_vars, c("pap_sum", "ssip_sum", "intp_sum", "otherincp_sumneg")) # define target values and states, for this income group targets_wide <- all_target_values %>% filter(incgroup==target_incgroup) %>% select(stabbr, incgroup, nrecs, all_of(target_vars)) # a small list of variables to target; we have nrecs because we created it in summary_vals targets_wide # these are the targets we want to hit target_states <- targets_wide$stabbr #.. get data for this income group: will include pid, incgroup, weight_total (national weight), and the target variables ---- incgroup_data <- prep_incgroup(.data=samp, .incgroup=target_incgroup, .weight=pwgtp, .target_vars=target_vars) targets_df <- get_targets(targets_wide, target_vars, .pid=incgroup_data$pid, .weight_total=incgroup_data$weight_total) tail(targets_df) # CONSTRUCT initial weights ---- #.. prepare the data we will reweight to hit (or come close to) the targets ---- # let's stack the data so that each person appears 1 time for each state that is targeted # create a stub with a record for every person and every targeted state # define initial weight for each person-state combination. This is important as the # optimization will try to keep the final weights near these initial weights. The # more we can improve these initial weights, the better the results are likely to be iweights <- get_initial_weights(targets_wide, incgroup_data, .popvar=pop_nnz) ht(iweights) # DEFINE constraint coefficients (cc) ---- cc_sparse <- get_constraint_coefficients(incgroup_data, target_vars, iweights, targets_df) # can take a while on big problems # DEFINE inputs for ipopt ---- inputs <- get_inputs(.targets_df=targets_df, .iweights=iweights, .cc_sparse=cc_sparse, .targtol=.02, .xub=50, .conscaling=FALSE, scale_goal=100) #.. examine constraints, revise if needed ---- names(inputs) inputs$n_constraints inputs$n_targets ht(inputs$cc_sparse) check <- check_constraints(inputs) summary(check) probs <- c(0, .5, .95, .96, .97, .98, .99, .995, .999, .9995, 1) quantile(abs(check$pdiff), na.rm=TRUE, probs) check %>% arrange(desc(abs(pdiff))) #.. OPTIONAL revise constraints ---- #.. VERIFY (if desired) that problem is set up properly ---- # eval_f_xm1sq(inputs$x0, inputs) # eval_grad_f_xm1sq(inputs$x0, inputs) # eval_g(inputs$x0, inputs) # eval_jac_g(inputs$x0, inputs) # OPTIMIZE ---- # CAUTION: If you use ma77, be sure to delete temporary files it created in the project # folder before rerunning or RStudio may bomb. # For LARGE problems use linear_solver=ma77, obj_scaling=1, and mehrotra_algorithm=yes opts <- list("print_level" = 0, "file_print_level" = 5, # integer "max_iter"= 100, "linear_solver" = "ma57", # mumps pardiso ma27 ma57 ma77 ma86 ma97 # "ma57_automatic_scaling" = "yes", # if using ma57 # "ma57_pre_alloc" = 3, # 1.05 is default; even changed, cannot allocate enough memory, however # "ma77_order" = "amd", # metis; amd -- not clear which is faster "mehrotra_algorithm" = "yes", "obj_scaling_factor" = 1, # 1e-3, # default 1; 1e-1 pretty fast to feasible but not to optimal # "nlp_scaling_method" = "equilibration-based", # NO - use default gradient_based "nlp_scaling_max_gradient" = 100, # default is 100 - seems good # "jac_c_constant" = "yes", # does not improve on moderate problems # "jac_d_constant" = "yes", # does not improve on moderate problems # "hessian_constant" = "yes", # KEEP default NO - if yes Ipopt asks for Hessian of Lagrangian function only once and reuses; default "no" # "hessian_approximation" = "limited-memory", # KEEP default of exact # "derivative_test" = "first-order", # "derivative_test_print_all" = "yes", "output_file" = here::here("out", "test1.out")) setwd(here::here("temp1")) getwd() result <- ipoptr(x0 = inputs$x0, lb = inputs$xlb, ub = inputs$xub, eval_f = eval_f_xm1sq, # arguments: x, inputs; eval_f_xtop eval_f_xm1sq eval_grad_f = eval_grad_f_xm1sq, # eval_grad_f_xtop eval_grad_f_xm1sq eval_g = eval_g, # constraints LHS - a vector of values eval_jac_g = eval_jac_g, eval_jac_g_structure = inputs$eval_jac_g_structure, eval_h = eval_h_xm1sq, # the hessian is essential for this problem eval_h_xtop eval_h_xm1sq eval_h_structure = inputs$eval_h_structure, constraint_lb = inputs$clb, constraint_ub = inputs$cub, opts = opts, inputs = inputs) # EVALUATE RESULTS ---- # saveRDS(result, here::here("results", "result.rds")) # result <- readRDS(here::here("results", "result.rds")) str(result) quantile(result$solution, probs=c(0, .001, .01, .05, .1, .25, .5, .75, .9, .95, .99, .999, 1)) result$solution %>% sort() %>% ht(25) result$solution %>% sort() %>% head(10000) start <- 26e3 result$solution %>% sort() %>% .[start:(start + 1e3)] result$constraints # now show the actual constraints and results # slicen <- 15 # constraints_start %>% # mutate(confinal=eval_g(result$solution, inputs)) %>% # slice(1:slicen, (n() - slicen + 1):n()) %>% # kable(digits=0, format="rst", format.args=list(big.mark=",")) str(inputs) stub <- iweights %>% mutate(x=result$solution, weight=iweight_state * x) stub probs <- c(0, .01, .05, .1, .25, .5, .75, .9, .95, .99) quantile(stub$weight, probs) %>% round(3) sum(stub$weight) stub %>% group_by(pid) %>% summarise(weight_total=first(weight_total), iweight=sum(iweight_state), weight=sum(weight)) %>% mutate(diff=weight - weight_total) %>% arrange(-abs(diff)) comp <- base_data %>% pivot_longer() mutate(x=result$solution, weight=iweight * x) %>% group_by(stabbr) %>% summarise_at(vars(all_of(target_vars)), list(initial = ~sum(. * iweight), solution = ~sum(. * weight))) %>% pivot_longer(-stabbr) %>% separate(name, into=c("name1", "name2", "type"), fill="left") %>% unite(name, name1, name2, na.rm=TRUE) %>% bind_rows(targets %>% select(stabbr, all_of(target_vars)) %>% pivot_longer(-stabbr) %>% mutate(type="target")) slicen <- 15 comp %>% pivot_wider(names_from = type) %>% select(stabbr, name, target, initial, solution) %>% mutate(idiff=initial - target, diff=solution - target, pdiff=diff / target * 100) %>% arrange(-abs(pdiff)) %>% slice(1:slicen, (n() - slicen + 1):n()) %>% kable(digits=c(rep(0, 7), 2), format="rst", format.args=list(big.mark=",")) # what states did the record weights come from? stub %>% mutate(x=result$solution, weight=iweight * x) %>% group_by(stabbr_true, stabbr) %>% summarise_at(vars(pwgtp, weight), sum) %>% pivot_wider(names_from = stabbr, values_from = weight) %>% select(1:15) %>% kable(digits=1, format="rst", format.args=list(big.mark=",")) stub %>% mutate(x=result$solution, weight=iweight * x) %>% group_by(stabbr_true, stabbr) %>% summarise_at(vars(pwgtp, weight), sum) %>% group_by(stabbr) %>% mutate(pct_true=pwgtp / sum(pwgtp) * 100) %>% group_by(stabbr_true) %>% mutate(pct_est=weight / sum(weight) * 100) %>% select(-weight) %>% pivot_wider(names_from = stabbr, values_from = pct_est) %>% select(c(1:12, MA, MI, NY, OH, PA, TX)) %>% kable(digits=c(0, 0, rep(2, 50)), format="rst", format.args=list(big.mark=",")) # how did we do against the adding-up goal? ratios <- stub %>% mutate(x=result$solution, weight=iweight * x) %>% group_by(p) %>% summarise(pwgtp=first(pwgtp), weight=sum(weight)) %>% mutate(ratio=weight / pwgtp) quantile(ratios$ratio, probs = c(0, .01, .05, .1, .25, .5, .75, .9, .95, .99, 1)) # ma77 notes # !!! DELETE ANY ma77* FILES IN WORKING DIRECTORY BEFORE RUNNING ma77 !!!!---- # when we get to here we should have puf4 and targets # maybe adjust threads for faster ma86?? I haven't found anything that works # print(Sys.unsetenv("OMP_NUM_THREADS")) # unset the threads environment variable # Sys.getenv(c("R_HOME", "OMP_NUM_THREADS")) # print(Sys.setenv(OMP_NUM_THREADS = 6)) # Sys.getenv(c("R_HOME", "OMP_NUM_THREADS"))
/r/StateWeights_general_parallel.r
no_license
Peter-Metz/50_state_taxdata
R
false
false
14,235
r
# GOAL: create a more-flexible program that relies on functions as much as possible # possible precursor to writing a package # code folding ---- # alt-o, shift-alt-o # alt-l, shift-alt-l # alt-r # notes ---- # libraries ---- source(here::here("include", "libraries.r")) # remotes::install_github("tidyverse/dplyr") if needed devtools::session_info() (.packages()) %>% sort # globals ---- dbox <- "C:/Users/donbo/Dropbox (Personal)/50state_taxdata/" (fns <- paste0(c("acs_10krecs_5states", "acs_100krecs_20states", "acs_200krecs_50states", "acs_400krecs_50states"), ".rds")) # functions ---- source(here::here("include", "functions_scaling.r")) source(here::here("include", "functions_prep_dev.r")) # soon we will replace functions_prep.r with the dev version source(here::here("include", "functions_check_inputs.r")) source(here::here("include", "functions_ipopt.r")) # GET AND PREPARE SAVED DATA ---- # to create data used in this program, run the program below: # # create_ACS_subset_from_extract.r # # to create a subset suitable for targeting # choose which file to use samp1 <- readRDS(here::here("data", fns[2])) %>% select(-nrecs, -pop) # note that we no longer need nrecs; pop ordinarily would not be in the data so drop here and create later glimpse(samp1) summary(samp1) count(samp1, mar) # djb note that we have nrecs and pop variables -- I want to make sure they are not needed for anything ---- # if you want to target the total number of weighted records we need a variable that is 1 for all records ---- # PREPARE DATA ---- #.. modify the sample (don't think we need a function for this) ---- # - define income groups # - create an indicator for each income variable as to whether it is nonzero # _ expand categoricals into dummies as needed # if we don't have a variable such as pop where all values are 1, we should create it as it makes it easy to get weighted record counts samp2 <- samp1 %>% mutate(pid=row_number(), # pid -- an id variable for each person in the file incgroup=ntile(pincp, 10), # divide the data into 10 income ranges pop=1, # it's useful to have a variable that is 1 on every record # convert categoricals to dummies if we will base targets upon them mar1=ifelse(mar==1, 1, 0), # married mar5=ifelse(mar==5, 1, 0), # single marx15=ifelse(mar %nin% c(1, 5), 1, 0) ) summary(samp2) ht(samp2) #.. define the kinds of (weighted) targets we want and prepare the file accordingly ---- # sum: sum of values # nnz: number of nonzero values # sumneg: sum of negative values # nneg: number of zero values # sumpos: sum of positive value # npos: number of positive values # For the PUF the SOI data provide only the first two kinds of targets, but for the ACS we could have any of them. # TRY TO AVOID DEPENDENT CONSTRAINTS - redundancy - as they can make the problem very hard to solve. # For example, suppose there are 3 kinds of income (wages, interest, retirement) plus a total (sum of the 3) # -- don't create targets for each of the 3 kinds plus a target for the total -- leave one item out # Another, less obvious example: don't target the total number of returns plus the number for each marital status - leave one out. nnz_vars <- c("pop", "mar1", "mar5", "pincp", "wagp") # note that I leave the 3rd marital status out -- marx15 sum_vars <- c("pincp", "wagp", "intp", "pap", "retp", "ssip", "ssp") # DO NOT include total plus all sums - leave one out (otherincp) sumneg_vars <- "otherincp" # define a vector of variable names for "possible" targets (a superset) -- we may not target all possible_target_vars <- make_target_names( list(nnz_vars, sum_vars, sumneg_vars), c("nnz", "sum", "sumneg")) possible_target_vars # prepare data by creating variables with those names: # nnz, nneg, and npos will have 1 for rows where the respective variable is nz, neg, or pos, respectively, and 0 otherwise # sum will have its respective variable's value # sumneg and sumpos will have the variable's value if negative or positive, respectively, and 0 otherwise samp <- prep_data(samp2, possible_target_vars) glimpse(samp) ht(samp) summary(samp) # make sure there are no NAs -- there shouldn't be count(samp, stabbr) count(samp, incgroup) # SUMMARIZE the data ---- #.. count records ---- # the following requires the dev version of dplyr # remotes::install_github("tidyverse/dplyr") # may not be worth installing just for this count_recs(samp) %>% kable(format="rst", format.args = list(big.mark=",")) # this is just for information, not needed to move forward #.. get weighted summary values needed for developing constraints ---- summary_vals <- get_summary_vals(samp, .weight=pwgtp, .sum_vars=possible_target_vars, stabbr, incgroup) summary_vals # look at the summary values tlist <- get_tabs(summary_vals, .popvar=pop_nnz) names(tlist) tlist$wsum tlist$wcount tlist$wmean tlist$pctnz # Create a data frame with all targets for all states and income groups ---- # for the PUF, we will create this using information from Historical Table 2 # for the ACS, we construct the targets from the ACS data itself all_target_values <- summary_vals # now we have: # 1) properly-prepared data that includes all income groups, # 2) a set of targets for all income groups and all states # the next step is to prepare data and targets for a single income group # so that we can solve for optimal values # we will wrap that in functions so that we can loop through income groups # wrap everything we need for a single income group into a function that returns a list ---- # SINGLE INCOME GROUP ---- #.. define target incgroup, target variable names, and target values for each state in the income group ---- target_incgroup <- 2 # define target income group possible_target_vars (target_vars <- possible_target_vars[c(1, 3, 6, 7)]) target_vars <- possible_target_vars target_vars <- setdiff(possible_target_vars, c("pap_sum", "ssip_sum", "intp_sum", "otherincp_sumneg")) # define target values and states, for this income group targets_wide <- all_target_values %>% filter(incgroup==target_incgroup) %>% select(stabbr, incgroup, nrecs, all_of(target_vars)) # a small list of variables to target; we have nrecs because we created it in summary_vals targets_wide # these are the targets we want to hit target_states <- targets_wide$stabbr #.. get data for this income group: will include pid, incgroup, weight_total (national weight), and the target variables ---- incgroup_data <- prep_incgroup(.data=samp, .incgroup=target_incgroup, .weight=pwgtp, .target_vars=target_vars) targets_df <- get_targets(targets_wide, target_vars, .pid=incgroup_data$pid, .weight_total=incgroup_data$weight_total) tail(targets_df) # CONSTRUCT initial weights ---- #.. prepare the data we will reweight to hit (or come close to) the targets ---- # let's stack the data so that each person appears 1 time for each state that is targeted # create a stub with a record for every person and every targeted state # define initial weight for each person-state combination. This is important as the # optimization will try to keep the final weights near these initial weights. The # more we can improve these initial weights, the better the results are likely to be iweights <- get_initial_weights(targets_wide, incgroup_data, .popvar=pop_nnz) ht(iweights) # DEFINE constraint coefficients (cc) ---- cc_sparse <- get_constraint_coefficients(incgroup_data, target_vars, iweights, targets_df) # can take a while on big problems # DEFINE inputs for ipopt ---- inputs <- get_inputs(.targets_df=targets_df, .iweights=iweights, .cc_sparse=cc_sparse, .targtol=.02, .xub=50, .conscaling=FALSE, scale_goal=100) #.. examine constraints, revise if needed ---- names(inputs) inputs$n_constraints inputs$n_targets ht(inputs$cc_sparse) check <- check_constraints(inputs) summary(check) probs <- c(0, .5, .95, .96, .97, .98, .99, .995, .999, .9995, 1) quantile(abs(check$pdiff), na.rm=TRUE, probs) check %>% arrange(desc(abs(pdiff))) #.. OPTIONAL revise constraints ---- #.. VERIFY (if desired) that problem is set up properly ---- # eval_f_xm1sq(inputs$x0, inputs) # eval_grad_f_xm1sq(inputs$x0, inputs) # eval_g(inputs$x0, inputs) # eval_jac_g(inputs$x0, inputs) # OPTIMIZE ---- # CAUTION: If you use ma77, be sure to delete temporary files it created in the project # folder before rerunning or RStudio may bomb. # For LARGE problems use linear_solver=ma77, obj_scaling=1, and mehrotra_algorithm=yes opts <- list("print_level" = 0, "file_print_level" = 5, # integer "max_iter"= 100, "linear_solver" = "ma57", # mumps pardiso ma27 ma57 ma77 ma86 ma97 # "ma57_automatic_scaling" = "yes", # if using ma57 # "ma57_pre_alloc" = 3, # 1.05 is default; even changed, cannot allocate enough memory, however # "ma77_order" = "amd", # metis; amd -- not clear which is faster "mehrotra_algorithm" = "yes", "obj_scaling_factor" = 1, # 1e-3, # default 1; 1e-1 pretty fast to feasible but not to optimal # "nlp_scaling_method" = "equilibration-based", # NO - use default gradient_based "nlp_scaling_max_gradient" = 100, # default is 100 - seems good # "jac_c_constant" = "yes", # does not improve on moderate problems # "jac_d_constant" = "yes", # does not improve on moderate problems # "hessian_constant" = "yes", # KEEP default NO - if yes Ipopt asks for Hessian of Lagrangian function only once and reuses; default "no" # "hessian_approximation" = "limited-memory", # KEEP default of exact # "derivative_test" = "first-order", # "derivative_test_print_all" = "yes", "output_file" = here::here("out", "test1.out")) setwd(here::here("temp1")) getwd() result <- ipoptr(x0 = inputs$x0, lb = inputs$xlb, ub = inputs$xub, eval_f = eval_f_xm1sq, # arguments: x, inputs; eval_f_xtop eval_f_xm1sq eval_grad_f = eval_grad_f_xm1sq, # eval_grad_f_xtop eval_grad_f_xm1sq eval_g = eval_g, # constraints LHS - a vector of values eval_jac_g = eval_jac_g, eval_jac_g_structure = inputs$eval_jac_g_structure, eval_h = eval_h_xm1sq, # the hessian is essential for this problem eval_h_xtop eval_h_xm1sq eval_h_structure = inputs$eval_h_structure, constraint_lb = inputs$clb, constraint_ub = inputs$cub, opts = opts, inputs = inputs) # EVALUATE RESULTS ---- # saveRDS(result, here::here("results", "result.rds")) # result <- readRDS(here::here("results", "result.rds")) str(result) quantile(result$solution, probs=c(0, .001, .01, .05, .1, .25, .5, .75, .9, .95, .99, .999, 1)) result$solution %>% sort() %>% ht(25) result$solution %>% sort() %>% head(10000) start <- 26e3 result$solution %>% sort() %>% .[start:(start + 1e3)] result$constraints # now show the actual constraints and results # slicen <- 15 # constraints_start %>% # mutate(confinal=eval_g(result$solution, inputs)) %>% # slice(1:slicen, (n() - slicen + 1):n()) %>% # kable(digits=0, format="rst", format.args=list(big.mark=",")) str(inputs) stub <- iweights %>% mutate(x=result$solution, weight=iweight_state * x) stub probs <- c(0, .01, .05, .1, .25, .5, .75, .9, .95, .99) quantile(stub$weight, probs) %>% round(3) sum(stub$weight) stub %>% group_by(pid) %>% summarise(weight_total=first(weight_total), iweight=sum(iweight_state), weight=sum(weight)) %>% mutate(diff=weight - weight_total) %>% arrange(-abs(diff)) comp <- base_data %>% pivot_longer() mutate(x=result$solution, weight=iweight * x) %>% group_by(stabbr) %>% summarise_at(vars(all_of(target_vars)), list(initial = ~sum(. * iweight), solution = ~sum(. * weight))) %>% pivot_longer(-stabbr) %>% separate(name, into=c("name1", "name2", "type"), fill="left") %>% unite(name, name1, name2, na.rm=TRUE) %>% bind_rows(targets %>% select(stabbr, all_of(target_vars)) %>% pivot_longer(-stabbr) %>% mutate(type="target")) slicen <- 15 comp %>% pivot_wider(names_from = type) %>% select(stabbr, name, target, initial, solution) %>% mutate(idiff=initial - target, diff=solution - target, pdiff=diff / target * 100) %>% arrange(-abs(pdiff)) %>% slice(1:slicen, (n() - slicen + 1):n()) %>% kable(digits=c(rep(0, 7), 2), format="rst", format.args=list(big.mark=",")) # what states did the record weights come from? stub %>% mutate(x=result$solution, weight=iweight * x) %>% group_by(stabbr_true, stabbr) %>% summarise_at(vars(pwgtp, weight), sum) %>% pivot_wider(names_from = stabbr, values_from = weight) %>% select(1:15) %>% kable(digits=1, format="rst", format.args=list(big.mark=",")) stub %>% mutate(x=result$solution, weight=iweight * x) %>% group_by(stabbr_true, stabbr) %>% summarise_at(vars(pwgtp, weight), sum) %>% group_by(stabbr) %>% mutate(pct_true=pwgtp / sum(pwgtp) * 100) %>% group_by(stabbr_true) %>% mutate(pct_est=weight / sum(weight) * 100) %>% select(-weight) %>% pivot_wider(names_from = stabbr, values_from = pct_est) %>% select(c(1:12, MA, MI, NY, OH, PA, TX)) %>% kable(digits=c(0, 0, rep(2, 50)), format="rst", format.args=list(big.mark=",")) # how did we do against the adding-up goal? ratios <- stub %>% mutate(x=result$solution, weight=iweight * x) %>% group_by(p) %>% summarise(pwgtp=first(pwgtp), weight=sum(weight)) %>% mutate(ratio=weight / pwgtp) quantile(ratios$ratio, probs = c(0, .01, .05, .1, .25, .5, .75, .9, .95, .99, 1)) # ma77 notes # !!! DELETE ANY ma77* FILES IN WORKING DIRECTORY BEFORE RUNNING ma77 !!!!---- # when we get to here we should have puf4 and targets # maybe adjust threads for faster ma86?? I haven't found anything that works # print(Sys.unsetenv("OMP_NUM_THREADS")) # unset the threads environment variable # Sys.getenv(c("R_HOME", "OMP_NUM_THREADS")) # print(Sys.setenv(OMP_NUM_THREADS = 6)) # Sys.getenv(c("R_HOME", "OMP_NUM_THREADS"))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/segmentationCBS.R \name{segmentationCBS} \alias{segmentationCBS} \title{CBS segmentation} \usage{ segmentationCBS(normal, tumor, log.ratio, seg, plot.cnv, sampleid, interval.weight.file = NULL, target.weight.file = NULL, alpha = 0.005, undo.SD = NULL, vcf = NULL, tumor.id.in.vcf = 1, normal.id.in.vcf = NULL, max.segments = NULL, prune.hclust.h = NULL, prune.hclust.method = "ward.D", chr.hash = NULL, centromeres = NULL) } \arguments{ \item{normal}{Coverage data for normal sample.} \item{tumor}{Coverage data for tumor sample.} \item{log.ratio}{Copy number log-ratios, one for each target in the coverage files.} \item{seg}{If segmentation was provided by the user, this data structure will contain this segmentation. Useful for minimal segmentation functions. Otherwise PureCN will re-segment the data. This segmentation function ignores this user provided segmentation.} \item{plot.cnv}{Segmentation plots.} \item{sampleid}{Sample id, used in output files.} \item{interval.weight.file}{Can be used to assign weights to intervals.} \item{target.weight.file}{Deprecated.} \item{alpha}{Alpha value for CBS, see documentation for the \code{segment} function.} \item{undo.SD}{\code{undo.SD} for CBS, see documentation of the \code{segment} function. If NULL, try to find a sensible default.} \item{vcf}{Optional \code{CollapsedVCF} object with germline allelic ratios.} \item{tumor.id.in.vcf}{Id of tumor in case multiple samples are stored in VCF.} \item{normal.id.in.vcf}{Id of normal in in VCF. Currently not used.} \item{max.segments}{If not \code{NULL}, try a higher \code{undo.SD} parameter if number of segments exceeds the threshold.} \item{prune.hclust.h}{Height in the \code{hclust} pruning step. Increasing this value will merge segments more aggressively. If NULL, try to find a sensible default.} \item{prune.hclust.method}{Cluster method used in the \code{hclust} pruning step. See documentation for the \code{hclust} function.} \item{chr.hash}{Mapping of non-numerical chromsome names to numerical names (e.g. chr1 to 1, chr2 to 2, etc.). If \code{NULL}, assume chromsomes are properly ordered.} \item{centromeres}{A \code{GRanges} object with centromere positions. Currently not supported in this function.} } \value{ \code{data.frame} containing the segmentation. } \description{ The default segmentation function. This function is called via the \code{fun.segmentation} argument of \code{\link{runAbsoluteCN}}. The arguments are passed via \code{args.segmentation}. } \examples{ normal.coverage.file <- system.file("extdata", "example_normal_tiny.txt", package="PureCN") tumor.coverage.file <- system.file("extdata", "example_tumor_tiny.txt", package="PureCN") vcf.file <- system.file("extdata", "example.vcf.gz", package="PureCN") interval.file <- system.file("extdata", "example_intervals_tiny.txt", package="PureCN") # The max.candidate.solutions, max.ploidy and test.purity parameters are set to # non-default values to speed-up this example. This is not a good idea for real # samples. ret <-runAbsoluteCN(normal.coverage.file=normal.coverage.file, tumor.coverage.file=tumor.coverage.file, vcf.file=vcf.file, genome="hg19", sampleid="Sample1", interval.file=interval.file, max.candidate.solutions=1, max.ploidy=4, test.purity=seq(0.3,0.7,by=0.05), fun.segmentation=segmentationCBS, args.segmentation=list(alpha=0.001)) } \references{ Olshen, A. B., Venkatraman, E. S., Lucito, R., Wigler, M. (2004). Circular binary segmentation for the analysis of array-based DNA copy number data. Biostatistics 5: 557-572. Venkatraman, E. S., Olshen, A. B. (2007). A faster circular binary segmentation algorithm for the analysis of array CGH data. Bioinformatics 23: 657-63. } \seealso{ \code{\link{runAbsoluteCN}} } \author{ Markus Riester }
/man/segmentationCBS.Rd
permissive
HaoxiangLin/PureCN
R
false
true
3,908
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/segmentationCBS.R \name{segmentationCBS} \alias{segmentationCBS} \title{CBS segmentation} \usage{ segmentationCBS(normal, tumor, log.ratio, seg, plot.cnv, sampleid, interval.weight.file = NULL, target.weight.file = NULL, alpha = 0.005, undo.SD = NULL, vcf = NULL, tumor.id.in.vcf = 1, normal.id.in.vcf = NULL, max.segments = NULL, prune.hclust.h = NULL, prune.hclust.method = "ward.D", chr.hash = NULL, centromeres = NULL) } \arguments{ \item{normal}{Coverage data for normal sample.} \item{tumor}{Coverage data for tumor sample.} \item{log.ratio}{Copy number log-ratios, one for each target in the coverage files.} \item{seg}{If segmentation was provided by the user, this data structure will contain this segmentation. Useful for minimal segmentation functions. Otherwise PureCN will re-segment the data. This segmentation function ignores this user provided segmentation.} \item{plot.cnv}{Segmentation plots.} \item{sampleid}{Sample id, used in output files.} \item{interval.weight.file}{Can be used to assign weights to intervals.} \item{target.weight.file}{Deprecated.} \item{alpha}{Alpha value for CBS, see documentation for the \code{segment} function.} \item{undo.SD}{\code{undo.SD} for CBS, see documentation of the \code{segment} function. If NULL, try to find a sensible default.} \item{vcf}{Optional \code{CollapsedVCF} object with germline allelic ratios.} \item{tumor.id.in.vcf}{Id of tumor in case multiple samples are stored in VCF.} \item{normal.id.in.vcf}{Id of normal in in VCF. Currently not used.} \item{max.segments}{If not \code{NULL}, try a higher \code{undo.SD} parameter if number of segments exceeds the threshold.} \item{prune.hclust.h}{Height in the \code{hclust} pruning step. Increasing this value will merge segments more aggressively. If NULL, try to find a sensible default.} \item{prune.hclust.method}{Cluster method used in the \code{hclust} pruning step. See documentation for the \code{hclust} function.} \item{chr.hash}{Mapping of non-numerical chromsome names to numerical names (e.g. chr1 to 1, chr2 to 2, etc.). If \code{NULL}, assume chromsomes are properly ordered.} \item{centromeres}{A \code{GRanges} object with centromere positions. Currently not supported in this function.} } \value{ \code{data.frame} containing the segmentation. } \description{ The default segmentation function. This function is called via the \code{fun.segmentation} argument of \code{\link{runAbsoluteCN}}. The arguments are passed via \code{args.segmentation}. } \examples{ normal.coverage.file <- system.file("extdata", "example_normal_tiny.txt", package="PureCN") tumor.coverage.file <- system.file("extdata", "example_tumor_tiny.txt", package="PureCN") vcf.file <- system.file("extdata", "example.vcf.gz", package="PureCN") interval.file <- system.file("extdata", "example_intervals_tiny.txt", package="PureCN") # The max.candidate.solutions, max.ploidy and test.purity parameters are set to # non-default values to speed-up this example. This is not a good idea for real # samples. ret <-runAbsoluteCN(normal.coverage.file=normal.coverage.file, tumor.coverage.file=tumor.coverage.file, vcf.file=vcf.file, genome="hg19", sampleid="Sample1", interval.file=interval.file, max.candidate.solutions=1, max.ploidy=4, test.purity=seq(0.3,0.7,by=0.05), fun.segmentation=segmentationCBS, args.segmentation=list(alpha=0.001)) } \references{ Olshen, A. B., Venkatraman, E. S., Lucito, R., Wigler, M. (2004). Circular binary segmentation for the analysis of array-based DNA copy number data. Biostatistics 5: 557-572. Venkatraman, E. S., Olshen, A. B. (2007). A faster circular binary segmentation algorithm for the analysis of array CGH data. Bioinformatics 23: 657-63. } \seealso{ \code{\link{runAbsoluteCN}} } \author{ Markus Riester }
library(tidyverse) concrete <- read.csv("Concrete_Data.csv") df <- concrete %>% select(Cement , Concrete_compressive_strength) target_model <- lm(Concrete_compressive_strength ~ . ,data=df) ( target_coefficients <- target_model$coefficients ) MSE <- function(df, beta){ pred <- beta[1] + beta[2]*df[,1] obs <- df[,2] return( (1/nrow(df))*sum(obs-pred)^2 ) } GradRSS <- function(df, beta){ pred <- beta[1] + beta[2]*df[,1] obs <- df[,2] n <- nrow(df) g1 <- (-2/n)*sum(obs-pred) g2 <- (-2/n)*sum( (obs-pred) * df[,1]) return(c(g1,g2) ) } beta <- c(13,0.1) # starting value tol <- 1e-8 cost_values <- c() n <- 1 for(n in 1:1200){ alpha = 2/(n+1) # decaying learning rate beta <- beta - alpha * GradRSS(df,beta) / norm(as.matrix(GradRSS(df,beta))) cost_values[n] <- MSE(df,beta) } print(beta)
/concrete_simple.R
no_license
kdayers/COVID_19
R
false
false
818
r
library(tidyverse) concrete <- read.csv("Concrete_Data.csv") df <- concrete %>% select(Cement , Concrete_compressive_strength) target_model <- lm(Concrete_compressive_strength ~ . ,data=df) ( target_coefficients <- target_model$coefficients ) MSE <- function(df, beta){ pred <- beta[1] + beta[2]*df[,1] obs <- df[,2] return( (1/nrow(df))*sum(obs-pred)^2 ) } GradRSS <- function(df, beta){ pred <- beta[1] + beta[2]*df[,1] obs <- df[,2] n <- nrow(df) g1 <- (-2/n)*sum(obs-pred) g2 <- (-2/n)*sum( (obs-pred) * df[,1]) return(c(g1,g2) ) } beta <- c(13,0.1) # starting value tol <- 1e-8 cost_values <- c() n <- 1 for(n in 1:1200){ alpha = 2/(n+1) # decaying learning rate beta <- beta - alpha * GradRSS(df,beta) / norm(as.matrix(GradRSS(df,beta))) cost_values[n] <- MSE(df,beta) } print(beta)
\name{swDynamicHeight} \alias{swDynamicHeight} \title{Dynamic height of seawater profile} \description{Compute the dynamic height of a column of seawater.} \usage{swDynamicHeight(x, referencePressure=2000)} \arguments{ \item{x}{a \code{section} object, \strong{or} a \code{ctd} object.} \item{referencePressure}{reference pressure [dbar]} } \details{If the first argument is a \code{section}, then dynamic height is calculated for each station within a section, and returns a list containing distance along the section along with dynamic height. If the first argument is a \code{ctd}, then this returns just a single value, the dynamic height. Stations are analysed in steps. First, a piecewise-linear model of the density variation with pressure is developed using \code{\link[stats]{approxfun}}. (The option \code{rule=2} is used to extrapolate the uppermost density up to the surface, preventing a possible a bias for bottle data, in which the first depth may be a few metres below the surface.) A second function is constructed as the density of water with salinity 35PSU, temperature of 0\eqn{^\circ}{deg}C, and pressure as in the \code{ctd}. The reciprocal difference of these densities is then integrated using \code{\link[stats]{integrate}} with pressure limits \code{0} to \code{referencePressure}, and divided by the acceleration due to gravity, to calculate the dynamic height. If the water column is too short to have bottom pressure exceeding \code{referencePressure}, a missing value is reported.} \value{In the first form, a list containing \code{distance}, the distance [km] from the first station in the section and \code{height}, the dynamic height [m]. In the second form, a single value, containing the dynamic height [m]. } \examples{ \dontrun{ library(oce) # Dynamic height and geostrophy par(mfcol=c(2,2)) par(mar=c(4.5,4.5,2,1)) # Left-hand column: whole section # (The smoothing lowers Gulf Stream speed greatly) westToEast <- subset(section, 1<=stationId&stationId<=123) dh <- swDynamicHeight(westToEast) plot(dh$distance, dh$height, type='p', xlab="", ylab="dyn. height [m]") ok <- !is.na(dh$height) smu <- supsmu(dh$distance, dh$height) lines(smu, col="blue") f <- coriolis(section[["station", 1]][["latitude"]]) g <- gravity(section[["station", 1]][["latitude"]]) v <- diff(smu$y)/diff(smu$x) * g / f / 1e3 # 1e3 converts to m plot(smu$x[-1], v, type='l', col="blue", xlab="distance [km]", ylab="velocity [m/s]") # right-hand column: gulf stream region, unsmoothed gs <- subset(section, 102<=stationId&stationId<=124) dh.gs <- swDynamicHeight(gs) plot(dh.gs$distance, dh.gs$height, type='b', xlab="", ylab="dyn. height [m]") v <- diff(dh.gs$height)/diff(dh.gs$distance) * g / f / 1e3 plot(dh.gs$distance[-1], v, type='l', col="blue", xlab="distance [km]", ylab="velocity [m/s]") } } \references{Gill, A.E., 1982. \emph{Atmosphere-ocean Dynamics}, Academic Press, New York, 662 pp.} \author{Dan Kelley} \keyword{misc}
/man/swDynamicHeight.Rd
no_license
richardsc/oce
R
false
false
3,018
rd
\name{swDynamicHeight} \alias{swDynamicHeight} \title{Dynamic height of seawater profile} \description{Compute the dynamic height of a column of seawater.} \usage{swDynamicHeight(x, referencePressure=2000)} \arguments{ \item{x}{a \code{section} object, \strong{or} a \code{ctd} object.} \item{referencePressure}{reference pressure [dbar]} } \details{If the first argument is a \code{section}, then dynamic height is calculated for each station within a section, and returns a list containing distance along the section along with dynamic height. If the first argument is a \code{ctd}, then this returns just a single value, the dynamic height. Stations are analysed in steps. First, a piecewise-linear model of the density variation with pressure is developed using \code{\link[stats]{approxfun}}. (The option \code{rule=2} is used to extrapolate the uppermost density up to the surface, preventing a possible a bias for bottle data, in which the first depth may be a few metres below the surface.) A second function is constructed as the density of water with salinity 35PSU, temperature of 0\eqn{^\circ}{deg}C, and pressure as in the \code{ctd}. The reciprocal difference of these densities is then integrated using \code{\link[stats]{integrate}} with pressure limits \code{0} to \code{referencePressure}, and divided by the acceleration due to gravity, to calculate the dynamic height. If the water column is too short to have bottom pressure exceeding \code{referencePressure}, a missing value is reported.} \value{In the first form, a list containing \code{distance}, the distance [km] from the first station in the section and \code{height}, the dynamic height [m]. In the second form, a single value, containing the dynamic height [m]. } \examples{ \dontrun{ library(oce) # Dynamic height and geostrophy par(mfcol=c(2,2)) par(mar=c(4.5,4.5,2,1)) # Left-hand column: whole section # (The smoothing lowers Gulf Stream speed greatly) westToEast <- subset(section, 1<=stationId&stationId<=123) dh <- swDynamicHeight(westToEast) plot(dh$distance, dh$height, type='p', xlab="", ylab="dyn. height [m]") ok <- !is.na(dh$height) smu <- supsmu(dh$distance, dh$height) lines(smu, col="blue") f <- coriolis(section[["station", 1]][["latitude"]]) g <- gravity(section[["station", 1]][["latitude"]]) v <- diff(smu$y)/diff(smu$x) * g / f / 1e3 # 1e3 converts to m plot(smu$x[-1], v, type='l', col="blue", xlab="distance [km]", ylab="velocity [m/s]") # right-hand column: gulf stream region, unsmoothed gs <- subset(section, 102<=stationId&stationId<=124) dh.gs <- swDynamicHeight(gs) plot(dh.gs$distance, dh.gs$height, type='b', xlab="", ylab="dyn. height [m]") v <- diff(dh.gs$height)/diff(dh.gs$distance) * g / f / 1e3 plot(dh.gs$distance[-1], v, type='l', col="blue", xlab="distance [km]", ylab="velocity [m/s]") } } \references{Gill, A.E., 1982. \emph{Atmosphere-ocean Dynamics}, Academic Press, New York, 662 pp.} \author{Dan Kelley} \keyword{misc}
# Commands to genereate the help files: # load("data/trade.RData") # roxygen2::roxygenise(roclets = "rd") #' Fixed effects maximum likelihood models #' #' This function estimates maximum likelihood models (e.g., Poisson or Logit) and is efficient to handle any number of fixed effects (i.e. cluster variables). It further allows for nonlinear in parameters right hand sides. #' #' @param fml A formula. This formula gives the linear formula to be estimated (it is similar to a \code{lm} formula), for example: \code{fml = z~x+y}. To include cluster variables, you can 1) either insert them in this formula using a pipe (e.g. \code{fml = z~x+y|cluster1+cluster2}), or 2) either use the argment \code{cluster}. To include a non-linear in parameters element, you must use the argment \code{NL.fml}. #' @param NL.fml A formula. If provided, this formula represents the non-linear part of the right hand side (RHS). Note that contrary to the \code{fml} argument, the coefficients must explicitely appear in this formula. For instance, it can be \code{~a*log(b*x + c*x^3)}, where \code{a}, \code{b}, and \code{c} are the coefficients to be estimated. Note that only the RHS of the formula is to be provided, and NOT the left hand side. #' @param data A data.frame containing the necessary variables to run the model. The variables of the non-linear right hand side of the formula are identified with this \code{data.frame} names. Note that no \code{NA} is allowed in the variables to be used in the estimation. Can also be a matrix. #' @param family Character scalar. It should provide the family. The possible values are "poisson" (Poisson model with log-link, the default), "negbin" (Negative Binomial model with log-link), "logit" (LOGIT model with log-link), "gaussian" (Gaussian model). #' @param cluster Character vector. The name/s of a/some variable/s within the dataset to be used as clusters. These variables should contain the identifier of each observation (e.g., think of it as a panel identifier). #' @param na.rm Logical, default is \code{FALSE}. If the variables necessary for the estimation contain NAs and \code{na.rm = TRUE}, then all observations containing NA are removed prior to estimation and a warning message is raised detailing the number of observations removed. #' @param useAcc Default is \code{TRUE}. Whether an acceleration algorithm (Irons and Tuck iterations) should be used to otbain the cluster coefficients when there are two or more clusters. #' @param NL.start (For NL models only) A list of starting values for the non-linear parameters. ALL the parameters are to be named and given a staring value. Example: \code{NL.start=list(a=1,b=5,c=0)}. Though, there is an exception: if all parameters are to be given the same starting value, you can use the argument \code{NL.start.init}. #' @param lower (For NL models only) A list. The lower bound for each of the non-linear parameters that requires one. Example: \code{lower=list(b=0,c=0)}. Beware, if the estimated parameter is at his lower bound, then asymptotic theory cannot be applied and the standard-error of the parameter cannot be estimated because the gradient will not be null. In other words, when at its upper/lower bound, the parameter is considered as 'fixed'. #' @param upper (For NL models only) A list. The upper bound for each of the non-linear parameters that requires one. Example: \code{upper=list(a=10,c=50)}. Beware, if the estimated parameter is at his upper bound, then asymptotic theory cannot be applied and the standard-error of the parameter cannot be estimated because the gradient will not be null. In other words, when at its upper/lower bound, the parameter is considered as 'fixed'. #' @param env (For NL models only) An environment. You can provide an environement in which the non-linear part will be evaluated. (May be useful for some particular non-linear functions.) #' @param NL.start.init (For NL models only) Numeric scalar. If the argument \code{NL.start} is not provided, or only partially filled (i.e. there remain non-linear parameters with no starting value), then the starting value of all remaining non-linear parameters is set to \code{NL.start.init}. #' @param offset A formula. An offset can be added to the estimation. It should be a formula of the form (for example) ~0.5*x**2. This offset is linearily added to the elements of the main formula 'fml'. Note that when using the argument 'NL.fml', you can directly add the offset there. #' @param nl.gradient (For NL models only) A formula. The user can prodide a function that computes the gradient of the non-linear part. The formula should be of the form \code{~f0(a1,x1,a2,a2)}. The important point is that it should be able to be evaluated by: \code{eval(nl.gradient[[2]], env)} where \code{env} is the working environment of the algorithm (which contains all variables and parameters). The function should return a list or a data.frame whose names are the non-linear parameters. #' @param linear.start Numeric named vector. The starting values of the linear part. #' @param jacobian.method Character scalar. Provides the method used to numerically compute the jacobian of the non-linear part. Can be either \code{"simple"} or \code{"Richardson"}. Default is \code{"simple"}. See the help of \code{\link[numDeriv]{jacobian}} for more information. #' @param useHessian Logical. Should the Hessian be computed in the optimization stage? Default is \code{TRUE}. #' @param opt.control List of elements to be passed to the optimization method \code{\link[stats]{nlminb}}. See the help page of \code{\link[stats]{nlminb}} for more information. #' @param cores Integer, default is 1. Number of threads to be used (accelerates the algorithm via the use of openMP routines). This is particularly efficient for the negative binomial and logit models, less so for the Gaussian and Poisson likelihoods (unless for very large datasets). #' @param verbose Integer, default is 0. It represents the level of information that should be reported during the optimisation process. If \code{verbose=0}: nothing is reported. If \code{verbose=1}: the value of the coefficients and the likelihood are reported. If \code{verbose=2}: \code{1} + information on the computing tiime of the null model, the cluster coefficients and the hessian are reported. #' @param theta.init Positive numeric scalar. The starting value of the dispersion parameter if \code{family="negbin"}. By default, the algorithm uses as a starting value the theta obtained from the model with only the intercept. #' @param precision.cluster Precision used to obtain the fixed-effects (ie cluster coefficients). Defaults to \code{1e-5}. It corresponds to the maximum absolute difference allowed between two iterations. Argument \code{precision.cluster} cannot be lower than \code{10000*.Machine$double.eps}. #' @param itermax.cluster Maximum number of iterations in the step obtaining the fixed-effects (only in use for 2+ clusters). Default is 10000. #' @param itermax.deriv Maximum number of iterations in the step obtaining the derivative of the fixed-effects (only in use for 2+ clusters). Default is 5000. #' @param showWarning Logical, default is \code{TRUE}. Whether warnings should be displayed (concerns warnings relating to: convergence state, collinearity issues and observation removal due to only 0/1 outcomes or presence of NA values). #' @param ... Not currently used. #' #' @details #' This function estimates maximum likelihood models where the conditional expectations are as follows: #' #' Gaussian likelihood: #' \deqn{E(Y|X)=X\beta}{E(Y|X) = X*beta} #' Poisson and Negative Binomial likelihoods: #' \deqn{E(Y|X)=\exp(X\beta)}{E(Y|X) = exp(X*beta)} #' where in the Negative Binomial there is the parameter \eqn{\theta}{theta} used to model the variance as \eqn{\mu+\mu^2/\theta}{mu+mu^2/theta}, with \eqn{\mu}{mu} the conditional expectation. #' Logit likelihood: #' \deqn{E(Y|X)=\frac{\exp(X\beta)}{1+\exp(X\beta)}}{E(Y|X) = exp(X*beta) / (1 + exp(X*beta))} #' #' When there are one or more clusters, the conditional expectation can be written as: #' \deqn{E(Y|X) = h(X\beta+\sum_{k}\sum_{m}\gamma_{m}^{k}\times C_{im}^{k}),} #' where \eqn{h(.)} is the function corresponding to the likelihood function as shown before. \eqn{C^k} is the matrix associated to cluster \eqn{k} such that \eqn{C^k_{im}} is equal to 1 if observation \eqn{i} is of category \eqn{m} in cluster \eqn{k} and 0 otherwise. #' #' When there are non linear in parameters functions, we can schematically split the set of regressors in two: #' \deqn{f(X,\beta)=X^1\beta^1 + g(X^2,\beta^2)} #' with first a linear term and then a non linear part expressed by the function g. That is, we add a non-linear term to the linear terms (which are \eqn{X*beta} and the cluster coefficients). It is always better (more efficient) to put into the argument \code{NL.fml} only the non-linear in parameter terms, and add all linear terms in the \code{fml} argument. #' #' To estimate only a non-linear formula without even the intercept, you must exclude the intercept from the linear formula by using, e.g., \code{fml = z~0}. #' #' The over-dispersion parameter of the Negative Binomial family, theta, is capped at 10,000. If theta reaches this high value, it means that there is no overdispersion. #' #' @return #' An \code{femlm} object. #' \item{coefficients}{The named vector of coefficients.} #' \item{coeftable}{The table of the coefficients with their standard errors, z-values and p-values.} #' \item{loglik}{The loglikelihood.} #' \item{iterations}{Number of iterations of the algorithm.} #' \item{n}{The number of observations.} #' \item{nparams}{The number of parameters of the model.} #' \item{call}{The call.} #' \item{fml}{The linear formula of the call.} #' \item{ll_null}{Log-likelihood of the null model (i.e. with the intercept only).} #' \item{pseudo_r2}{The adjusted pseudo R2.} #' \item{message}{The convergence message from the optimization procedures.} #' \item{sq.cor}{Squared correlation between the dependent variable and the expected predictor (i.e. fitted.values) obtained by the estimation.} #' \item{hessian}{The Hessian of the parameters.} #' \item{fitted.values}{The fitted values are the expected value of the dependent variable for the fitted model: that is \eqn{E(Y|X)}.} #' \item{cov.unscaled}{The variance-covariance matrix of the parameters.} #' \item{se}{The standard-error of the parameters.} #' \item{scores}{The matrix of the scores (first derivative for each observation).} #' \item{family}{The ML family that was used for the estimation.} #' \item{residuals}{The difference between the dependent variable and the expected predictor.} #' \item{sumFE}{The sum of the fixed-effects for each observation.} #' \item{offset}{The offset formula.} #' \item{NL.fml}{The nonlinear formula of the call.} #' \item{bounds}{Whether the coefficients were upper or lower bounded. -- This can only be the case when a non-linear formula is included and the arguments 'lower' or 'upper' are provided.} #' \item{isBounded}{The logical vector that gives for each coefficient whether it was bounded or not. This can only be the case when a non-linear formula is included and the arguments 'lower' or 'upper' are provided.} #' \item{clusterNames}{The names of each cluster.} #' \item{id_dummies}{The list (of length the number of clusters) of the cluster identifiers for each observation.} #' \item{clusterSize}{The size of each cluster.} #' \item{obsRemoved}{In the case there were clusters and some observations were removed because of only 0/1 outcome within a cluster, it gives the row numbers of the observations that were removed.} #' \item{clusterRemoved}{In the case there were clusters and some observations were removed because of only 0/1 outcome within a cluster, it gives the list (for each cluster) of the clustr identifiers that were removed.} #' \item{theta}{In the case of a negative binomial estimation: the overdispersion parameter.} #' #' @seealso #' See also \code{\link[FENmlm]{summary.femlm}} to see the results with the appropriate standard-errors, \code{\link[FENmlm]{getFE}} to extract the cluster coefficients, and the functions \code{\link[FENmlm]{res2table}} and \code{\link[FENmlm]{res2tex}} to visualize the results of multiple estimations. #' #' @author #' Laurent Berge #' #' @references #' #' Berge, Laurent, 2018, "Efficient estimation of maximum likelihood models with multiple fixed-effects: the R package FENmlm." CREA Discussion Papers, 13 (\url{https://wwwen.uni.lu/content/download/110162/1299525/file/2018_13}). #' #' For models with multiple fixed-effects: #' #' Gaure, Simen, 2013, "OLS with multiple high dimensional category variables", Computational Statistics & Data Analysis 66 pp. 8--18 #' #' On the unconditionnal Negative Binomial model: #' #' Allison, Paul D and Waterman, Richard P, 2002, "Fixed-Effects Negative Binomial Regression Models", Sociological Methodology 32(1) pp. 247--265 #' #' @examples #' #' # #' # Linear examples #' # #' #' # Load trade data #' data(trade) #' #' # We estimate the effect of distance on trade => we account for 3 cluster effects #' # 1) Poisson estimation #' est_pois = femlm(Euros ~ log(dist_km)|Origin+Destination+Product, trade) #' # alternative formulation giving the same results: #' # est_pois = femlm(Euros ~ log(dist_km), trade, cluster = c("Origin", "Destination", "Product")) #' #' # 2) Log-Log Gaussian estimation (with same clusters) #' est_gaus = update(est_pois, log(Euros+1) ~ ., family="gaussian") #' #' # 3) Negative Binomial estimation #' est_nb = update(est_pois, family="negbin") #' #' # Comparison of the results using the function res2table #' res2table(est_pois, est_gaus, est_nb) #' # Now using two way clustered standard-errors #' res2table(est_pois, est_gaus, est_nb, se = "twoway") #' #' # Comparing different types of standard errors #' sum_white = summary(est_pois, se = "white") #' sum_oneway = summary(est_pois, se = "cluster") #' sum_twoway = summary(est_pois, se = "twoway") #' sum_threeway = summary(est_pois, se = "threeway") #' #' res2table(sum_white, sum_oneway, sum_twoway, sum_threeway) #' #' #' # #' # Example of Equivalences #' # #' \dontrun{ #' # equivalence with glm poisson #' est_glm <- glm(Euros ~ log(dist_km) + factor(Origin) + #' factor(Destination) + factor(Product), trade, family = poisson) #' #' # coefficient estimates + Standard-error #' summary(est_glm)$coefficients["log(dist_km)", ] #' est_pois$coeftable #' #' # equivalence with lm #' est_lm <- lm(log(Euros+1) ~ log(dist_km) + factor(Origin) + #' factor(Destination) + factor(Product), trade) #' #' # coefficient estimates + Standard-error #' summary(est_lm)$coefficients["log(dist_km)", ] #' summary(est_gaus, dof_correction = TRUE)$coeftable #' } #' #' #' # #' # Non-linear examples #' # #' #' # Generating data for a simple example #' n = 100 #' x = rnorm(n, 1, 5)**2 #' y = rnorm(n, -1, 5)**2 #' z1 = rpois(n, x*y) + rpois(n, 2) #' base = data.frame(x, y, z1) #' #' # Estimating a 'linear' relation: #' est1_L = femlm(z1 ~ log(x) + log(y), base) #' # Estimating the same 'linear' relation using a 'non-linear' call #' est1_NL = femlm(z1 ~ 1, base, NL.fml = ~a*log(x)+b*log(y), NL.start = list(a=0, b=0)) #' # we compare the estimates with the function res2table (they are identical) #' res2table(est1_L, est1_NL) #' #' # Now generating a non-linear relation (E(z2) = x + y + 1): #' z2 = rpois(n, x + y) + rpois(n, 1) #' base$z2 = z2 #' #' # Estimation using this non-linear form #' est2_NL = femlm(z2~0, base, NL.fml = ~log(a*x + b*y), #' NL.start = list(a=1, b=2), lower = list(a=0, b=0)) #' # we can't estimate this relation linearily #' # => closest we can do: #' est2_L = femlm(z2~log(x)+log(y), base) #' #' # Difference between the two models: #' res2table(est2_L, est2_NL) #' #' # Plotting the fits: #' plot(x, z2, pch = 18) #' points(x, fitted(est2_L), col = 2, pch = 1) #' points(x, fitted(est2_NL), col = 4, pch = 2) #' #' #' # Using a custom Jacobian for the function log(a*x + b*y) #' myGrad = function(a,x,b,y){ #' s = a*x+b*y #' data.frame(a = x/s, b = y/s) #' } #' #' est2_NL_grad = femlm(z2~0, base, NL.fml = ~log(a*x + b*y), #' NL.start = list(a=1,b=2), nl.gradient = ~myGrad(a,x,b,y)) #' #' femlm <- function(fml, data, family=c("poisson", "negbin", "logit", "gaussian"), NL.fml, cluster, na.rm = FALSE, useAcc=TRUE, NL.start, lower, upper, env, NL.start.init, offset, nl.gradient, linear.start=0, jacobian.method=c("simple", "Richardson"), useHessian=TRUE, opt.control=list(), cores = 1, verbose=0, theta.init, precision.cluster, itermax.cluster = 10000, itermax.deriv = 5000, showWarning = TRUE, ...){ # use of the conjugate gradient in the gaussian case to get # the cluster coefficients accDeriv = TRUE jacobian.method <- match.arg(jacobian.method) family = match.arg(family) # Some settings (too complicated to be tweaked by the user) # Nber of evaluations of the NL part to be kept in memory # Default keeps the two last evaluations NLsave = 2 # DOTS dots = list(...) # Future parameter in development: na.rm # na.rm = ifelse(is.null(dots$na.rm), FALSE, dots$na.rm) isNA_sample = FALSE ptm = proc.time() # DEPRECATED INFORMATION # I initially called the cluster dummies... I keep it for compatibility if(missing(cluster) && "dummy" %in% names(dots)) cluster = dots$dummy if("linear.fml" %in% names(dots)) stop("Argument 'linear.fml' is deprecated, now use 'fml' in combination with 'NL.fml'.") if(missing(NL.start) && "start" %in% names(dots)) { warning("Argument 'start' is deprecated.\nUse 'NL.start' instead.", immediate. = TRUE) NL.start = dots$start } if(missing(NL.start.init) && "start.init" %in% names(dots)) { warning("Argument 'start.init' is deprecated.\nUse 'NL.start.init' instead.", immediate. = TRUE) NL.start.init = dots$start.init } # # The clusters => controls + setup if(class(fml) != "formula") stop("The argument 'fml' must be a formula.") if(length(fml) != 3) stop("The formula must be two sided.\nEG: a~exp(b/x), or a~0 if there is no linear part.") FML = Formula::Formula(fml) n_rhs = length(FML)[2] if(n_rhs > 2){ stop("The argument 'fml' cannot contain more than two parts separated by a pipe ('|').") } if(n_rhs == 2){ if(missing(cluster) || length(cluster) == 0){ cluster = formula(FML, lhs = 0, rhs = 2) fml = formula(FML, lhs = 1, rhs = 1) } else { stop("To add cluster variables: either include them in argument 'fml' using a pipe ('|'), either use the argument 'cluster'. You cannot use both!") } } # Other paramaters if(!is.null(dots$debug) && dots$debug) verbose = 100 d.hessian = dots$d.hessian # # cores argument FENmlm_CORES = 1 if(!length(cores) == 1 || !is.numeric(cores) || !(cores%%1) == 0 || cores < 0){ stop("The argument 'cores' must be an integer greater than 0 and lower than the number of threads of the computer.") } else if(cores == 1){ isMulticore = FALSE } else if(is.na(parallel::detectCores())){ # This can happen... isMulticore = FALSE warning("The number of cores has been set to 1 because the function detectCores() could not evaluate the maximum number of nodes.") } else if(cores > parallel::detectCores()){ stop("The argument 'cores' must be lower or equal to the number of possible threads (equal to ", parallel::detectCores(), ") in this computer.") } else { FENmlm_CORES = cores isMulticore = TRUE } famFuns = switch(family, poisson = ml_poisson(), negbin = ml_negbin(), logit = ml_logit(), gaussian = ml_gaussian()) call = match.call(expand.dots = FALSE) # cleaning the call from update method # we drop 'hidden' arguments for a clean call call$"..." = NULL if(is.matrix(data)){ if(is.null(colnames(data))){ stop("If argument data is to be a matrix, its columns must be named.") } data = as.data.frame(data) } # The conversion of the data (due to data.table) if(!"data.frame" %in% class(data)){ stop("The argument 'data' must be a data.frame or a matrix.") } if("data.table" %in% class(data)){ # this is a local change only class(data) = "data.frame" } dataNames = names(data) # The LHS must contain only values in the DF namesLHS = all.vars(fml[[2]]) if(!all(namesLHS %in% dataNames)) stop("Some elements on the LHS of the formula are not in the dataset:\n", paste0(namesLHS[!namesLHS %in% dataNames], collapse = ", ")) # Now the nonlinear part: isNA_NL = FALSE # initialisation of NAs flag (FALSE is neutral) if(!missing(NL.fml) && !is.null(NL.fml)){ if(!class(NL.fml) == "formula") stop("Argument 'NL.fml' must be a formula.") isNonLinear = TRUE nl.call = NL.fml[[length(NL.fml)]] allnames = all.vars(nl.call) nonlinear.params = allnames[!allnames %in% dataNames] nonlinear.varnames = allnames[allnames %in% dataNames] if(length(nonlinear.params) == 0){ warning("As there is no parameter to estimate in argument 'NL.fml', this argument is ignored.\nIf you want to add an offset, use argument 'offset'.") } # Control for NAs if(anyNA(data[, nonlinear.varnames])){ if(!na.rm){ # Default varWithNA = nonlinear.varnames[which(apply(data[, nonlinear.varnames, FALSE], 2, anyNA))] text = show_vars_limited_width(varWithNA) stop("Some variables in 'NL.fml' contain NA. NAs are not supported, please remove them first (or use na.rm). FYI, the variables are:\n", text, call. = FALSE) } else { # If Na.rm => we keep track of the NAs isNA_NL = is.na(rowSums(data[, nonlinear.varnames])) isNA_sample = isNA_sample || TRUE } } } else { isNonLinear = FALSE nl.call = 0 allnames = nonlinear.params = nonlinear.varnames = character(0) } # The dependent variable: lhs==left_hand_side lhs = as.numeric(as.vector(eval(fml[[2]], data))) # creation de l'environnement if(missing(env)) env <- new.env() else stopifnot(class(env)=="environment") # # First check # isNA_y = FALSE # initialisation of NAs flag (FALSE is neutral) if(anyNA(lhs)){ if(!na.rm){ # Default behavior stop("The left hand side of the fomula has NA values. Please provide data without NA (or use na.rm).") } else { # If Na.rm => we keep track of the NAs isNA_y = is.na(lhs) isNA_sample = isNA_sample || TRUE } # We repeat twice the controls, but one for a cleaned y # It's a bit "ugly" but I don't recreate unecessary vectors this way # We check that the dep var is not a constant lhs_clean = lhs[!isNA_y] # we check the var is not a constant if(var(lhs_clean) == 0){ stop("The dependent variable is a constant. Estimation cannot be done.") } if(family %in% c("poisson", "negbin") & any(lhs_clean<0)) stop("Negative values of the dependant variable \nare not allowed for the \"", family, "\" family.", sep="") if(family %in% c("logit") & !all(lhs_clean==0 | lhs_clean==1)) stop("The dependant variable has values different from 0 or 1.\nThis is not allowed with the \"logit\" family.") } else if(any(!is.finite(lhs))){ stop("The dependent variable contains non-finite values.") } else { # regular controls when there is no NA # We check that the dep var is not a constant if(var(lhs) == 0){ stop("The dependent variable is a constant. Estimation cannot be done.") } if(family %in% c("poisson", "negbin") & any(lhs<0)) stop("Negative values of the dependant variable \nare not allowed for the \"", family, "\" family.", sep="") if(family %in% c("logit") & !all(lhs==0 | lhs==1)) stop("The dependant variable has values different from 0 or 1.\nThis is not allowed with the \"logit\" family.") } # # Controls and setting of the linear part: # isLinear = FALSE linear.varnames = all.vars(fml[[3]]) if(length(linear.varnames) > 0 || attr(terms(fml), "intercept") == 1){ isLinear = TRUE linear.fml = fml } isNA_L = FALSE # initialisation of NAs flag (FALSE is neutral) if(isLinear){ if(!all(linear.varnames %in% dataNames)) stop(paste("In 'fml', some variables are not in the data:\n", paste(linear.varnames[!linear.varnames%in%dataNames], collapse=', '), ".", sep="")) if(!missing(cluster) && length(cluster) != 0){ # if dummies are provided, we make sure there is an # intercept so that factors can be handled properly linear.fml = update(linear.fml, ~.+1) } # # We construct the linear matrix # # we look at whether there are factor-like variables to be evaluated # if there is factors => model.matrix types = sapply(data[, dataNames %in% linear.varnames, FALSE], class) if(grepl("factor", deparse(linear.fml)) || any(types %in% c("character", "factor"))){ useModel.matrix = TRUE } else { useModel.matrix = FALSE } if(useModel.matrix){ # linear.mat = stats::model.matrix(linear.fml, data) # to catch the NAs linear.mat = stats::model.matrix(linear.fml, stats::model.frame(linear.fml, data, na.action=na.pass)) } else { # just to check => will give error if not proper formula linear.mat = stats::model.matrix(linear.fml, data[1:10, ]) linear.mat = prepare_matrix(linear.fml, data) } linear.params <- colnames(linear.mat) # N_linear <- length(linear.params) if(anyNA(linear.mat)){ if(!na.rm){ # Default behavior: no NA tolerance quiNA = apply(linear.mat, 2, anyNA) whoIsNA = linear.params[quiNA] text = show_vars_limited_width(whoIsNA) stop("Evaluation of the linear part returns NA. NAs are not supported, please remove them before running this function (or use na.rm). FYI the variables with NAs are:\n", text) } else { # If Na.rm => we keep track of the NAs isNA_L = is.na(rowSums(linear.mat)) isNA_sample = isNA_sample || TRUE } } if(!is.numeric(linear.start)) stop("'linear.start' must be numeric!") } else { linear.params <- linear.start <- linear.varnames <- NULL useModel.matrix = FALSE } params <- c(nonlinear.params, linear.params) lparams <- length(params) varnames <- c(nonlinear.varnames, linear.varnames) # Attention les parametres non lineaires peuvent etre vides if(length(nonlinear.params)==0) isNL = FALSE else isNL = TRUE # # Handling Clusters #### # isDummy = FALSE if(!is.null(dots$clusterFromUpdate) && dots$clusterFromUpdate){ # Cluster information coming from the update method # means that there is no modification of past clusters object = dots$object # we retrieve past information dum_all = object$id_dummies obs2remove = object$obsRemoved dummyOmises = object$clusterRemoved cluster = object$clusterNames nbCluster = object$clusterSize Q = length(nbCluster) # # If obsRemoved => need to modify the data base # # This is done later only once # if(length(obs2remove) > 0){ # data = data[-obs2remove, ] # # # We recreate the linear matrix # if(isLinear) { # if(useModel.matrix){ # # means there are factors # linear.mat = stats::model.matrix(linear.fml, data) # } else { # linear.mat = linear.mat[-obs2remove, ] # } # } # # lhs = eval(fml[[2]], data) # } # We still need to recreate some objects though isDummy = TRUE names(dum_all) = NULL # dumMat_cpp = matrix(unlist(dum_all), ncol = Q) - 1 dum_names = sum_y_all = obs_per_cluster_all = list() for(i in 1:Q){ k = nbCluster[i] dum = dum_all[[i]] if(length(obs2remove) > 0){ sum_y_all[[i]] = cpp_tapply_vsum(k, lhs[-obs2remove], dum) } else { sum_y_all[[i]] = cpp_tapply_vsum(k, lhs, dum) } obs_per_cluster_all[[i]] = cpp_table(k, dum) dum_names[[i]] = attr(dum_all[[i]], "clust_names") } # # Re-ordering the CC # if(any(nbCluster != sort(nbCluster, decreasing = TRUE))){ new_order = order(nbCluster, decreasing = TRUE) reorder = order(new_order) nbCluster = nbCluster[new_order] cluster = cluster[new_order] dum_all = dum_all[new_order] dum_names = dum_names[new_order] sum_y_all = sum_y_all[new_order] obs_per_cluster_all = obs_per_cluster_all[new_order] } else { reorder = 1:Q } } else if(!missing(cluster) && length(cluster)!=0){ # The main cluster construction isDummy = TRUE isClusterFml = FALSE if(is.character(cluster) && any(!cluster %in% names(data))){ var_problem = cluster[!cluster%in%names(data)] stop("The argument 'cluster' must be variable names! Cluster(s) not in the data: ", paste0(var_problem, collapse = ", "), ".") } else if(!is.character(cluster)){ # means the cluster is a formula cluster_fml = cluster # we check that the cluster variables are indeed in the data cluster_vars = all.vars(cluster) if(!all(cluster_vars %in% names(data))){ var_problem = cluster_vars[!cluster_vars %in% names(data)] stop("The following 'cluster' variable", ifelse(length(var_problem) == 1, " is", "s are"), " not in the data: ", paste0(var_problem, collapse = ", "), ".") } cluster_mat = model.frame(cluster_fml, data, na.action = NULL) # we change cluster to become a vector of characters cluster = names(cluster_mat) isClusterFml = TRUE } else { # the clusters are valid cluster names cluster_mat = data[, cluster, drop = FALSE] } # We change factors to character isFactor = sapply(cluster_mat, is.factor) if(any(isFactor)){ for(i in which(isFactor)){ cluster_mat[[i]] = as.character(cluster_mat[[i]]) } } isNA_cluster = FALSE if(anyNA(cluster_mat)){ if(!na.rm){ # Default behavior, NA not allowed var_problem = cluster[sapply(cluster_mat, anyNA)] stop("The cluster variables contain NAs, this is not allowed (or use na.rm).\nFYI, the clusters with NA are: ", paste0(var_problem, collapse = ", "), ".") } else { # If Na.rm => we keep track of the NAs isNA_cluster = apply(cluster_mat, MARGIN = 1, anyNA) isNA_sample = isNA_sample || TRUE } } if(isNA_sample){ # we remove NAs from the clusters only # after, we'll remove them from the data too isNA_full = isNA_y | isNA_L | isNA_NL | isNA_cluster nbNA = sum(isNA_full) nobs = nrow(data) if(nbNA == nobs){ stop("All observations contain NAs. Estimation cannot be done.") } message_NA = paste0(numberFormatNormal(nbNA), " observations removed because of NA values. (Breakup: LHS: ", numberFormatNormal(sum(isNA_y)), ", RHS: ", numberFormatNormal(sum(isNA_L + isNA_NL)), ", Cluster: ", numberFormatNormal(sum(isNA_cluster)), ")") # we drop the NAs from the cluster matrix cluster_mat = cluster_mat[!isNA_full, , drop = FALSE] obs2remove_NA = which(isNA_full) index_noNA = (1:nobs)[!isNA_full] # we change the LHS variable lhs = as.numeric(eval(fml[[2]], data[-obs2remove_NA, ])) } Q = length(cluster) dum_all = dum_names = list() sum_y_all = obs_per_cluster_all = list() obs2remove = c() dummyOmises = list() for(i in 1:Q){ dum_raw = cluster_mat[[cluster[i]]] # in order to avoid "unclassed" values > real nber of classes: we re-factor the cluster dum_names[[i]] = thisNames = getItems(dum_raw) dum = quickUnclassFactor(dum_raw) dum_all[[i]] = dum k = length(thisNames) # We delete "all zero" outcome sum_y_all[[i]] = sum_y_clust = cpp_tapply_vsum(k, lhs, dum) obs_per_cluster_all[[i]] = n_perClust = cpp_table(k, dum) if(family %in% c("poisson", "negbin")){ qui = which(sum_y_clust==0) } else if(family == "logit"){ qui = which(sum_y_clust==0 | sum_y_clust==n_perClust) } else if(family == "gaussian"){ qui = NULL } if(length(qui>0)){ # We first delete the data: dummyOmises[[i]] = thisNames[qui] obs2remove = unique(c(obs2remove, which(dum %in% qui))) } else { dummyOmises[[i]] = character(0) } } # We remove the problems if(length(obs2remove)>0){ # update of the cluster matrix cluster_mat = cluster_mat[-obs2remove, , drop = FALSE] # update of the lhs lhs = lhs[-obs2remove] # Then we recreate the dummies for(i in 1:Q){ dum_raw = cluster_mat[[cluster[i]]] dum_names[[i]] = getItems(dum_raw) dum = quickUnclassFactor(dum_raw) dum_all[[i]] = dum k = length(dum_names[[i]]) # We also recreate these values sum_y_all[[i]] = cpp_tapply_vsum(k, lhs, dum) obs_per_cluster_all[[i]] = cpp_table(k, dum) } # Then the warning message nb_missing = sapply(dummyOmises, length) message_cluster = paste0(paste0(nb_missing, collapse = "/"), " cluster", ifelse(sum(nb_missing) == 1, "", "s"), " (", length(obs2remove), " observations) removed because of only ", ifelse(family=="logit", "zero/one", "zero"), " outcomes.") if(isNA_sample){ if(showWarning) warning(message_NA, "\n ", message_cluster) } else { if(showWarning) warning(message_cluster) } names(dummyOmises) = cluster } else if(isNA_sample){ if(showWarning) warning(message_NA) } if(isNA_sample){ # we update the value of obs2remove (will contain both NA and removed bc of outcomes) if(length(obs2remove) > 0){ obs2remove_cluster = index_noNA[obs2remove] } else { obs2remove_cluster = c() } obs2remove = sort(c(obs2remove_NA, obs2remove_cluster)) } # # We re-order the clusters # nbCluster = sapply(dum_all, max) if(any(nbCluster != sort(nbCluster, decreasing = TRUE))){ new_order = order(nbCluster, decreasing = TRUE) reorder = order(new_order) nbCluster = nbCluster[new_order] cluster = cluster[new_order] dum_all = dum_all[new_order] dum_names = dum_names[new_order] sum_y_all = sum_y_all[new_order] obs_per_cluster_all = obs_per_cluster_all[new_order] } else { reorder = 1:Q } } else { # There is no cluster Q = 0 # NA management is needed to create obs2remove if(isNA_sample){ # after, we'll remove them from the data too isNA_full = isNA_y | isNA_L | isNA_NL nbNA = sum(isNA_full) nobs = nrow(data) if(nbNA == nobs){ stop("All observations contain NAs. Estimation cannot be done.") } if(showWarning) warning(numberFormatNormal(nbNA), " observations removed because of NA values. (Breakup: LHS: ", numberFormatNormal(sum(isNA_y)), ", RHS: ", numberFormatNormal(sum(isNA_L + isNA_NL)), ")") # we drop the NAs from the cluster matrix obs2remove = which(isNA_full) } else { obs2remove = c() } } # NA & problem management if(length(obs2remove) > 0){ # we kick out the problems (both NA related and cluster related) data = data[-obs2remove, ] # We recreate the linear matrix and the LHS if(isLinear) { if(useModel.matrix){ # means there are factors linear.mat = stats::model.matrix(linear.fml, data) } else { linear.mat = linear.mat[-obs2remove, ] } } lhs = as.numeric(eval(fml[[2]], data)) } # If presence of clusters => we exclude the intercept if(Q > 0){ # If there is a linear intercept, we withdraw it # We drop the intercept: if(isLinear && "(Intercept)" %in% colnames(linear.mat)){ var2remove = which(colnames(linear.mat) == "(Intercept)") if(ncol(linear.mat) == length(var2remove)){ isLinear = FALSE linear.params = NULL params <- nonlinear.params lparams <- length(params) varnames <- nonlinear.varnames } else{ linear.mat = linear.mat[, -var2remove, drop=FALSE] linear.params <- colnames(linear.mat) # N_linear <- length(linear.params) params <- c(nonlinear.params, linear.params) lparams <- length(params) varnames <- c(nonlinear.varnames, linear.varnames) } } } # # Checks for MONKEY TEST # if(lparams==0 & Q==0) stop("No parameter to be estimated.") if(!is.logical(useHessian)) stop("'useHessian' must be of type 'logical'!") # # Controls: The non linear part # if(isNL){ if(missing(NL.start.init)){ if(missing(NL.start)) stop("There must be starting values for NL parameters. Please use argument NL.start (or NL.start.init).") if(typeof(NL.start)!="list") stop("NL.start must be a list.") if(any(!nonlinear.params %in% names(NL.start))) stop(paste("Some NL parameters have no starting values:\n", paste(nonlinear.params[!nonlinear.params %in% names(NL.start)], collapse=", "), ".", sep="")) # we restrict NL.start to the nonlinear.params NL.start = NL.start[nonlinear.params] } else { if(length(NL.start.init)>1) stop("NL.start.init must be a scalar.") if(!is.numeric(NL.start.init)) stop("NL.start.init must be numeric!") if(!is.finite(NL.start.init)) stop("Infinites values as starting values, you must be kidding me...") if(missing(NL.start)){ NL.start <- list() NL.start[nonlinear.params] <- NL.start.init } else { if(typeof(NL.start)!="list") stop("NL.start must be a list.") if(any(!names(NL.start) %in% params)) stop(paste("Some parameters in 'NL.start' are not in the formula:\n", paste(names(NL.start)[!names(NL.start) %in% params], collapse=", "), ".", sep="")) missing.params <- nonlinear.params[!nonlinear.params%in%names(NL.start)] NL.start[missing.params] <- NL.start.init } } } else { NL.start <- list() } # # The upper and lower limits # if(!missing(lower) && !is.null(lower)){ if(typeof(lower)!="list"){ stop("'lower' MUST be a list.") } lower[params[!params %in% names(lower)]] <- -Inf lower <- unlist(lower[params]) } else { lower <- rep(-Inf, lparams) names(lower) <- params } if(!missing(upper) && !is.null(upper)){ if(typeof(upper)!="list"){ stop("'upper' MUST be a list.") } upper[params[!params %in% names(upper)]] <- Inf upper <- unlist(upper[params]) } else { upper <- rep(Inf, lparams) names(upper) <- params } lower <- c(lower) upper <- c(upper) # # Controls: user defined gradient # if(!missing(nl.gradient)){ isGradient = TRUE if(class(nl.gradient)!="formula" | length(nl.gradient)==3) stop("'nl.gradient' must be a formula like, for ex., ~f0(a1, x1, a2, x2). f0 giving the gradient.") } else { isGradient = FALSE } if(!is.null(d.hessian)){ hessianArgs = list(d=d.hessian) } else hessianArgs = NULL assign("hessianArgs", hessianArgs, env) # # Offset # offset.value = 0 if(!missing(offset) && !is.null(offset)){ # control # if(!class(offset) == "formula"){ if(!"formula" %in% class(offset)){ stop("Argument 'offset' must be a formula (e.g. ~ 1+x^2).") } if(length(offset) != 2){ stop("Argument 'offset' must be a formula of the type (e.g.): ~ 1+x^2.") } offset.call = offset[[length(offset)]] vars.offset = all.vars(offset.call) if(any(!vars.offset %in% dataNames)){ var_missing = vars.offset[!vars.offset %in% dataNames] stop("Some variable in the argument 'offset' are not in the data:\n", paste0(var_missing, sep=", "), ".") } offset.value = eval(offset.call, data) if(anyNA(offset.value)){ stop("Evaluating the argument 'offset' lead to NA values.") } } assign("offset.value", offset.value, env) # # PRECISION # n = length(lhs) # The main precision if(!missing(precision.cluster) && !is.null(precision.cluster)){ if(!length(precision.cluster)==1 || !is.numeric(precision.cluster) || precision.cluster <= 0 || precision.cluster >1){ stop("If provided, argument 'precision.cluster' must be a strictly positive scalar lower than 1.") } else if(precision.cluster < 10000*.Machine$double.eps){ stop("Argument 'precision.cluster' cannot be lower than ", signif(10000*.Machine$double.eps)) } eps.cluster = precision.cluster } else { eps.cluster = 1e-5 # min(10**-(log10(n) + Q/3), 1e-5) } if(!is.numeric(itermax.cluster) || length(itermax.cluster) > 1 || itermax.cluster < 1){ stop("Argument itermax.cluster must be an integer greater than 0.") } if(!is.numeric(itermax.deriv) || length(itermax.deriv) > 1 || itermax.deriv < 1){ stop("Argument itermax.deriv must be an integer greater than 0.") } # other precisions eps.NR = ifelse(is.null(dots$eps.NR), eps.cluster/100, dots$eps.NR) eps.deriv = ifelse(is.null(dots$eps.deriv), 1e-4, dots$eps.deriv) # Initial checks are done nonlinear.params <- names(NL.start) #=> in the order the user wants # starting values of all parameters (initialized with the NL ones): start = NL.start # control for the linear start => we can provide coefficients # from past estimations. Coefficients that are not provided are set # to 0 if(length(linear.start)>1){ what = linear.start[linear.params] what[is.na(what)] = 0 linear.start = what } start[linear.params] <- linear.start params <- names(start) start <- unlist(start) start <- c(start) lparams <- length(params) names(start) <- params # The right order of upper and lower upper = upper[params] lower = lower[params] # # The MODEL0 => to get the init of the theta for the negbin # # Bad location => rethink the design of the code assign(".famFuns", famFuns, env) assign(".family", family, env) assign("nobs", length(lhs), env) assign(".lhs", lhs, env) assign(".isMulticore", isMulticore, env) assign(".CORES", FENmlm_CORES, env) assign(".verbose", verbose, env) if(missing(theta.init)){ theta.init = NULL } else { if(!is.null(theta.init) && (!is.numeric(theta.init) || length(theta.init)!=1 || theta.init<=0)){ stop("the argument 'theta.init' must be a strictly positive scalar.") } } model0 <- get_model_null(env, theta.init) theta.init = model0$theta # For the negative binomial: if(family == "negbin"){ params = c(params, ".theta") start = c(start, theta.init) names(start) = params upper = c(upper, 10000) lower = c(lower, 1e-3) } # On balance les donnees a utiliser dans un nouvel environnement if(isLinear) assign("linear.mat", linear.mat, env) if(isGradient) assign(".call_gradient", nl.gradient[[2]], env) #### #### Sending to the env #### #### useExp_clusterCoef = family %in% c("poisson") # The dummies assign("isDummy", isDummy, env) if(isDummy){ assign(".dum_all", dum_all, env) assign(".nbCluster", nbCluster, env) assign(".sum_y", sum_y_all, env) assign(".tableCluster", obs_per_cluster_all, env) assign(".familyConv", family, env) # new family -- used in convergence, can be modified if(Q > 1 || family %in% c("negbin")){ # for the derivatives dumMat_cpp = matrix(unlist(dum_all), ncol = Q) - 1 assign(".dumMat_cpp", dumMat_cpp, env) } # the saved dummies if(!is.null(dots$clusterStart)){ # information on starting values coming from update method doExp = ifelse(useExp_clusterCoef, exp, I) if(dots$clusterFromUpdate || length(obs2remove) == 0){ # Means it's the full cluster properly given assign(".savedDummy", doExp(dots$clusterStart), env) } else { assign(".savedDummy", doExp(dots$clusterStart[-obs2remove]), env) } } else if(useExp_clusterCoef){ assign(".savedDummy", rep(1, length(lhs)), env) } else { assign(".savedDummy", rep(0, length(lhs)), env) } # TO DELETE when new cpp functions fully implemented assign(".orderCluster", NULL, env) if(isMulticore || family %in% c("negbin", "logit")){ # we also add this variable used in cpp orderCluster_all = list() for(i in 1:Q){ orderCluster_all[[i]] = order(dum_all[[i]]) - 1 } # orderCluster_mat = do.call("cbind", orderCluster_all) assign(".orderCluster", orderCluster_all, env) } # New cpp functions # This is where we send the elements needed for convergence in cpp assign(".dum_vector", as.integer(unlist(dum_all) - 1), env) assign(".tableCluster_vector", as.integer(unlist(obs_per_cluster_all)), env) assign(".sum_y_vector", unlist(sum_y_all), env) if(family == "gaussian" && Q >= 2){ assign(".invTableCluster", 1/unlist(obs_per_cluster_all)) } else { assign(".invTableCluster", 1L) } if(family %in% c("negbin", "logit")){ assign(".cumtable_vector", as.integer(unlist(lapply(obs_per_cluster_all, cumsum))), env) assign(".obsCluster_vector", as.integer(unlist(orderCluster_all)), env) } else { # we need to assign it anyway assign(".cumtable_vector", 1L, env) assign(".obsCluster_vector", 1L, env) } } # basic NL envNL = new.env() assign("isNL", isNL, env) if(isNL){ for(var in nonlinear.varnames) assign(var, data[[var]], envNL) for(var in nonlinear.params) assign(var, start[var], envNL) } assign("envNL", envNL, env) assign(".nl.call", nl.call, env) assign("isGradient", isGradient, env) # other assign(".lhs", lhs, env) assign("isLinear", isLinear, env) assign("linear.params", linear.params, env) assign("nonlinear.params", nonlinear.params, env) assign("params", params, env) assign("nobs", length(lhs), env) assign(".verbose", verbose, env) assign("jacobian.method", jacobian.method, env) assign(".famFuns", famFuns, env) assign(".family", family, env) assign(".iter", 0, env) # Pour gerer les valeurs de mu: assign(".coefMu", list(), env) assign(".valueMu", list(), env) assign(".valueExpMu", list(), env) assign(".wasUsed", TRUE, env) # Pour les valeurs de la Jacobienne non lineaire assign(".JC_nbSave", 0, env) assign(".JC_nbMaxSave", 1, env) assign(".JC_savedCoef", list(), env) assign(".JC_savedValue", list(), env) # PRECISION assign(".eps.cluster", eps.cluster, env) assign(".eps.NR", eps.NR, env) assign(".eps.deriv", eps.deriv, env) # ITERATIONS assign(".itermax.cluster", itermax.cluster, env) assign(".itermax.deriv", itermax.deriv, env) # OTHER assign(".useAcc", useAcc, env) assign(".warn_0_Hessian", FALSE, env) assign(".warn_overfit_logit", FALSE, env) # To monitor how the clusters are computed (if the problem is difficult or not) assign(".firstIterCluster", 1e10, env) # the number of iterations in the first run assign(".firstRunCluster", TRUE, env) # flag for first enrty in get_dummies assign(".iterCluster", 1e10, env) # the previous number of cluster iterations assign(".evolutionLL", Inf, env) # diff b/w two successive LL assign(".pastLL", 0, env) assign(".iterLastPrecisionIncrease", 0, env) # the last iteration when precision was increased assign(".nbLowIncrease", 0, env) # number of successive evaluations with very low LL increments assign(".nbIterOne", 0, env) # nber of successive evaluations with only 1 iter to get the clusters assign(".difficultConvergence", FALSE, env) # Same for derivatives assign(".derivDifficultConvergence", FALSE, env) assign(".firstRunDeriv", TRUE, env) # flag for first entry in derivative assign(".accDeriv", TRUE, env) # Logical: flag for accelerating deriv assign(".iterDeriv", 1e10, env) # number of iterations in the derivatives step # # if there is only the intercept and cluster => we estimate only the clusters # if(!isLinear && !isNonLinear && Q>0){ if(family == "negbin"){ stop("To estimate the negative binomial model, you need at least one variable. (The estimation of the model with only the clusters is not implemented.)") } results = femlm_only_clusters(env, model0, cluster, dum_names) results$call = match.call() results$fml = fml if(length(obs2remove)>0){ results$obsRemoved = obs2remove results$clusterRemoved = dummyOmises } results$onlyCluster = TRUE return(results) } # On teste les valeurs initiales pour informer l'utilisateur if(isNL){ mu = NULL try(mu <- eval(nl.call, envir = envNL), silent = FALSE) if(is.null(mu)){ # the non linear part could not be evaluated - ad hoc message stop("The non-linear part (NL.fml) could not be evaluated. There may be a problem in 'NL.fml'.") } # DEPREC: the NL part should return stg the same length # # the special case of the constant # if(length(mu) == 1){ # mu = rep(mu, nrow(data)) # } # No numeric vectors if(!is.vector(mu) || !is.numeric(mu)){ stop("Evaluation of NL.fml should return a numeric vector. (This is currently not the case)") } # Handling NL.fml errors if(length(mu) != nrow(data)){ stop("Evaluation of NL.fml leads to ", length(mu), " observations while there are ", nrow(data), " observations in the data base. They should be of the same lenght.") } if(anyNA(mu)){ stop("Evaluating NL.fml leads to NA values (which are forbidden). Maybe it's a problem with the starting values, maybe it's another problem.") } } else { mu = eval(nl.call, envir = envNL) } # On sauvegarde les valeurs de la partie non lineaire assign(".nbMaxSave", NLsave, env) # nombre maximal de valeurs a sauvegarder assign(".nbSave", 1, env) # nombre de valeurs totales sauvegardees assign(".savedCoef", list(start[nonlinear.params]), env) assign(".savedValue", list(mu), env) if(isLinear) { mu <- mu + c(linear.mat%*%unlist(start[linear.params])) } if(anyNA(mu)){ stop("Evaluating the left hand side leads to NA values.") } # Check of the user-defined gradient, if given if(isGradient){ for(nom in nonlinear.params) assign(nom, start[nom], env) test <- eval(nl.gradient[[2]], envir=env) if(!class(test)%in%c("list", "data.frame")) stop("The function called by 'nl.gradient' must return an object of type 'list' or 'data.frame'.") if(!all(nonlinear.params%in%names(test))) stop(paste("The gradient must return a value for each parameter. Some are missing:\n", paste(nonlinear.params[!nonlinear.params%in%names(test)], collapse=", "), ".", sep="")) if(!all(names(test)%in%nonlinear.params)) warning(paste("Some values given by 'nl.gradient' are not in the parameters:\n", paste(names(test)[!names(test)%in%nonlinear.params], collapse=", "), ".", sep="")) if(mean(sapply(test[nonlinear.params], length))!=length(lhs)) stop("Strange, the length of the vector returned by 'nl.gradient' does not match with the data.") #we save 1 gradient: jacob.mat = as.matrix(test[nonlinear.params]) assign(".JC_nbSave", 1, env) assign(".JC_savedCoef", list(start[nonlinear.params]), env) assign(".JC_savedValue", list(jacob.mat), env) } # Mise en place du calcul du gradient gradient = femlm_gradient hessian <- NULL if(useHessian) hessian <- femlm_hessian # GIVE PARAMS if(!is.null(dots$give.params) && dots$give.params) return(list(coef=start, env=env)) if(verbose >= 2) cat("Setup in ", (proc.time() - ptm)[3], "s\n", sep="") # # Maximizing the likelihood # opt <- NULL opt <- stats::nlminb(start=start, objective=femlm_ll, env=env, lower=lower, upper=upper, gradient=gradient, hessian=hessian, control=opt.control) if(is.null(opt)){ stop("Could not achieve maximization.") } convStatus = TRUE warningMessage = "" if(!opt$message %in% c("X-convergence (3)", "relative convergence (4)", "both X-convergence and relative convergence (5)")){ # warning("[femlm] The optimization algorithm did not converge, the results are not reliable. Use function diagnostic() to see what's wrong.", call. = FALSE) warningMessage = " The optimization algorithm did not converge, the results are not reliable." convStatus = FALSE } #### #### After Maximization #### #### coef <- opt$par # The Hessian hessian = femlm_hessian(coef, env=env) # we add the names of the non linear variables in the hessian if(isNonLinear || family == "negbin"){ dimnames(hessian) = list(params, params) } # we create the Hessian without the bounded parameters hessian_noBounded = hessian # Handling the bounds if(!isNonLinear){ NL.fml = NULL bounds = NULL isBounded = NULL } else { # we report the bounds & if the estimated parameters are bounded upper_bound = upper[nonlinear.params] lower_bound = lower[nonlinear.params] # 1: are the estimated parameters at their bounds? coef_NL = coef[nonlinear.params] isBounded = rep(FALSE, length(params)) isBounded[1:length(coef_NL)] = (coef_NL == lower_bound) | (coef_NL == upper_bound) # 2: we save the bounds upper_bound_small = upper_bound[is.finite(upper_bound)] lower_bound_small = lower_bound[is.finite(lower_bound)] bounds = list() if(length(upper_bound_small) > 0) bounds$upper = upper_bound_small if(length(lower_bound_small) > 0) bounds$lower = lower_bound_small if(length(bounds) == 0){ bounds = NULL } # 3: we update the Hessian (basically, we drop the bounded element) if(any(isBounded)){ hessian_noBounded = hessian[-which(isBounded), -which(isBounded), drop = FALSE] boundText = ifelse(coef_NL == upper_bound, "Upper bounded", "Lower bounded")[isBounded] attr(isBounded, "type") = boundText } } # Variance var <- NULL try(var <- solve(hessian_noBounded), silent = TRUE) if(is.null(var)){ warningMessage = paste(warningMessage, "The information matrix is singular (likely presence of collinearity). Use function diagnostic() to pinpoint collinearity problems.") var = hessian_noBounded*NA se = diag(var) } else { se = diag(var) se[se < 0] = NA se = sqrt(se) } # Warning message if(nchar(warningMessage) > 0){ if(showWarning) warning("[femlm]:", warningMessage) } # To handle the bounded coefficient, we set its SE to NA if(any(isBounded)){ se = se[params] names(se) = params } zvalue <- coef/se pvalue <- 2*pnorm(-abs(zvalue)) # We add the information on the bound for the se & update the var to drop the bounded vars se_format = se if(any(isBounded)){ se_format[!isBounded] = decimalFormat(se_format[!isBounded]) se_format[isBounded] = boundText } coeftable <- data.frame("Estimate"=coef, "Std. Error"=se_format, "z value"=zvalue, "Pr(>|z|)"=pvalue, stringsAsFactors = FALSE) names(coeftable) <- c("Estimate", "Std. Error", "z value", "Pr(>|z|)") row.names(coeftable) <- params attr(se, "type") = attr(coeftable, "type") = "Standard" mu_both = get_mu(coef, env, final = TRUE) mu = mu_both$mu exp_mu = mu_both$exp_mu # calcul pseudo r2 loglik <- -opt$objective # moins car la fonction minimise ll_null <- model0$loglik # degres de liberte df_k = length(coef) if(isDummy) df_k = df_k + sum(sapply(dum_all, max) - 1) + 1 # dummies are constrained, they don't have full dof (cause you need to take one value off for unicity) # this is an approximation, in some cases there can be more than one ref. But good approx. pseudo_r2 <- 1 - (loglik-df_k)/(ll_null-1) # Calcul residus expected.predictor = famFuns$expected.predictor(mu, exp_mu, env) residuals = lhs - expected.predictor # calcul squared corr if(sd(expected.predictor) == 0){ sq.cor = NA } else { sq.cor = stats::cor(lhs, expected.predictor)**2 } # The scores scores = femlm_scores(coef, env) if(isNonLinear){ # we add the names of the non linear params in the score colnames(scores) = params } res <- list(coefficients=coef, coeftable=coeftable, loglik=loglik, iterations=opt$iterations, n=length(lhs), nparams=df_k, call=call, fml=fml, ll_null=ll_null, pseudo_r2=pseudo_r2, message=opt$message, convStatus=convStatus, sq.cor=sq.cor, fitted.values=expected.predictor, hessian=hessian, cov.unscaled=var, se=se, scores=scores, family=family, residuals=residuals) # Other optional elements if(!missing(offset)){ res$offset = offset } # The value of mu (if cannot be recovered from fitted()) if(family == "logit"){ qui_01 = expected.predictor %in% c(0, 1) if(any(qui_01)){ res$mu = mu } } else if(family %in% c("poisson", "negbin")){ qui_0 = expected.predictor == 0 if(any(qui_0)){ res$mu = mu } } if(!is.null(NL.fml)){ res$NL.fml = NL.fml if(!is.null(bounds)){ res$bounds = bounds res$isBounded = isBounded } } # Dummies if(isDummy){ dummies = attr(mu, "mu_dummies") if(useExp_clusterCoef){ dummies = rpar_log(dummies, env) } res$sumFE = dummies # res$clusterNames = cluster # # id_dummies = list() # for(i in 1:length(cluster)){ # dum = dum_all[[i]] # attr(dum, "clust_names") = as.character(dum_names[[i]]) # id_dummies[[cluster[i]]] = dum # } res$clusterNames = cluster[reorder] id_dummies = list() for(i in reorder){ dum = dum_all[[i]] attr(dum, "clust_names") = as.character(dum_names[[i]]) id_dummies[[cluster[i]]] = dum } res$id_dummies = id_dummies # clustSize = sapply(id_dummies, max) clustSize = nbCluster[reorder] names(clustSize) = res$clusterNames res$clusterSize = clustSize } # Observations removed (either NA or clusters) if(length(obs2remove)>0){ res$obsRemoved = obs2remove if(isDummy && any(lengths(dummyOmises) > 0)){ res$clusterRemoved = dummyOmises } } if(family == "negbin"){ theta = coef[".theta"] res$theta = theta if(theta > 1000){ warning("Very high value of theta (", theta, "). There is no sign of overdisperion, you may consider a Poisson model.") } } class(res) <- "femlm" if(verbose > 0){ cat("\n") } return(res) } femlm_only_clusters <- function(env, model0, cluster, dum_names){ # Estimation with only the cluster coefficients # # 1st step => computing the dummies # nobs = get("nobs", env) family = get(".family", env) offset.value = get("offset.value", env) if(family == "negbin"){ coef[[".theta"]] = model0$theta } else { coef = list() } # indicator of whether we compute the exp(mu) useExp = family %in% c("poisson", "logit", "negbin") useExp_clusterCoef = family %in% c("poisson") # mu, using the offset mu_noDum = offset.value if(length(mu_noDum) == 1) mu_noDum = rep(mu_noDum, nobs) # we create the exp of mu => used for later functions exp_mu_noDum = NULL if(useExp_clusterCoef){ exp_mu_noDum = rpar_exp(mu_noDum, env) } dummies = getDummies(mu_noDum, exp_mu_noDum, env, coef) exp_mu = NULL if(useExp_clusterCoef){ # despite being called mu, it is in fact exp(mu)!!! exp_mu = exp_mu_noDum*dummies mu = rpar_log(exp_mu, env) } else { mu = mu_noDum + dummies if(useExp){ exp_mu = rpar_exp(mu, env) } } # # 2nd step => saving information # dum_all = get(".dum_all", env) famFuns = get(".famFuns", env) lhs = get(".lhs", env) # The log likelihoods loglik = famFuns$ll(lhs, mu, exp_mu, env, coef) ll_null = model0$loglik # degres de liberte df_k = sum(sapply(dum_all, max) - 1) + 1 pseudo_r2 = 1 - loglik/ll_null # NON Adjusted # Calcul residus expected.predictor = famFuns$expected.predictor(mu, exp_mu, env) residuals = lhs - expected.predictor # calcul squared corr if(sd(expected.predictor) == 0){ sq.cor = NA } else { sq.cor = stats::cor(lhs, expected.predictor)**2 } # calcul r2 naif naive.r2 = 1 - sum(residuals**2) / sum((lhs - mean(lhs))**2) res = list(loglik=loglik, n=length(lhs), nparams=df_k, call=call, ll_null=ll_null, pseudo_r2=pseudo_r2, naive.r2=naive.r2, sq.cor=sq.cor, expected.predictor=expected.predictor, residuals=residuals, family=family) # # Information on the dummies if(useExp_clusterCoef){ dummies = rpar_log(dummies, env) } res$sumFE = dummies res$clusterNames = cluster id_dummies = list() for(i in 1:length(cluster)){ dum = dum_all[[i]] attr(dum, "clust_names") = as.character(dum_names[[i]]) id_dummies[[cluster[i]]] = dum } res$id_dummies = id_dummies clustSize = sapply(dum_all, max) names(clustSize) = cluster res$clusterSize = clustSize if(family == "negbin"){ theta = coef[".theta"] res$theta = theta } res$convStatus = TRUE class(res) = "femlm" return(res) } femlm_hessian <- function(coef, env){ # Computes the hessian verbose = get(".verbose", env) if(verbose >= 2) ptm = proc.time() params <- get("params", env) names(coef) <- params nonlinear.params <- get("nonlinear.params", env) k <- length(nonlinear.params) isNL <- get("isNL", env) hessianArgs = get("hessianArgs", env) famFuns = get(".famFuns", env) family = get(".family", env) y = get(".lhs", env) isDummy = get("isDummy", env) mu_both = get_savedMu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu jacob.mat = get_Jacobian(coef, env) ll_d2 = famFuns$ll_d2(y, mu, exp_mu, coef) if(isDummy){ dxi_dbeta = deriv_xi(jacob.mat, ll_d2, env, coef) jacob.mat = jacob.mat + dxi_dbeta } else dxi_dbeta = 0 hessVar = crossprod(jacob.mat, jacob.mat * ll_d2) if(isNL){ # we get the 2nd derivatives z = numDeriv::genD(evalNLpart, coef[nonlinear.params], env=env, method.args = hessianArgs)$D[, -(1:k), drop=FALSE] ll_dl = famFuns$ll_dl(y, mu, exp_mu, coef=coef, env=env) id_r = rep(1:k, 1:k) id_c = c(sapply(1:k, function(x) 1:x), recursive=TRUE) H = matrix(0, nrow=k, ncol=k) H[cbind(id_r, id_c)] = H[cbind(id_r, id_c)] = colSums(z*ll_dl) } else H = 0 # on ajoute la partie manquante if(isNL) hessVar[1:k, 1:k] = hessVar[1:k, 1:k] + H if(family=="negbin"){ theta = coef[".theta"] ll_dx_dother = famFuns$ll_dx_dother(y, mu, exp_mu, coef, env) if(isDummy){ dxi_dother = deriv_xi_other(ll_dx_dother, ll_d2, env, coef) } else { dxi_dother = 0 } # calcul des derivees secondes vav de theta h.theta.L = famFuns$hess.thetaL(theta, jacob.mat, y, dxi_dbeta, dxi_dother, ll_d2, ll_dx_dother) hessVar = cbind(hessVar, h.theta.L) h.theta = famFuns$hess_theta_part(theta, y, mu, exp_mu, dxi_dother, ll_dx_dother, ll_d2, env) hessVar = rbind(hessVar, c(h.theta.L, h.theta)) } if(anyNA(hessVar)){ stop("NaN in the Hessian, can be due to a possible overfitting problem.\nIf so, to have an idea of what's going on, you can reduce the value of the argument 'rel.tol' of the nlminb algorithm using the argument 'opt.control = list(rel.tol=?)' with ? the new value.") } # warn_0_Hessian = get(".warn_0_Hessian", env) # if(!warn_0_Hessian && any(diag(hessVar) == 0)){ # # We apply the warning only once # var_problem = params[diag(hessVar) == 0] # warning("Some elements of the diagonal of the hessian are equal to 0: likely presence of collinearity. FYI the problematic variables are: ", paste0(var_problem, collapse = ", "), ".", immediate. = TRUE) # assign(".warn_0_Hessian", TRUE, env) # } # if(verbose >= 2) cat("Hessian: ", (proc.time()-ptm)[3], "s\n", sep="") - hessVar } femlm_gradient <- function(coef, env){ # cat("gradient:\n") ; print(as.vector(coef)) params = get("params", env) names(coef) = params nonlinear.params = get("nonlinear.params", env) linear.params = get("linear.params", env) famFuns = get(".famFuns", env) family = get(".family", env) y = get(".lhs", env) mu_both = get_savedMu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu # calcul de la jacobienne res <- list() #stocks the results # cat("\tgetting jacobian") # ptm = proc.time() jacob.mat = get_Jacobian(coef, env) # cat("in", (proc.time()-ptm)[3], "s.\n") # cat("\tComputing gradient ") # ptm = proc.time() # res = famFuns$grad(jacob.mat, y, mu, env, coef) res = getGradient(jacob.mat, y, mu, exp_mu, env, coef) # cat("in", (proc.time()-ptm)[3], "s.\n") names(res) = c(nonlinear.params, linear.params) if(family=="negbin"){ theta = coef[".theta"] res[".theta"] = famFuns$grad.theta(theta, y, mu, exp_mu, env) } return(-unlist(res[params])) } femlm_scores <- function(coef, env){ # Computes the scores (Jacobian) params = get("params", env) names(coef) <- params famFuns = get(".famFuns", env) family = get(".family", env) y = get(".lhs", env) mu_both = get_savedMu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu jacob.mat = get_Jacobian(coef, env) scores = getScores(jacob.mat, y, mu, exp_mu, env, coef) if(family=="negbin"){ theta = coef[".theta"] score.theta = famFuns$scores.theta(theta, y, mu, exp_mu, env) scores = cbind(scores, score.theta) } return(scores) } femlm_ll <- function(coef, env){ # Log likelihood # misc funs iter = get(".iter", env) + 1 assign(".iter", iter, env) pastLL = get(".pastLL", env) verbose = get(".verbose", env) ptm = proc.time() if(verbose >= 1){ coef_names = sapply(names(coef), charShorten, width = 10) coef_line = paste0(coef_names, ": ", signif(coef), collapse = " -- ") cat("\nIter", iter, "- Coefficients:", coef_line, "\n") } # computing the LL famFuns = get(".famFuns", env) family = get(".family", env) y <- get(".lhs", env) if(any(is.na(coef))) stop("Divergence... (some coefs are NA)\nTry option verbose=2 to figure out the problem.") mu_both = get_mu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu # for the NEGBIN, we add the coef ll = famFuns$ll(y, mu, exp_mu, env, coef) evolutionLL = ll - pastLL assign(".evolutionLL", evolutionLL, env) assign(".pastLL", ll, env) if(iter == 1) evolutionLL = "--" if(verbose >= 1) cat("LL = ", ll, " (", (proc.time()-ptm)[3], "s)\tevol = ", evolutionLL, "\n", sep = "") if(ll==(-Inf)) return(1e308) return(-ll) # je retourne -ll car la fonction d'optimisation minimise } evalNLpart = function(coef, env){ # cat("Enter evalNLpart : ", as.vector(coef), "\n") # fonction qui evalue la partie NL isNL = get("isNL", env) if(!isNL) return(0) envNL = get("envNL", env) nonlinear.params <- get("nonlinear.params", env) nl.call <- get(".nl.call", env) nbSave = get(".nbSave", env) nbMaxSave = get(".nbMaxSave", env) savedCoef = get(".savedCoef", env) savedValue = get(".savedValue", env) if(!is.null(names(coef))){ coef = coef[nonlinear.params] } else if (length(coef) != length(nonlinear.params)){ stop("Problem with the length of the NL coefficients.") } if(nbMaxSave == 0){ for(var in nonlinear.params) assign(var, coef[var], envNL) y_nl <- eval(nl.call, envir = envNL) # we check problems if(anyNA(y_nl)){ stop("Evaluation of non-linear part returns NAs. The coefficients were: ", paste0(nonlinear.params, " = ", signif(coef[nonlinear.params], 3)), ".") } return(y_nl) } for(i in nbSave:1){ #les valeurs les + recentes sont en derniere position if(all(coef == savedCoef[[i]])){ return(savedValue[[i]]) } } # Si la valeur n'existe pas, on la sauvegarde # on met les valeurs les plus recentes en derniere position for(var in nonlinear.params) assign(var, coef[var], envNL) y_nl = eval(nl.call, envir = envNL) # we check problems if(anyNA(y_nl)){ stop("Evaluation of non-linear part returns NAs. The coefficients were: ", paste0(nonlinear.params, " = ", signif(coef[nonlinear.params], 3)), ".") } if(nbSave < nbMaxSave){ savedCoef[[nbSave + 1]] = coef savedValue[[nbSave + 1]] = y_nl assign(".nbSave", nbSave + 1, env) } else if(nbMaxSave > 1){ tmp = list() tmp[[nbSave]] = coef tmp[1:(nbSave-1)] = savedCoef[2:nbSave] savedCoef = tmp tmp = list() tmp[[nbSave]] = y_nl tmp[1:(nbSave-1)] = savedValue[2:nbSave] savedValue = tmp } else{ savedCoef = list(coef) savedValue = list(y_nl) } # cat("computed NL part:", as.vector(coef), "\n") assign(".savedCoef", savedCoef, env) assign(".savedValue", savedValue, env) return(y_nl) } get_mu = function(coef, env, final = FALSE){ # This function computes the RHS of the equation # mu_L => to save one matrix multiplication isNL = get("isNL", env) isLinear = get("isLinear", env) isDummy = get("isDummy", env) nobs = get("nobs", env) params = get("params", env) family = get(".family", env) offset.value = get("offset.value", env) names(coef) = params # UseExp: indicator if the family needs to use exp(mu) in the likelihoods: # this is useful because we have to compute it only once (save computing time) # useExp_clusterCoef: indicator if we use the exponential of mu to obtain the cluster coefficients # if it is TRUE, it will mean that the dummy will be equal # to exp(mu_dummies) despite being named mu_dummies useExp = family %in% c("poisson", "logit", "negbin") useExp_clusterCoef = family %in% c("poisson") # For managing mu: coefMu = get(".coefMu", env) valueMu = get(".valueMu", env) valueExpMu = get(".valueExpMu", env) wasUsed = get(".wasUsed", env) if(wasUsed){ coefMu = valueMu = valueExpMu = list() assign(".wasUsed", FALSE, env) } if(length(coefMu)>0){ for(i in 1:length(coefMu)){ if(all(coef==coefMu[[i]])){ return(list(mu = valueMu[[i]], exp_mu = valueExpMu[[i]])) } } } if(isNL){ muNL = evalNLpart(coef, env) } else muNL = 0 if(isLinear){ linear.params = get("linear.params", env) linear.mat = get("linear.mat", env) mu_L = c(linear.mat %*% coef[linear.params]) } else mu_L = 0 mu_noDum = muNL + mu_L + offset.value # Detection of overfitting issues with the logit model: if(family == "logit"){ warn_overfit_logit = get(".warn_overfit_logit", env) if(!warn_overfit_logit && max(abs(mu_noDum)) >= 300){ # overfitting => now finding the precise cause # browser() if(!isNL || (isLinear && max(abs(mu_L)) >= 100)){ # we create the matrix with the coefficients to find out the guy mat_L_coef = linear.mat * matrix(coef[linear.params], nrow(linear.mat), 2, byrow = TRUE) max_var = apply(abs(mat_L_coef), 2, max) best_suspect = linear.params[which.max(max_var)] warning("in femlm(): Likely presence of an overfitting problem. One suspect variable is: ", best_suspect, ".", immediate. = TRUE, call. = FALSE) } else { warning("in femlm(): Likely presence of an overfitting problem due to the non-linear part.", immediate. = TRUE, call. = FALSE) } assign(".warn_overfit_logit", TRUE, env) } } # we create the exp of mu => used for later functions exp_mu_noDum = NULL if(useExp_clusterCoef){ exp_mu_noDum = rpar_exp(mu_noDum, env) } if(isDummy){ # we get back the last dummy mu_dummies = getDummies(mu_noDum, exp_mu_noDum, env, coef, final) } else { if(useExp_clusterCoef){ mu_dummies = 1 } else { mu_dummies = 0 } } # We add the value of the dummy to mu and we compute the exp if necessary exp_mu = NULL if(useExp_clusterCoef){ # despite being called mu_dummies, it is in fact exp(mu_dummies)!!! exp_mu = exp_mu_noDum*mu_dummies mu = rpar_log(exp_mu, env) } else { mu = mu_noDum + mu_dummies if(useExp){ exp_mu = rpar_exp(mu, env) } } if(isDummy){ # BEWARE, if useExp_clusterCoef, it is equal to exp(mu_dummies) attr(mu, "mu_dummies") = mu_dummies } if(length(mu)==0) mu = rep(mu, nobs) # we save the value of mu: coefMu = append(coefMu, list(coef)) valueMu = append(valueMu, list(mu)) valueExpMu = append(valueExpMu, list(exp_mu)) assign(".coefMu", coefMu, env) assign(".valueMu", valueMu, env) assign(".valueExpMu", valueExpMu, env) return(list(mu = mu, exp_mu = exp_mu)) } get_savedMu = function(coef, env){ # This function gets the mu without computation # It follows a LL evaluation coefMu = get(".coefMu", env) valueMu = get(".valueMu", env) valueExpMu = get(".valueExpMu", env) assign(".wasUsed", TRUE, env) if(length(coefMu)>0) for(i in 1:length(coefMu)) if(all(coef==coefMu[[i]])){ # cat("coef nb:", i, "\n") return(list(mu = valueMu[[i]], exp_mu = valueExpMu[[i]])) } stop("Problem in \"get_savedMu\":\n gradient did not follow LL evaluation.") } get_Jacobian = function(coef, env){ # retrieves the Jacobian of the "rhs" params <- get("params", env) names(coef) <- params isNL <- get("isNL", env) isLinear <- get("isLinear", env) isGradient = get("isGradient", env) if(isNL){ nonlinear.params = get("nonlinear.params", env) jacob.mat = get_NL_Jacobian(coef[nonlinear.params], env) } else jacob.mat = c() if(isLinear){ linear.mat = get("linear.mat", env) if(is.null(dim(jacob.mat))){ jacob.mat = linear.mat } else { jacob.mat = cbind(jacob.mat, linear.mat) } } return(jacob.mat) } get_NL_Jacobian = function(coef, env){ # retrieves the Jacobian of the non linear part #cat("In NL JAC:\n") #print(coef) nbSave = get(".JC_nbSave", env) nbMaxSave = get(".JC_nbMaxSave", env) savedCoef = get(".JC_savedCoef", env) savedValue = get(".JC_savedValue", env) nonlinear.params <- get("nonlinear.params", env) coef = coef[nonlinear.params] if(nbSave>0) for(i in nbSave:1){ #les valeurs les + recentes sont en derniere position if(all(coef == savedCoef[[i]])){ # cat("Saved value:", as.vector(coef), "\n") return(savedValue[[i]]) } } #Si la valeur n'existe pas, on la sauvegarde #on met les valeurs les plus recentes en derniere position isGradient <- get("isGradient", env) if(isGradient){ call_gradient <- get(".call_gradient", env) #we send the coef in the environment for(var in nonlinear.params) assign(var, coef[var], env) jacob.mat <- eval(call_gradient, envir=env) jacob.mat <- as.matrix(as.data.frame(jacob.mat[nonlinear.params])) } else { jacobian.method <- get("jacobian.method", env) jacob.mat <- numDeriv::jacobian(evalNLpart, coef, env=env, method=jacobian.method) } #Controls: if(anyNA(jacob.mat)){ qui <- which(apply(jacob.mat, 2, function(x) anyNA(x))) variables <- nonlinear.params[qui] stop("ERROR: The Jacobian of the nonlinear part has NA!\nThis concerns the following variables:\n", paste(variables, sep=" ; ")) } #Sauvegarde if(nbSave<nbMaxSave){ savedCoef[[nbSave+1]] = coef savedValue[[nbSave+1]] = jacob.mat assign(".JC_nbSave", nbSave+1, env) } else if(nbMaxSave>1){ tmp = list() tmp[[nbSave]] = coef tmp[1:(nbSave-1)] = savedCoef[2:nbSave] savedCoef = tmp tmp = list() tmp[[nbSave]] = jacob.mat tmp[1:(nbSave-1)] = savedValue[2:nbSave] savedValue = tmp } else{ savedCoef = list(coef) savedValue = list(jacob.mat) } # print(colSums(jacob.mat)) # cat("computed NL Jacobian:", as.vector(coef), "\n") # print(savedCoef) assign(".JC_savedCoef", savedCoef, env) assign(".JC_savedValue", savedValue, env) return(jacob.mat) } get_model_null <- function(env, theta.init){ # I have the closed form of the ll0 famFuns = get(".famFuns", env) family = get(".family", env) N = get("nobs", env) y = get(".lhs", env) verbose = get(".verbose", env) ptm = proc.time() # one of the elements to be returned theta = NULL if(family == "poisson"){ # There is a closed form if(".lfactorial" %in% names(env)){ lfact = get(".lfactorial", env) } else { # lfactorial(x) == lgamma(x+1) # lfact = sum(lfactorial(y)) lfact = sum(rpar_lgamma(y + 1, env)) assign(".lfactorial", lfact, env) } sy = sum(y) constant = log(sy / N) # loglik = sy*log(sy) - sy*log(N) - sy - sum(lfactorial(y)) loglik = sy*log(sy) - sy*log(N) - sy - lfact } else if(family == "gaussian"){ # there is a closed form constant = mean(y) ss = sum( (y - constant)**2 ) sigma = sqrt( ss / N ) loglik = -1/2/sigma^2*ss - N*log(sigma) - N*log(2*pi)/2 } else if(family == "logit"){ # there is a closed form sy = sum(y) constant = log(sy) - log(N - sy) loglik = sy*log(sy) - sy*log(N-sy) - N*log(N) + N*log(N-sy) } else if(family=="negbin"){ if(".lgamma" %in% names(env)){ lgamm = get(".lgamma", env) } else { # lgamm = sum(lgamma(y + 1)) lgamm = sum(rpar_lgamma(y + 1, env)) assign(".lgamma", lgamm, env) } sy = sum(y) constant = log(sy / N) mean_y = mean(y) invariant = sum(y*constant) - lgamm if(is.null(theta.init)){ theta.guess = max(mean_y**2 / max((var(y) - mean_y), 1e-4), 0.05) } else { theta.guess = theta.init } # I set up a limit of 0.05, because when it is too close to 0, convergence isnt great opt <- nlminb(start=theta.guess, objective=famFuns$ll0_theta, y=y, gradient=famFuns$grad0_theta, lower=1e-3, mean_y=mean_y, invariant=invariant, hessian = famFuns$hess0_theta, env=env) loglik = -opt$objective theta = opt$par } if(verbose >= 2) cat("Null model in ", (proc.time()-ptm)[3], "s. ", sep ="") return(list(loglik=loglik, constant=constant, theta = theta)) } getGradient = function(jacob.mat, y, mu, exp_mu, env, coef, ...){ famFuns = get(".famFuns", env) ll_dl = famFuns$ll_dl(y, mu, exp_mu, coef=coef, env=env) c(crossprod(jacob.mat, ll_dl)) } getScores = function(jacob.mat, y, mu, exp_mu, env, coef, ...){ famFuns = get(".famFuns", env) isDummy = get("isDummy", env) ll_dl = famFuns$ll_dl(y, mu, exp_mu, coef=coef, env=env) scores = jacob.mat* ll_dl if(isDummy){ ll_d2 = famFuns$ll_d2(y, mu, exp_mu, coef=coef, env=env) dxi_dbeta = deriv_xi(jacob.mat, ll_d2, env, coef) scores = scores + dxi_dbeta * ll_dl } return(as.matrix(scores)) } getDummies = function(mu, exp_mu, env, coef, final = FALSE){ # function built to get all the dummy variables # We retrieve past dummies (that are likely to be good # starting values) mu_dummies = get(".savedDummy", env) family = get(".family", env) eps.cluster = get(".eps.cluster", env) verbose = get(".verbose", env) if(verbose >= 2) ptm = proc.time() # # Dynamic precision # iterCluster = get(".iterCluster", env) evolutionLL = get(".evolutionLL", env) nobs = get("nobs", env) iter = get(".iter", env) iterLastPrecisionIncrease = get(".iterLastPrecisionIncrease", env) nbIterOne = get(".nbIterOne", env) if(iterCluster <= 2){ nbIterOne = nbIterOne + 1 } else { # we reinitialise nbIterOne = 0 } assign(".nbIterOne", nbIterOne, env) # nber of times LL almost didn't increase nbLowIncrease = get(".nbLowIncrease", env) if(evolutionLL/nobs < 1e-8){ nbLowIncrease = nbLowIncrease + 1 } else { # we reinitialise nbLowIncrease = 0 } assign(".nbLowIncrease", nbLowIncrease, env) if(!final && eps.cluster > .Machine$double.eps*10000 && iterCluster <= 2 && nbIterOne >= 2 && nbLowIncrease >= 2 && (iter - iterLastPrecisionIncrease) >= 3){ eps.cluster = eps.cluster/10 if(verbose >= 2) cat("Precision increased to", eps.cluster, "\n") assign(".eps.cluster", eps.cluster, env) assign(".iterLastPrecisionIncrease", iter, env) # If the precision increases, we must also increase the precision of the dummies! if(family %in% c("negbin", "logit")){ assign(".eps.NR", eps.cluster / 100, env) } # we also set acceleration to on assign(".useAcc", TRUE, env) } else if(final){ # we don't need ultra precision for these last dummies eps.cluster = eps.cluster * 10**(iterLastPrecisionIncrease != 0) if(family %in% c("negbin", "logit")){ assign(".eps.NR", eps.cluster / 100, env) } } iterMax = get(".itermax.cluster", env) nbCluster = get(".nbCluster", env) Q = length(nbCluster) # whether we use the eponentiation of mu useExp_clusterCoef = family %in% c("poisson") if(useExp_clusterCoef){ mu_in = exp_mu * mu_dummies } else { mu_in = mu + mu_dummies } # # Computing the optimal mu # useAcc = get(".useAcc", env) carryOn = FALSE # Finding the complexity of the problem firstRunCluster = get(".firstRunCluster", env) if(firstRunCluster && Q >= 3){ # First iteration: we check if the problem is VERY difficult (for Q = 3+) useAcc = TRUE assign(".useAcc", TRUE, env) res = convergence(coef, mu_in, env, iterMax = 15) if(res$iter == 15){ assign(".difficultConvergence", TRUE, env) carryOn = TRUE } } else if(useAcc){ res = convergence(coef, mu_in, env, iterMax) if(res$iter <= 2){ # if almost no iteration => no acceleration next time assign(".useAcc", FALSE, env) } } else { res = convergence(coef, mu_in, env, iterMax = 15) if(res$iter == 15){ carryOn = TRUE } } if(carryOn){ # the problem is difficult => acceleration on useAcc = TRUE assign(".useAcc", TRUE, env) res = convergence(coef, res$mu_new, env, iterMax) } mu_new = res$mu_new iter = res$iter # # Retrieving the value of the dummies # if(useExp_clusterCoef){ mu_dummies = mu_new / exp_mu } else { mu_dummies = mu_new - mu } # Warning messages if necessary: if(iter == iterMax) warning("[Getting cluster coefficients] iteration limit reached (", iterMax, ").", call. = FALSE, immediate. = TRUE) assign(".iterCluster", iter, env) # we save the dummy: assign(".savedDummy", mu_dummies, env) if(verbose >= 2){ acc_info = ifelse(useAcc, "+Acc. ", "-Acc. ") cat("Cluster Coef.: ", (proc.time()-ptm)[3], "s (", acc_info, "iter:", iter, ")\t", sep = "") } # we update the flag assign(".firstRunCluster", FALSE, env) mu_dummies } deriv_xi = function(jacob.mat, ll_d2, env, coef){ # Derivative of the cluster coefficients # data: iterMax = get(".itermax.deriv", env) nbCluster = get(".nbCluster", env) Q = length(nbCluster) verbose = get(".verbose", env) if(verbose >= 2) ptm = proc.time() # # initialisation of dxi_dbeta # if(Q >= 2){ # We set the initial values for the first run if(!".sum_deriv" %in% names(env)){ # init of the sum of the derivatives => 0 dxi_dbeta = matrix(0, nrow(jacob.mat), ncol(jacob.mat)) } else { dxi_dbeta = get(".sum_deriv", env) } } else { # no need if only 1, direct solution dxi_dbeta = NULL } # # Computing the optimal dxi_dbeta # accDeriv = get(".accDeriv", env) carryOn = FALSE # Finding the complexity of the problem firstRunDeriv = get(".firstRunDeriv", env) if(firstRunDeriv){ # set accDeriv: we use information on cluster deriv iterCluster = get(".iterCluster", env) diffConv = get(".difficultConvergence", env) if(iterCluster < 20 & !diffConv){ accDeriv = FALSE assign(".accDeriv", FALSE, env) } } if(firstRunDeriv && accDeriv && Q >= 3){ # First iteration: we check if the problem is VERY difficult (for Q = 3+) assign(".accDeriv", TRUE, env) res = dconvergence(dxi_dbeta, jacob.mat, ll_d2, env, iterMax = 15) if(res$iter == 15){ assign(".derivDifficultConvergence", TRUE, env) carryOn = TRUE } } else if(accDeriv){ res = dconvergence(dxi_dbeta, jacob.mat, ll_d2, env, iterMax) if(res$iter <= 10){ # if almost no iteration => no acceleration next time assign(".accDeriv", FALSE, env) } } else { res = dconvergence(dxi_dbeta, jacob.mat, ll_d2, env, iterMax = 50) if(res$iter == 50){ carryOn = TRUE } } if(carryOn){ # the problem is difficult => acceleration on accDeriv = TRUE assign(".accDeriv", TRUE, env) res = dconvergence(res$dxi_dbeta, jacob.mat, ll_d2, env, iterMax) } dxi_dbeta = res$dxi_dbeta iter = res$iter if(iter == iterMax) warning("[Getting cluster derivatives] Maximum iterations reached (", iterMax, ").") assign(".firstRunDeriv", FALSE, env) assign(".sum_deriv", dxi_dbeta, env) if(verbose >= 2){ acc_info = ifelse(accDeriv, "+Acc. ", "-Acc. ") cat(" Derivatives: ", (proc.time()-ptm)[3], "s (", acc_info, "iter:", iter, ")\n", sep = "") } return(dxi_dbeta) } deriv_xi_other = function(ll_dx_dother, ll_d2, env, coef){ # derivative of the dummies wrt an other parameter dumMat_cpp = get(".dumMat_cpp", env) nbCluster = get(".nbCluster", env) dum_all = get(".dum_all", env) eps.deriv = get(".eps.deriv", env) tableCluster_all = get(".tableCluster", env) orderCluster_all = get(".orderCluster", env) Q = length(dum_all) iterMax = 5000 if(Q==1){ dum = dum_all[[1]] k = max(dum) S_Jmu = cpp_tapply_vsum(k, ll_dx_dother, dum) S_mu = cpp_tapply_vsum(k, ll_d2, dum) dxi_dother = - S_Jmu[dum] / S_mu[dum] } else { # The cpp way: N = length(ll_d2) # We set the initial values for the first run if(!".sum_deriv_other" %in% names(env)){ init = rep(0, N) } else { init = get(".sum_deriv_other", env) } dxi_dother <- cpp_partialDerivative_other(iterMax, Q, N, epsDeriv = eps.deriv, ll_d2, ll_dx_dother, init, dumMat_cpp, nbCluster) # we save the values assign(".sum_deriv_other", dxi_dother, env) } as.matrix(dxi_dother) } #### #### Convergence #### #### convergence = function(coef, mu_in, env, iterMax){ # computes the new mu wrt the cluster coefficients nbCluster = get(".nbCluster", env) Q = length(nbCluster) useAcc = get(".useAcc", env) diffConv = get(".difficultConvergence", env) if(useAcc && diffConv && Q > 2){ # in case of complex cases: it's more efficient # to initialize the first two clusters res = conv_acc(coef, mu_in, env, iterMax, only2 = TRUE) mu_in = res$mu_new } if(Q == 1){ mu_new = conv_single(coef, mu_in, env) iter = 1 } else if(Q >= 2){ # Dynamic setting of acceleration if(!useAcc){ res = conv_seq(coef, mu_in, env, iterMax = iterMax) } else if(useAcc){ res = conv_acc(coef, mu_in, env, iterMax = iterMax) } mu_new = res$mu_new iter = res$iter } # we return a list with: new mu and iterations list(mu_new = mu_new, iter = iter) } conv_single = function(coef, mu_in, env){ # convergence for a single cluster # it returns: the new mu (NOT mu_dummies) # Loading all the required variables lhs = get(".lhs", env) nbCluster = get(".nbCluster", env) dum_vector = get(".dum_vector", env) tableCluster_vector = get(".tableCluster_vector", env) sum_y_vector = get(".sum_y_vector", env) cumtable_vector = get(".cumtable_vector", env) obsCluster_vector = get(".obsCluster_vector", env) nbThreads = get(".CORES", env) eps.NR = get(".eps.NR", env) family = get(".familyConv", env) family_nb = switch(family, poisson=1, negbin=2, logit=3, gaussian=4, lpoisson=5) theta = ifelse(family == "negbin", coef[".theta"], 1) mu_new = update_mu_single_cluster(family = family_nb, nb_cluster = nbCluster, theta = theta, diffMax_NR = eps.NR, mu_in = mu_in, lhs = lhs, sum_y = sum_y_vector, dum = dum_vector, obsCluster = obsCluster_vector, table = tableCluster_vector, cumtable = cumtable_vector, nbThreads = nbThreads) return(mu_new) } conv_seq = function(coef, mu_in, env, iterMax){ # convergence of cluster coef without acceleration # Now all in cpp # Loading all the required variables lhs = get(".lhs", env) nbCluster = get(".nbCluster", env) dum_vector = get(".dum_vector", env) tableCluster_vector = get(".tableCluster_vector", env) sum_y_vector = get(".sum_y_vector", env) cumtable_vector = get(".cumtable_vector", env) obsCluster_vector = get(".obsCluster_vector", env) nbThreads = get(".CORES", env) eps.cluster = get(".eps.cluster", env) eps.NR = get(".eps.NR", env) family = get(".familyConv", env) family_nb = switch(family, poisson=1, negbin=2, logit=3, gaussian=4, lpoisson=5) theta = ifelse(family == "negbin", coef[".theta"], 1) Q = length(nbCluster) if(family == "lpoisson"){ # we transform the mu_in into a non exponential form mu_in = log(mu_in) } if(Q == 2 & family == "poisson"){ # Required Variables setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res = cpp_conv_seq_poi_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, dum_vector = dum_vector, sum_y_vector = sum_y_vector, iterMax = iterMax, diffMax = eps.cluster, exp_mu_in = mu_in) } else if(Q == 2 & family == "gaussian"){ # Required variables setup_gaussian_fixedcost(env) info = get(".fixedCostGaussian", env) invTableCluster_vector = get(".invTableCluster", env) res = cpp_conv_seq_gau_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, r_mat_row = info$mat_row, r_mat_col = info$mat_col, r_mat_value_Ab = info$mat_value_Ab, r_mat_value_Ba = info$mat_value_Ba, dum_vector = dum_vector, lhs = lhs, invTableCluster_vector = invTableCluster_vector, iterMax = iterMax, diffMax = eps.cluster, mu_in = mu_in) } else { res = cpp_conv_seq_gnl(family = family_nb, iterMax = iterMax, diffMax = eps.cluster, diffMax_NR = eps.NR, theta = theta, lhs = lhs, nb_cluster_all = nbCluster, mu_init = mu_in, dum_vector = dum_vector, tableCluster_vector = tableCluster_vector, sum_y_vector = sum_y_vector, cumtable_vector = cumtable_vector, obsCluster_vector = obsCluster_vector, nbThreads = nbThreads) } if(family == "lpoisson"){ # we transform the mu_in into an exponential form res$mu_new = exp(res$mu_new) } return(res) } conv_acc = function(coef, mu_in, env, iterMax, only2 = FALSE){ # convergence of cluster coef without acceleration # Now all in cpp # Loading all the required variables lhs = get(".lhs", env) nbCluster = get(".nbCluster", env) dum_vector = get(".dum_vector", env) tableCluster_vector = get(".tableCluster_vector", env) sum_y_vector = get(".sum_y_vector", env) cumtable_vector = get(".cumtable_vector", env) obsCluster_vector = get(".obsCluster_vector", env) nbThreads = get(".CORES", env) eps.cluster = get(".eps.cluster", env) eps.NR = get(".eps.NR", env) family = get(".familyConv", env) family_nb = switch(family, poisson=1, negbin=2, logit=3, gaussian=4, lpoisson=5) theta = ifelse(family == "negbin", coef[".theta"], 1) if(only2){ # means we compute the CC of the first two FE # we recreate the values we send nbCluster = nbCluster[1:2] nb_keep = sum(nbCluster) tableCluster_vector = tableCluster_vector[1:nb_keep] sum_y_vector = sum_y_vector[1:nb_keep] cumtable_vector = cumtable_vector[1:nb_keep] dum_vector = dum_vector[1:(2*length(lhs))] obsCluster_vector = obsCluster_vector[1:(2*length(lhs))] } Q = length(nbCluster) if(family == "lpoisson"){ # we transform the mu_in into a non exponential form mu_in = log(mu_in) } if(Q == 2 & family == "poisson"){ # Required Variables setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res = cpp_conv_acc_poi_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, dum_vector = dum_vector, sum_y_vector = sum_y_vector, iterMax = iterMax, diffMax = eps.cluster, exp_mu_in = mu_in) } else if(Q == 2 & family == "gaussian"){ # Required variables setup_gaussian_fixedcost(env) info = get(".fixedCostGaussian", env) invTableCluster_vector = get(".invTableCluster", env) res = cpp_conv_acc_gau_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, r_mat_row = info$mat_row, r_mat_col = info$mat_col, r_mat_value_Ab = info$mat_value_Ab, r_mat_value_Ba = info$mat_value_Ba, dum_vector = dum_vector, lhs = lhs, invTableCluster_vector = invTableCluster_vector, iterMax = iterMax, diffMax = eps.cluster, mu_in = mu_in) } else { res = cpp_conv_acc_gnl(family = family_nb, iterMax = iterMax, diffMax = eps.cluster, diffMax_NR = eps.NR, theta = theta, lhs = lhs, nb_cluster_all = nbCluster, mu_init = mu_in, dum_vector = dum_vector, tableCluster_vector = tableCluster_vector, sum_y_vector = sum_y_vector, cumtable_vector = cumtable_vector, obsCluster_vector = obsCluster_vector, nbThreads = nbThreads) } if(family == "poisson" && res$any_negative_poisson){ # we need to switch to log poisson assign(".familyConv", "lpoisson", env) verbose = get(".verbose", env) if(verbose >= 3) cat("Switch to log-poisson (to cope with high valued FEs).\n") res = conv_acc(coef, mu_in, env, iterMax, only2) # we switch back to original poisson assign(".familyConv", "poisson", env) } if(family == "lpoisson"){ # we transform the mu_in into an exponential form res$mu_new = exp(res$mu_new) } return(res) } #### #### Convergence Deriv cpp #### #### dconvergence = function(dxi_dbeta, jacob.mat, ll_d2, env, iterMax){ nbCluster = get(".nbCluster", env) Q = length(nbCluster) accDeriv = get(".accDeriv", env) derivDiffConv = get(".derivDifficultConvergence", env) if(accDeriv && derivDiffConv && Q > 2){ # in case of complex cases: it's more efficient # to initialize the first two clusters res = dconv_acc(dxi_dbeta, jacob.mat, ll_d2, env, iterMax, only2 = TRUE) dxi_dbeta = res$dxi_dbeta } if(Q == 1){ # calculer single en cpp dxi_dbeta = dconv_single(jacob.mat, ll_d2, env) iter = 1 } else { # The convergence algorithms if(accDeriv){ res = dconv_acc(dxi_dbeta, jacob.mat, ll_d2, env, iterMax) dxi_dbeta = res$dxi_dbeta iter = res$iter } else { res = dconv_seq(dxi_dbeta, jacob.mat, ll_d2, env, iterMax) dxi_dbeta = res$dxi_dbeta iter = res$iter } } return(list(dxi_dbeta = dxi_dbeta, iter = iter)) } dconv_single = function(jacob.mat, ll_d2, env){ # data: jacob_vector = as.vector(jacob.mat) n_vars = ncol(jacob.mat) nb_cluster_all = get(".nbCluster", env) dum_vector = get(".dum_vector", env) nb_coef = nb_cluster_all[[1]] dxi_dbeta = update_deriv_single(n_vars, nb_coef, ll_d2, jacob_vector, dum_vector) return(dxi_dbeta) } dconv_seq = function(dxi_dbeta, jacob.mat, ll_d2, env, iterMax){ # Parameters jacob_vector = as.vector(jacob.mat) n_vars = ncol(jacob.mat) nb_cluster_all = get(".nbCluster", env) dum_vector = get(".dum_vector", env) deriv_init_vector = as.vector(dxi_dbeta) eps.deriv = get(".eps.deriv", env) Q = length(nb_cluster_all) if(Q == 2){ setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res <- cpp_derivconv_seq_2(iterMax = iterMax, diffMax = eps.deriv, n_vars = n_vars, nb_cluster_all = nb_cluster_all, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, ll_d2 = ll_d2, jacob_vector = jacob_vector, deriv_init_vector = deriv_init_vector, dum_vector = dum_vector) } else { res <- cpp_derivconv_seq_gnl(iterMax = iterMax, diffMax = eps.deriv, n_vars, nb_cluster_all, ll_d2, jacob_vector, deriv_init_vector, dum_vector) } return(list(dxi_dbeta = res$dxi_dbeta, iter = res$iter)) } dconv_acc = function(dxi_dbeta, jacob.mat, ll_d2, env, iterMax, only2 = FALSE){ # Parameters jacob_vector = as.vector(jacob.mat) n_vars = ncol(jacob.mat) nb_cluster_all = get(".nbCluster", env) dum_vector = get(".dum_vector", env) deriv_init_vector = as.vector(dxi_dbeta) eps.deriv = get(".eps.deriv", env) if(only2){ # we update everything needed nb_cluster_all = nb_cluster_all[1:2] dum_vector = dum_vector[1:(2*nrow(jacob.mat))] } Q = length(nb_cluster_all) if(Q == 2){ setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res <- cpp_derivconv_acc_2(iterMax = iterMax, diffMax = eps.deriv, n_vars = n_vars, nb_cluster_all = nb_cluster_all, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, ll_d2 = ll_d2, jacob_vector = jacob_vector, deriv_init_vector = deriv_init_vector, dum_vector = dum_vector) } else { res <- cpp_derivconv_acc_gnl(iterMax = iterMax, diffMax = eps.deriv, n_vars = n_vars, nb_cluster_all = nb_cluster_all, ll_d2 = ll_d2, jacob_vector = jacob_vector, deriv_init_vector = deriv_init_vector, dum_vector = dum_vector) } return(list(dxi_dbeta = res$dxi_dbeta, iter = res$iter)) } #### #### Misc FE #### #### setup_poisson_fixedcost = function(env){ # We set up only one if(".fixedCostPoisson" %in% names(env)){ return(NULL) } ptm = proc.time() dum_all = get(".dum_all",env) dum_A = as.integer(dum_all[[1]]) dum_B = as.integer(dum_all[[2]]) myOrder = order(dum_A, dum_B) index_i = dum_A[myOrder] - 1L index_j = dum_B[myOrder] - 1L n_cells = get_n_cells(index_i, index_j) res = list(n_i = max(dum_A), n_j = max(dum_B), n_cells = n_cells, index_i = index_i, index_j = index_j, order = myOrder - 1L) assign(".fixedCostPoisson", res, env) verbose = get(".verbose", env) if(verbose >= 2) cat("Poisson fixed-cost setup: ", (proc.time()-ptm)[3], "s\n", sep = "") } setup_gaussian_fixedcost = function(env){ # We set up only one if(".fixedCostGaussian" %in% names(env)){ return(NULL) } ptm = proc.time() lhs = get(".lhs", env) invTableCluster_vector = get(".invTableCluster", env) dum_vector = get(".dum_vector", env) # already minus 1 dum_all = get(".dum_all", env) dum_i = as.integer(dum_all[[1]]) dum_j = as.integer(dum_all[[2]]) n_i = max(dum_i) n_j = max(dum_j) myOrder = order(dum_i, dum_j) index_i = dum_i[myOrder] - 1L index_j = dum_j[myOrder] - 1L n_cells = get_n_cells(index_i, index_j) res = cpp_fixed_cost_gaussian(n_i, n_cells, index_i, index_j, myOrder - 1L, invTableCluster_vector, dum_vector) res$n_i = n_i res$n_j = n_j res$n_cells = n_cells assign(".fixedCostGaussian", res, env) verbose = get(".verbose", env) if(verbose >= 2) cat("Gaussian fixed-cost setup: ", (proc.time()-ptm)[3], "s\n", sep = "") } #### #### Parallel Functions #### #### # In this section, we create all the functions that will be parallelized rpar_exp = function(x, env){ # fast exponentiation isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # simple exponentiation return(exp(x)) } else { # parallelized one return(cpppar_exp(x, FENmlm_CORES)) } } rpar_log = function(x, env){ # fast log isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # simple log return(log(x)) } else { # parallelized one return(cpppar_log(x, FENmlm_CORES)) } } rpar_lgamma = function(x, env){ # fast lgamma isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # lgamma via cpp is faster return(cpp_lgamma(x)) } else { # parallelized one return(cpppar_lgamma(x, FENmlm_CORES)) } } rpar_digamma = function(x, env){ isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # digamma via cpp is as fast => no need return(digamma(x)) } else { # parallelized one return(cpppar_digamma(x, FENmlm_CORES)) } } rpar_trigamma = function(x, env){ isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # trigamma via cpp is as fast => no need return(trigamma(x)) } else { # parallelized one return(cpppar_trigamma(x, FENmlm_CORES)) } } rpar_log_a_exp = function(a, mu, exp_mu, env){ # compute log_a_exp in a fast way isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # cpp is faster return(cpp_log_a_exp(a, mu, exp_mu)) } else { # parallelized one return(cpppar_log_a_exp(FENmlm_CORES, a, mu, exp_mu)) } }
/FENmlm/R/femlm.R
no_license
akhikolla/InformationHouse
R
false
false
99,825
r
# Commands to genereate the help files: # load("data/trade.RData") # roxygen2::roxygenise(roclets = "rd") #' Fixed effects maximum likelihood models #' #' This function estimates maximum likelihood models (e.g., Poisson or Logit) and is efficient to handle any number of fixed effects (i.e. cluster variables). It further allows for nonlinear in parameters right hand sides. #' #' @param fml A formula. This formula gives the linear formula to be estimated (it is similar to a \code{lm} formula), for example: \code{fml = z~x+y}. To include cluster variables, you can 1) either insert them in this formula using a pipe (e.g. \code{fml = z~x+y|cluster1+cluster2}), or 2) either use the argment \code{cluster}. To include a non-linear in parameters element, you must use the argment \code{NL.fml}. #' @param NL.fml A formula. If provided, this formula represents the non-linear part of the right hand side (RHS). Note that contrary to the \code{fml} argument, the coefficients must explicitely appear in this formula. For instance, it can be \code{~a*log(b*x + c*x^3)}, where \code{a}, \code{b}, and \code{c} are the coefficients to be estimated. Note that only the RHS of the formula is to be provided, and NOT the left hand side. #' @param data A data.frame containing the necessary variables to run the model. The variables of the non-linear right hand side of the formula are identified with this \code{data.frame} names. Note that no \code{NA} is allowed in the variables to be used in the estimation. Can also be a matrix. #' @param family Character scalar. It should provide the family. The possible values are "poisson" (Poisson model with log-link, the default), "negbin" (Negative Binomial model with log-link), "logit" (LOGIT model with log-link), "gaussian" (Gaussian model). #' @param cluster Character vector. The name/s of a/some variable/s within the dataset to be used as clusters. These variables should contain the identifier of each observation (e.g., think of it as a panel identifier). #' @param na.rm Logical, default is \code{FALSE}. If the variables necessary for the estimation contain NAs and \code{na.rm = TRUE}, then all observations containing NA are removed prior to estimation and a warning message is raised detailing the number of observations removed. #' @param useAcc Default is \code{TRUE}. Whether an acceleration algorithm (Irons and Tuck iterations) should be used to otbain the cluster coefficients when there are two or more clusters. #' @param NL.start (For NL models only) A list of starting values for the non-linear parameters. ALL the parameters are to be named and given a staring value. Example: \code{NL.start=list(a=1,b=5,c=0)}. Though, there is an exception: if all parameters are to be given the same starting value, you can use the argument \code{NL.start.init}. #' @param lower (For NL models only) A list. The lower bound for each of the non-linear parameters that requires one. Example: \code{lower=list(b=0,c=0)}. Beware, if the estimated parameter is at his lower bound, then asymptotic theory cannot be applied and the standard-error of the parameter cannot be estimated because the gradient will not be null. In other words, when at its upper/lower bound, the parameter is considered as 'fixed'. #' @param upper (For NL models only) A list. The upper bound for each of the non-linear parameters that requires one. Example: \code{upper=list(a=10,c=50)}. Beware, if the estimated parameter is at his upper bound, then asymptotic theory cannot be applied and the standard-error of the parameter cannot be estimated because the gradient will not be null. In other words, when at its upper/lower bound, the parameter is considered as 'fixed'. #' @param env (For NL models only) An environment. You can provide an environement in which the non-linear part will be evaluated. (May be useful for some particular non-linear functions.) #' @param NL.start.init (For NL models only) Numeric scalar. If the argument \code{NL.start} is not provided, or only partially filled (i.e. there remain non-linear parameters with no starting value), then the starting value of all remaining non-linear parameters is set to \code{NL.start.init}. #' @param offset A formula. An offset can be added to the estimation. It should be a formula of the form (for example) ~0.5*x**2. This offset is linearily added to the elements of the main formula 'fml'. Note that when using the argument 'NL.fml', you can directly add the offset there. #' @param nl.gradient (For NL models only) A formula. The user can prodide a function that computes the gradient of the non-linear part. The formula should be of the form \code{~f0(a1,x1,a2,a2)}. The important point is that it should be able to be evaluated by: \code{eval(nl.gradient[[2]], env)} where \code{env} is the working environment of the algorithm (which contains all variables and parameters). The function should return a list or a data.frame whose names are the non-linear parameters. #' @param linear.start Numeric named vector. The starting values of the linear part. #' @param jacobian.method Character scalar. Provides the method used to numerically compute the jacobian of the non-linear part. Can be either \code{"simple"} or \code{"Richardson"}. Default is \code{"simple"}. See the help of \code{\link[numDeriv]{jacobian}} for more information. #' @param useHessian Logical. Should the Hessian be computed in the optimization stage? Default is \code{TRUE}. #' @param opt.control List of elements to be passed to the optimization method \code{\link[stats]{nlminb}}. See the help page of \code{\link[stats]{nlminb}} for more information. #' @param cores Integer, default is 1. Number of threads to be used (accelerates the algorithm via the use of openMP routines). This is particularly efficient for the negative binomial and logit models, less so for the Gaussian and Poisson likelihoods (unless for very large datasets). #' @param verbose Integer, default is 0. It represents the level of information that should be reported during the optimisation process. If \code{verbose=0}: nothing is reported. If \code{verbose=1}: the value of the coefficients and the likelihood are reported. If \code{verbose=2}: \code{1} + information on the computing tiime of the null model, the cluster coefficients and the hessian are reported. #' @param theta.init Positive numeric scalar. The starting value of the dispersion parameter if \code{family="negbin"}. By default, the algorithm uses as a starting value the theta obtained from the model with only the intercept. #' @param precision.cluster Precision used to obtain the fixed-effects (ie cluster coefficients). Defaults to \code{1e-5}. It corresponds to the maximum absolute difference allowed between two iterations. Argument \code{precision.cluster} cannot be lower than \code{10000*.Machine$double.eps}. #' @param itermax.cluster Maximum number of iterations in the step obtaining the fixed-effects (only in use for 2+ clusters). Default is 10000. #' @param itermax.deriv Maximum number of iterations in the step obtaining the derivative of the fixed-effects (only in use for 2+ clusters). Default is 5000. #' @param showWarning Logical, default is \code{TRUE}. Whether warnings should be displayed (concerns warnings relating to: convergence state, collinearity issues and observation removal due to only 0/1 outcomes or presence of NA values). #' @param ... Not currently used. #' #' @details #' This function estimates maximum likelihood models where the conditional expectations are as follows: #' #' Gaussian likelihood: #' \deqn{E(Y|X)=X\beta}{E(Y|X) = X*beta} #' Poisson and Negative Binomial likelihoods: #' \deqn{E(Y|X)=\exp(X\beta)}{E(Y|X) = exp(X*beta)} #' where in the Negative Binomial there is the parameter \eqn{\theta}{theta} used to model the variance as \eqn{\mu+\mu^2/\theta}{mu+mu^2/theta}, with \eqn{\mu}{mu} the conditional expectation. #' Logit likelihood: #' \deqn{E(Y|X)=\frac{\exp(X\beta)}{1+\exp(X\beta)}}{E(Y|X) = exp(X*beta) / (1 + exp(X*beta))} #' #' When there are one or more clusters, the conditional expectation can be written as: #' \deqn{E(Y|X) = h(X\beta+\sum_{k}\sum_{m}\gamma_{m}^{k}\times C_{im}^{k}),} #' where \eqn{h(.)} is the function corresponding to the likelihood function as shown before. \eqn{C^k} is the matrix associated to cluster \eqn{k} such that \eqn{C^k_{im}} is equal to 1 if observation \eqn{i} is of category \eqn{m} in cluster \eqn{k} and 0 otherwise. #' #' When there are non linear in parameters functions, we can schematically split the set of regressors in two: #' \deqn{f(X,\beta)=X^1\beta^1 + g(X^2,\beta^2)} #' with first a linear term and then a non linear part expressed by the function g. That is, we add a non-linear term to the linear terms (which are \eqn{X*beta} and the cluster coefficients). It is always better (more efficient) to put into the argument \code{NL.fml} only the non-linear in parameter terms, and add all linear terms in the \code{fml} argument. #' #' To estimate only a non-linear formula without even the intercept, you must exclude the intercept from the linear formula by using, e.g., \code{fml = z~0}. #' #' The over-dispersion parameter of the Negative Binomial family, theta, is capped at 10,000. If theta reaches this high value, it means that there is no overdispersion. #' #' @return #' An \code{femlm} object. #' \item{coefficients}{The named vector of coefficients.} #' \item{coeftable}{The table of the coefficients with their standard errors, z-values and p-values.} #' \item{loglik}{The loglikelihood.} #' \item{iterations}{Number of iterations of the algorithm.} #' \item{n}{The number of observations.} #' \item{nparams}{The number of parameters of the model.} #' \item{call}{The call.} #' \item{fml}{The linear formula of the call.} #' \item{ll_null}{Log-likelihood of the null model (i.e. with the intercept only).} #' \item{pseudo_r2}{The adjusted pseudo R2.} #' \item{message}{The convergence message from the optimization procedures.} #' \item{sq.cor}{Squared correlation between the dependent variable and the expected predictor (i.e. fitted.values) obtained by the estimation.} #' \item{hessian}{The Hessian of the parameters.} #' \item{fitted.values}{The fitted values are the expected value of the dependent variable for the fitted model: that is \eqn{E(Y|X)}.} #' \item{cov.unscaled}{The variance-covariance matrix of the parameters.} #' \item{se}{The standard-error of the parameters.} #' \item{scores}{The matrix of the scores (first derivative for each observation).} #' \item{family}{The ML family that was used for the estimation.} #' \item{residuals}{The difference between the dependent variable and the expected predictor.} #' \item{sumFE}{The sum of the fixed-effects for each observation.} #' \item{offset}{The offset formula.} #' \item{NL.fml}{The nonlinear formula of the call.} #' \item{bounds}{Whether the coefficients were upper or lower bounded. -- This can only be the case when a non-linear formula is included and the arguments 'lower' or 'upper' are provided.} #' \item{isBounded}{The logical vector that gives for each coefficient whether it was bounded or not. This can only be the case when a non-linear formula is included and the arguments 'lower' or 'upper' are provided.} #' \item{clusterNames}{The names of each cluster.} #' \item{id_dummies}{The list (of length the number of clusters) of the cluster identifiers for each observation.} #' \item{clusterSize}{The size of each cluster.} #' \item{obsRemoved}{In the case there were clusters and some observations were removed because of only 0/1 outcome within a cluster, it gives the row numbers of the observations that were removed.} #' \item{clusterRemoved}{In the case there were clusters and some observations were removed because of only 0/1 outcome within a cluster, it gives the list (for each cluster) of the clustr identifiers that were removed.} #' \item{theta}{In the case of a negative binomial estimation: the overdispersion parameter.} #' #' @seealso #' See also \code{\link[FENmlm]{summary.femlm}} to see the results with the appropriate standard-errors, \code{\link[FENmlm]{getFE}} to extract the cluster coefficients, and the functions \code{\link[FENmlm]{res2table}} and \code{\link[FENmlm]{res2tex}} to visualize the results of multiple estimations. #' #' @author #' Laurent Berge #' #' @references #' #' Berge, Laurent, 2018, "Efficient estimation of maximum likelihood models with multiple fixed-effects: the R package FENmlm." CREA Discussion Papers, 13 (\url{https://wwwen.uni.lu/content/download/110162/1299525/file/2018_13}). #' #' For models with multiple fixed-effects: #' #' Gaure, Simen, 2013, "OLS with multiple high dimensional category variables", Computational Statistics & Data Analysis 66 pp. 8--18 #' #' On the unconditionnal Negative Binomial model: #' #' Allison, Paul D and Waterman, Richard P, 2002, "Fixed-Effects Negative Binomial Regression Models", Sociological Methodology 32(1) pp. 247--265 #' #' @examples #' #' # #' # Linear examples #' # #' #' # Load trade data #' data(trade) #' #' # We estimate the effect of distance on trade => we account for 3 cluster effects #' # 1) Poisson estimation #' est_pois = femlm(Euros ~ log(dist_km)|Origin+Destination+Product, trade) #' # alternative formulation giving the same results: #' # est_pois = femlm(Euros ~ log(dist_km), trade, cluster = c("Origin", "Destination", "Product")) #' #' # 2) Log-Log Gaussian estimation (with same clusters) #' est_gaus = update(est_pois, log(Euros+1) ~ ., family="gaussian") #' #' # 3) Negative Binomial estimation #' est_nb = update(est_pois, family="negbin") #' #' # Comparison of the results using the function res2table #' res2table(est_pois, est_gaus, est_nb) #' # Now using two way clustered standard-errors #' res2table(est_pois, est_gaus, est_nb, se = "twoway") #' #' # Comparing different types of standard errors #' sum_white = summary(est_pois, se = "white") #' sum_oneway = summary(est_pois, se = "cluster") #' sum_twoway = summary(est_pois, se = "twoway") #' sum_threeway = summary(est_pois, se = "threeway") #' #' res2table(sum_white, sum_oneway, sum_twoway, sum_threeway) #' #' #' # #' # Example of Equivalences #' # #' \dontrun{ #' # equivalence with glm poisson #' est_glm <- glm(Euros ~ log(dist_km) + factor(Origin) + #' factor(Destination) + factor(Product), trade, family = poisson) #' #' # coefficient estimates + Standard-error #' summary(est_glm)$coefficients["log(dist_km)", ] #' est_pois$coeftable #' #' # equivalence with lm #' est_lm <- lm(log(Euros+1) ~ log(dist_km) + factor(Origin) + #' factor(Destination) + factor(Product), trade) #' #' # coefficient estimates + Standard-error #' summary(est_lm)$coefficients["log(dist_km)", ] #' summary(est_gaus, dof_correction = TRUE)$coeftable #' } #' #' #' # #' # Non-linear examples #' # #' #' # Generating data for a simple example #' n = 100 #' x = rnorm(n, 1, 5)**2 #' y = rnorm(n, -1, 5)**2 #' z1 = rpois(n, x*y) + rpois(n, 2) #' base = data.frame(x, y, z1) #' #' # Estimating a 'linear' relation: #' est1_L = femlm(z1 ~ log(x) + log(y), base) #' # Estimating the same 'linear' relation using a 'non-linear' call #' est1_NL = femlm(z1 ~ 1, base, NL.fml = ~a*log(x)+b*log(y), NL.start = list(a=0, b=0)) #' # we compare the estimates with the function res2table (they are identical) #' res2table(est1_L, est1_NL) #' #' # Now generating a non-linear relation (E(z2) = x + y + 1): #' z2 = rpois(n, x + y) + rpois(n, 1) #' base$z2 = z2 #' #' # Estimation using this non-linear form #' est2_NL = femlm(z2~0, base, NL.fml = ~log(a*x + b*y), #' NL.start = list(a=1, b=2), lower = list(a=0, b=0)) #' # we can't estimate this relation linearily #' # => closest we can do: #' est2_L = femlm(z2~log(x)+log(y), base) #' #' # Difference between the two models: #' res2table(est2_L, est2_NL) #' #' # Plotting the fits: #' plot(x, z2, pch = 18) #' points(x, fitted(est2_L), col = 2, pch = 1) #' points(x, fitted(est2_NL), col = 4, pch = 2) #' #' #' # Using a custom Jacobian for the function log(a*x + b*y) #' myGrad = function(a,x,b,y){ #' s = a*x+b*y #' data.frame(a = x/s, b = y/s) #' } #' #' est2_NL_grad = femlm(z2~0, base, NL.fml = ~log(a*x + b*y), #' NL.start = list(a=1,b=2), nl.gradient = ~myGrad(a,x,b,y)) #' #' femlm <- function(fml, data, family=c("poisson", "negbin", "logit", "gaussian"), NL.fml, cluster, na.rm = FALSE, useAcc=TRUE, NL.start, lower, upper, env, NL.start.init, offset, nl.gradient, linear.start=0, jacobian.method=c("simple", "Richardson"), useHessian=TRUE, opt.control=list(), cores = 1, verbose=0, theta.init, precision.cluster, itermax.cluster = 10000, itermax.deriv = 5000, showWarning = TRUE, ...){ # use of the conjugate gradient in the gaussian case to get # the cluster coefficients accDeriv = TRUE jacobian.method <- match.arg(jacobian.method) family = match.arg(family) # Some settings (too complicated to be tweaked by the user) # Nber of evaluations of the NL part to be kept in memory # Default keeps the two last evaluations NLsave = 2 # DOTS dots = list(...) # Future parameter in development: na.rm # na.rm = ifelse(is.null(dots$na.rm), FALSE, dots$na.rm) isNA_sample = FALSE ptm = proc.time() # DEPRECATED INFORMATION # I initially called the cluster dummies... I keep it for compatibility if(missing(cluster) && "dummy" %in% names(dots)) cluster = dots$dummy if("linear.fml" %in% names(dots)) stop("Argument 'linear.fml' is deprecated, now use 'fml' in combination with 'NL.fml'.") if(missing(NL.start) && "start" %in% names(dots)) { warning("Argument 'start' is deprecated.\nUse 'NL.start' instead.", immediate. = TRUE) NL.start = dots$start } if(missing(NL.start.init) && "start.init" %in% names(dots)) { warning("Argument 'start.init' is deprecated.\nUse 'NL.start.init' instead.", immediate. = TRUE) NL.start.init = dots$start.init } # # The clusters => controls + setup if(class(fml) != "formula") stop("The argument 'fml' must be a formula.") if(length(fml) != 3) stop("The formula must be two sided.\nEG: a~exp(b/x), or a~0 if there is no linear part.") FML = Formula::Formula(fml) n_rhs = length(FML)[2] if(n_rhs > 2){ stop("The argument 'fml' cannot contain more than two parts separated by a pipe ('|').") } if(n_rhs == 2){ if(missing(cluster) || length(cluster) == 0){ cluster = formula(FML, lhs = 0, rhs = 2) fml = formula(FML, lhs = 1, rhs = 1) } else { stop("To add cluster variables: either include them in argument 'fml' using a pipe ('|'), either use the argument 'cluster'. You cannot use both!") } } # Other paramaters if(!is.null(dots$debug) && dots$debug) verbose = 100 d.hessian = dots$d.hessian # # cores argument FENmlm_CORES = 1 if(!length(cores) == 1 || !is.numeric(cores) || !(cores%%1) == 0 || cores < 0){ stop("The argument 'cores' must be an integer greater than 0 and lower than the number of threads of the computer.") } else if(cores == 1){ isMulticore = FALSE } else if(is.na(parallel::detectCores())){ # This can happen... isMulticore = FALSE warning("The number of cores has been set to 1 because the function detectCores() could not evaluate the maximum number of nodes.") } else if(cores > parallel::detectCores()){ stop("The argument 'cores' must be lower or equal to the number of possible threads (equal to ", parallel::detectCores(), ") in this computer.") } else { FENmlm_CORES = cores isMulticore = TRUE } famFuns = switch(family, poisson = ml_poisson(), negbin = ml_negbin(), logit = ml_logit(), gaussian = ml_gaussian()) call = match.call(expand.dots = FALSE) # cleaning the call from update method # we drop 'hidden' arguments for a clean call call$"..." = NULL if(is.matrix(data)){ if(is.null(colnames(data))){ stop("If argument data is to be a matrix, its columns must be named.") } data = as.data.frame(data) } # The conversion of the data (due to data.table) if(!"data.frame" %in% class(data)){ stop("The argument 'data' must be a data.frame or a matrix.") } if("data.table" %in% class(data)){ # this is a local change only class(data) = "data.frame" } dataNames = names(data) # The LHS must contain only values in the DF namesLHS = all.vars(fml[[2]]) if(!all(namesLHS %in% dataNames)) stop("Some elements on the LHS of the formula are not in the dataset:\n", paste0(namesLHS[!namesLHS %in% dataNames], collapse = ", ")) # Now the nonlinear part: isNA_NL = FALSE # initialisation of NAs flag (FALSE is neutral) if(!missing(NL.fml) && !is.null(NL.fml)){ if(!class(NL.fml) == "formula") stop("Argument 'NL.fml' must be a formula.") isNonLinear = TRUE nl.call = NL.fml[[length(NL.fml)]] allnames = all.vars(nl.call) nonlinear.params = allnames[!allnames %in% dataNames] nonlinear.varnames = allnames[allnames %in% dataNames] if(length(nonlinear.params) == 0){ warning("As there is no parameter to estimate in argument 'NL.fml', this argument is ignored.\nIf you want to add an offset, use argument 'offset'.") } # Control for NAs if(anyNA(data[, nonlinear.varnames])){ if(!na.rm){ # Default varWithNA = nonlinear.varnames[which(apply(data[, nonlinear.varnames, FALSE], 2, anyNA))] text = show_vars_limited_width(varWithNA) stop("Some variables in 'NL.fml' contain NA. NAs are not supported, please remove them first (or use na.rm). FYI, the variables are:\n", text, call. = FALSE) } else { # If Na.rm => we keep track of the NAs isNA_NL = is.na(rowSums(data[, nonlinear.varnames])) isNA_sample = isNA_sample || TRUE } } } else { isNonLinear = FALSE nl.call = 0 allnames = nonlinear.params = nonlinear.varnames = character(0) } # The dependent variable: lhs==left_hand_side lhs = as.numeric(as.vector(eval(fml[[2]], data))) # creation de l'environnement if(missing(env)) env <- new.env() else stopifnot(class(env)=="environment") # # First check # isNA_y = FALSE # initialisation of NAs flag (FALSE is neutral) if(anyNA(lhs)){ if(!na.rm){ # Default behavior stop("The left hand side of the fomula has NA values. Please provide data without NA (or use na.rm).") } else { # If Na.rm => we keep track of the NAs isNA_y = is.na(lhs) isNA_sample = isNA_sample || TRUE } # We repeat twice the controls, but one for a cleaned y # It's a bit "ugly" but I don't recreate unecessary vectors this way # We check that the dep var is not a constant lhs_clean = lhs[!isNA_y] # we check the var is not a constant if(var(lhs_clean) == 0){ stop("The dependent variable is a constant. Estimation cannot be done.") } if(family %in% c("poisson", "negbin") & any(lhs_clean<0)) stop("Negative values of the dependant variable \nare not allowed for the \"", family, "\" family.", sep="") if(family %in% c("logit") & !all(lhs_clean==0 | lhs_clean==1)) stop("The dependant variable has values different from 0 or 1.\nThis is not allowed with the \"logit\" family.") } else if(any(!is.finite(lhs))){ stop("The dependent variable contains non-finite values.") } else { # regular controls when there is no NA # We check that the dep var is not a constant if(var(lhs) == 0){ stop("The dependent variable is a constant. Estimation cannot be done.") } if(family %in% c("poisson", "negbin") & any(lhs<0)) stop("Negative values of the dependant variable \nare not allowed for the \"", family, "\" family.", sep="") if(family %in% c("logit") & !all(lhs==0 | lhs==1)) stop("The dependant variable has values different from 0 or 1.\nThis is not allowed with the \"logit\" family.") } # # Controls and setting of the linear part: # isLinear = FALSE linear.varnames = all.vars(fml[[3]]) if(length(linear.varnames) > 0 || attr(terms(fml), "intercept") == 1){ isLinear = TRUE linear.fml = fml } isNA_L = FALSE # initialisation of NAs flag (FALSE is neutral) if(isLinear){ if(!all(linear.varnames %in% dataNames)) stop(paste("In 'fml', some variables are not in the data:\n", paste(linear.varnames[!linear.varnames%in%dataNames], collapse=', '), ".", sep="")) if(!missing(cluster) && length(cluster) != 0){ # if dummies are provided, we make sure there is an # intercept so that factors can be handled properly linear.fml = update(linear.fml, ~.+1) } # # We construct the linear matrix # # we look at whether there are factor-like variables to be evaluated # if there is factors => model.matrix types = sapply(data[, dataNames %in% linear.varnames, FALSE], class) if(grepl("factor", deparse(linear.fml)) || any(types %in% c("character", "factor"))){ useModel.matrix = TRUE } else { useModel.matrix = FALSE } if(useModel.matrix){ # linear.mat = stats::model.matrix(linear.fml, data) # to catch the NAs linear.mat = stats::model.matrix(linear.fml, stats::model.frame(linear.fml, data, na.action=na.pass)) } else { # just to check => will give error if not proper formula linear.mat = stats::model.matrix(linear.fml, data[1:10, ]) linear.mat = prepare_matrix(linear.fml, data) } linear.params <- colnames(linear.mat) # N_linear <- length(linear.params) if(anyNA(linear.mat)){ if(!na.rm){ # Default behavior: no NA tolerance quiNA = apply(linear.mat, 2, anyNA) whoIsNA = linear.params[quiNA] text = show_vars_limited_width(whoIsNA) stop("Evaluation of the linear part returns NA. NAs are not supported, please remove them before running this function (or use na.rm). FYI the variables with NAs are:\n", text) } else { # If Na.rm => we keep track of the NAs isNA_L = is.na(rowSums(linear.mat)) isNA_sample = isNA_sample || TRUE } } if(!is.numeric(linear.start)) stop("'linear.start' must be numeric!") } else { linear.params <- linear.start <- linear.varnames <- NULL useModel.matrix = FALSE } params <- c(nonlinear.params, linear.params) lparams <- length(params) varnames <- c(nonlinear.varnames, linear.varnames) # Attention les parametres non lineaires peuvent etre vides if(length(nonlinear.params)==0) isNL = FALSE else isNL = TRUE # # Handling Clusters #### # isDummy = FALSE if(!is.null(dots$clusterFromUpdate) && dots$clusterFromUpdate){ # Cluster information coming from the update method # means that there is no modification of past clusters object = dots$object # we retrieve past information dum_all = object$id_dummies obs2remove = object$obsRemoved dummyOmises = object$clusterRemoved cluster = object$clusterNames nbCluster = object$clusterSize Q = length(nbCluster) # # If obsRemoved => need to modify the data base # # This is done later only once # if(length(obs2remove) > 0){ # data = data[-obs2remove, ] # # # We recreate the linear matrix # if(isLinear) { # if(useModel.matrix){ # # means there are factors # linear.mat = stats::model.matrix(linear.fml, data) # } else { # linear.mat = linear.mat[-obs2remove, ] # } # } # # lhs = eval(fml[[2]], data) # } # We still need to recreate some objects though isDummy = TRUE names(dum_all) = NULL # dumMat_cpp = matrix(unlist(dum_all), ncol = Q) - 1 dum_names = sum_y_all = obs_per_cluster_all = list() for(i in 1:Q){ k = nbCluster[i] dum = dum_all[[i]] if(length(obs2remove) > 0){ sum_y_all[[i]] = cpp_tapply_vsum(k, lhs[-obs2remove], dum) } else { sum_y_all[[i]] = cpp_tapply_vsum(k, lhs, dum) } obs_per_cluster_all[[i]] = cpp_table(k, dum) dum_names[[i]] = attr(dum_all[[i]], "clust_names") } # # Re-ordering the CC # if(any(nbCluster != sort(nbCluster, decreasing = TRUE))){ new_order = order(nbCluster, decreasing = TRUE) reorder = order(new_order) nbCluster = nbCluster[new_order] cluster = cluster[new_order] dum_all = dum_all[new_order] dum_names = dum_names[new_order] sum_y_all = sum_y_all[new_order] obs_per_cluster_all = obs_per_cluster_all[new_order] } else { reorder = 1:Q } } else if(!missing(cluster) && length(cluster)!=0){ # The main cluster construction isDummy = TRUE isClusterFml = FALSE if(is.character(cluster) && any(!cluster %in% names(data))){ var_problem = cluster[!cluster%in%names(data)] stop("The argument 'cluster' must be variable names! Cluster(s) not in the data: ", paste0(var_problem, collapse = ", "), ".") } else if(!is.character(cluster)){ # means the cluster is a formula cluster_fml = cluster # we check that the cluster variables are indeed in the data cluster_vars = all.vars(cluster) if(!all(cluster_vars %in% names(data))){ var_problem = cluster_vars[!cluster_vars %in% names(data)] stop("The following 'cluster' variable", ifelse(length(var_problem) == 1, " is", "s are"), " not in the data: ", paste0(var_problem, collapse = ", "), ".") } cluster_mat = model.frame(cluster_fml, data, na.action = NULL) # we change cluster to become a vector of characters cluster = names(cluster_mat) isClusterFml = TRUE } else { # the clusters are valid cluster names cluster_mat = data[, cluster, drop = FALSE] } # We change factors to character isFactor = sapply(cluster_mat, is.factor) if(any(isFactor)){ for(i in which(isFactor)){ cluster_mat[[i]] = as.character(cluster_mat[[i]]) } } isNA_cluster = FALSE if(anyNA(cluster_mat)){ if(!na.rm){ # Default behavior, NA not allowed var_problem = cluster[sapply(cluster_mat, anyNA)] stop("The cluster variables contain NAs, this is not allowed (or use na.rm).\nFYI, the clusters with NA are: ", paste0(var_problem, collapse = ", "), ".") } else { # If Na.rm => we keep track of the NAs isNA_cluster = apply(cluster_mat, MARGIN = 1, anyNA) isNA_sample = isNA_sample || TRUE } } if(isNA_sample){ # we remove NAs from the clusters only # after, we'll remove them from the data too isNA_full = isNA_y | isNA_L | isNA_NL | isNA_cluster nbNA = sum(isNA_full) nobs = nrow(data) if(nbNA == nobs){ stop("All observations contain NAs. Estimation cannot be done.") } message_NA = paste0(numberFormatNormal(nbNA), " observations removed because of NA values. (Breakup: LHS: ", numberFormatNormal(sum(isNA_y)), ", RHS: ", numberFormatNormal(sum(isNA_L + isNA_NL)), ", Cluster: ", numberFormatNormal(sum(isNA_cluster)), ")") # we drop the NAs from the cluster matrix cluster_mat = cluster_mat[!isNA_full, , drop = FALSE] obs2remove_NA = which(isNA_full) index_noNA = (1:nobs)[!isNA_full] # we change the LHS variable lhs = as.numeric(eval(fml[[2]], data[-obs2remove_NA, ])) } Q = length(cluster) dum_all = dum_names = list() sum_y_all = obs_per_cluster_all = list() obs2remove = c() dummyOmises = list() for(i in 1:Q){ dum_raw = cluster_mat[[cluster[i]]] # in order to avoid "unclassed" values > real nber of classes: we re-factor the cluster dum_names[[i]] = thisNames = getItems(dum_raw) dum = quickUnclassFactor(dum_raw) dum_all[[i]] = dum k = length(thisNames) # We delete "all zero" outcome sum_y_all[[i]] = sum_y_clust = cpp_tapply_vsum(k, lhs, dum) obs_per_cluster_all[[i]] = n_perClust = cpp_table(k, dum) if(family %in% c("poisson", "negbin")){ qui = which(sum_y_clust==0) } else if(family == "logit"){ qui = which(sum_y_clust==0 | sum_y_clust==n_perClust) } else if(family == "gaussian"){ qui = NULL } if(length(qui>0)){ # We first delete the data: dummyOmises[[i]] = thisNames[qui] obs2remove = unique(c(obs2remove, which(dum %in% qui))) } else { dummyOmises[[i]] = character(0) } } # We remove the problems if(length(obs2remove)>0){ # update of the cluster matrix cluster_mat = cluster_mat[-obs2remove, , drop = FALSE] # update of the lhs lhs = lhs[-obs2remove] # Then we recreate the dummies for(i in 1:Q){ dum_raw = cluster_mat[[cluster[i]]] dum_names[[i]] = getItems(dum_raw) dum = quickUnclassFactor(dum_raw) dum_all[[i]] = dum k = length(dum_names[[i]]) # We also recreate these values sum_y_all[[i]] = cpp_tapply_vsum(k, lhs, dum) obs_per_cluster_all[[i]] = cpp_table(k, dum) } # Then the warning message nb_missing = sapply(dummyOmises, length) message_cluster = paste0(paste0(nb_missing, collapse = "/"), " cluster", ifelse(sum(nb_missing) == 1, "", "s"), " (", length(obs2remove), " observations) removed because of only ", ifelse(family=="logit", "zero/one", "zero"), " outcomes.") if(isNA_sample){ if(showWarning) warning(message_NA, "\n ", message_cluster) } else { if(showWarning) warning(message_cluster) } names(dummyOmises) = cluster } else if(isNA_sample){ if(showWarning) warning(message_NA) } if(isNA_sample){ # we update the value of obs2remove (will contain both NA and removed bc of outcomes) if(length(obs2remove) > 0){ obs2remove_cluster = index_noNA[obs2remove] } else { obs2remove_cluster = c() } obs2remove = sort(c(obs2remove_NA, obs2remove_cluster)) } # # We re-order the clusters # nbCluster = sapply(dum_all, max) if(any(nbCluster != sort(nbCluster, decreasing = TRUE))){ new_order = order(nbCluster, decreasing = TRUE) reorder = order(new_order) nbCluster = nbCluster[new_order] cluster = cluster[new_order] dum_all = dum_all[new_order] dum_names = dum_names[new_order] sum_y_all = sum_y_all[new_order] obs_per_cluster_all = obs_per_cluster_all[new_order] } else { reorder = 1:Q } } else { # There is no cluster Q = 0 # NA management is needed to create obs2remove if(isNA_sample){ # after, we'll remove them from the data too isNA_full = isNA_y | isNA_L | isNA_NL nbNA = sum(isNA_full) nobs = nrow(data) if(nbNA == nobs){ stop("All observations contain NAs. Estimation cannot be done.") } if(showWarning) warning(numberFormatNormal(nbNA), " observations removed because of NA values. (Breakup: LHS: ", numberFormatNormal(sum(isNA_y)), ", RHS: ", numberFormatNormal(sum(isNA_L + isNA_NL)), ")") # we drop the NAs from the cluster matrix obs2remove = which(isNA_full) } else { obs2remove = c() } } # NA & problem management if(length(obs2remove) > 0){ # we kick out the problems (both NA related and cluster related) data = data[-obs2remove, ] # We recreate the linear matrix and the LHS if(isLinear) { if(useModel.matrix){ # means there are factors linear.mat = stats::model.matrix(linear.fml, data) } else { linear.mat = linear.mat[-obs2remove, ] } } lhs = as.numeric(eval(fml[[2]], data)) } # If presence of clusters => we exclude the intercept if(Q > 0){ # If there is a linear intercept, we withdraw it # We drop the intercept: if(isLinear && "(Intercept)" %in% colnames(linear.mat)){ var2remove = which(colnames(linear.mat) == "(Intercept)") if(ncol(linear.mat) == length(var2remove)){ isLinear = FALSE linear.params = NULL params <- nonlinear.params lparams <- length(params) varnames <- nonlinear.varnames } else{ linear.mat = linear.mat[, -var2remove, drop=FALSE] linear.params <- colnames(linear.mat) # N_linear <- length(linear.params) params <- c(nonlinear.params, linear.params) lparams <- length(params) varnames <- c(nonlinear.varnames, linear.varnames) } } } # # Checks for MONKEY TEST # if(lparams==0 & Q==0) stop("No parameter to be estimated.") if(!is.logical(useHessian)) stop("'useHessian' must be of type 'logical'!") # # Controls: The non linear part # if(isNL){ if(missing(NL.start.init)){ if(missing(NL.start)) stop("There must be starting values for NL parameters. Please use argument NL.start (or NL.start.init).") if(typeof(NL.start)!="list") stop("NL.start must be a list.") if(any(!nonlinear.params %in% names(NL.start))) stop(paste("Some NL parameters have no starting values:\n", paste(nonlinear.params[!nonlinear.params %in% names(NL.start)], collapse=", "), ".", sep="")) # we restrict NL.start to the nonlinear.params NL.start = NL.start[nonlinear.params] } else { if(length(NL.start.init)>1) stop("NL.start.init must be a scalar.") if(!is.numeric(NL.start.init)) stop("NL.start.init must be numeric!") if(!is.finite(NL.start.init)) stop("Infinites values as starting values, you must be kidding me...") if(missing(NL.start)){ NL.start <- list() NL.start[nonlinear.params] <- NL.start.init } else { if(typeof(NL.start)!="list") stop("NL.start must be a list.") if(any(!names(NL.start) %in% params)) stop(paste("Some parameters in 'NL.start' are not in the formula:\n", paste(names(NL.start)[!names(NL.start) %in% params], collapse=", "), ".", sep="")) missing.params <- nonlinear.params[!nonlinear.params%in%names(NL.start)] NL.start[missing.params] <- NL.start.init } } } else { NL.start <- list() } # # The upper and lower limits # if(!missing(lower) && !is.null(lower)){ if(typeof(lower)!="list"){ stop("'lower' MUST be a list.") } lower[params[!params %in% names(lower)]] <- -Inf lower <- unlist(lower[params]) } else { lower <- rep(-Inf, lparams) names(lower) <- params } if(!missing(upper) && !is.null(upper)){ if(typeof(upper)!="list"){ stop("'upper' MUST be a list.") } upper[params[!params %in% names(upper)]] <- Inf upper <- unlist(upper[params]) } else { upper <- rep(Inf, lparams) names(upper) <- params } lower <- c(lower) upper <- c(upper) # # Controls: user defined gradient # if(!missing(nl.gradient)){ isGradient = TRUE if(class(nl.gradient)!="formula" | length(nl.gradient)==3) stop("'nl.gradient' must be a formula like, for ex., ~f0(a1, x1, a2, x2). f0 giving the gradient.") } else { isGradient = FALSE } if(!is.null(d.hessian)){ hessianArgs = list(d=d.hessian) } else hessianArgs = NULL assign("hessianArgs", hessianArgs, env) # # Offset # offset.value = 0 if(!missing(offset) && !is.null(offset)){ # control # if(!class(offset) == "formula"){ if(!"formula" %in% class(offset)){ stop("Argument 'offset' must be a formula (e.g. ~ 1+x^2).") } if(length(offset) != 2){ stop("Argument 'offset' must be a formula of the type (e.g.): ~ 1+x^2.") } offset.call = offset[[length(offset)]] vars.offset = all.vars(offset.call) if(any(!vars.offset %in% dataNames)){ var_missing = vars.offset[!vars.offset %in% dataNames] stop("Some variable in the argument 'offset' are not in the data:\n", paste0(var_missing, sep=", "), ".") } offset.value = eval(offset.call, data) if(anyNA(offset.value)){ stop("Evaluating the argument 'offset' lead to NA values.") } } assign("offset.value", offset.value, env) # # PRECISION # n = length(lhs) # The main precision if(!missing(precision.cluster) && !is.null(precision.cluster)){ if(!length(precision.cluster)==1 || !is.numeric(precision.cluster) || precision.cluster <= 0 || precision.cluster >1){ stop("If provided, argument 'precision.cluster' must be a strictly positive scalar lower than 1.") } else if(precision.cluster < 10000*.Machine$double.eps){ stop("Argument 'precision.cluster' cannot be lower than ", signif(10000*.Machine$double.eps)) } eps.cluster = precision.cluster } else { eps.cluster = 1e-5 # min(10**-(log10(n) + Q/3), 1e-5) } if(!is.numeric(itermax.cluster) || length(itermax.cluster) > 1 || itermax.cluster < 1){ stop("Argument itermax.cluster must be an integer greater than 0.") } if(!is.numeric(itermax.deriv) || length(itermax.deriv) > 1 || itermax.deriv < 1){ stop("Argument itermax.deriv must be an integer greater than 0.") } # other precisions eps.NR = ifelse(is.null(dots$eps.NR), eps.cluster/100, dots$eps.NR) eps.deriv = ifelse(is.null(dots$eps.deriv), 1e-4, dots$eps.deriv) # Initial checks are done nonlinear.params <- names(NL.start) #=> in the order the user wants # starting values of all parameters (initialized with the NL ones): start = NL.start # control for the linear start => we can provide coefficients # from past estimations. Coefficients that are not provided are set # to 0 if(length(linear.start)>1){ what = linear.start[linear.params] what[is.na(what)] = 0 linear.start = what } start[linear.params] <- linear.start params <- names(start) start <- unlist(start) start <- c(start) lparams <- length(params) names(start) <- params # The right order of upper and lower upper = upper[params] lower = lower[params] # # The MODEL0 => to get the init of the theta for the negbin # # Bad location => rethink the design of the code assign(".famFuns", famFuns, env) assign(".family", family, env) assign("nobs", length(lhs), env) assign(".lhs", lhs, env) assign(".isMulticore", isMulticore, env) assign(".CORES", FENmlm_CORES, env) assign(".verbose", verbose, env) if(missing(theta.init)){ theta.init = NULL } else { if(!is.null(theta.init) && (!is.numeric(theta.init) || length(theta.init)!=1 || theta.init<=0)){ stop("the argument 'theta.init' must be a strictly positive scalar.") } } model0 <- get_model_null(env, theta.init) theta.init = model0$theta # For the negative binomial: if(family == "negbin"){ params = c(params, ".theta") start = c(start, theta.init) names(start) = params upper = c(upper, 10000) lower = c(lower, 1e-3) } # On balance les donnees a utiliser dans un nouvel environnement if(isLinear) assign("linear.mat", linear.mat, env) if(isGradient) assign(".call_gradient", nl.gradient[[2]], env) #### #### Sending to the env #### #### useExp_clusterCoef = family %in% c("poisson") # The dummies assign("isDummy", isDummy, env) if(isDummy){ assign(".dum_all", dum_all, env) assign(".nbCluster", nbCluster, env) assign(".sum_y", sum_y_all, env) assign(".tableCluster", obs_per_cluster_all, env) assign(".familyConv", family, env) # new family -- used in convergence, can be modified if(Q > 1 || family %in% c("negbin")){ # for the derivatives dumMat_cpp = matrix(unlist(dum_all), ncol = Q) - 1 assign(".dumMat_cpp", dumMat_cpp, env) } # the saved dummies if(!is.null(dots$clusterStart)){ # information on starting values coming from update method doExp = ifelse(useExp_clusterCoef, exp, I) if(dots$clusterFromUpdate || length(obs2remove) == 0){ # Means it's the full cluster properly given assign(".savedDummy", doExp(dots$clusterStart), env) } else { assign(".savedDummy", doExp(dots$clusterStart[-obs2remove]), env) } } else if(useExp_clusterCoef){ assign(".savedDummy", rep(1, length(lhs)), env) } else { assign(".savedDummy", rep(0, length(lhs)), env) } # TO DELETE when new cpp functions fully implemented assign(".orderCluster", NULL, env) if(isMulticore || family %in% c("negbin", "logit")){ # we also add this variable used in cpp orderCluster_all = list() for(i in 1:Q){ orderCluster_all[[i]] = order(dum_all[[i]]) - 1 } # orderCluster_mat = do.call("cbind", orderCluster_all) assign(".orderCluster", orderCluster_all, env) } # New cpp functions # This is where we send the elements needed for convergence in cpp assign(".dum_vector", as.integer(unlist(dum_all) - 1), env) assign(".tableCluster_vector", as.integer(unlist(obs_per_cluster_all)), env) assign(".sum_y_vector", unlist(sum_y_all), env) if(family == "gaussian" && Q >= 2){ assign(".invTableCluster", 1/unlist(obs_per_cluster_all)) } else { assign(".invTableCluster", 1L) } if(family %in% c("negbin", "logit")){ assign(".cumtable_vector", as.integer(unlist(lapply(obs_per_cluster_all, cumsum))), env) assign(".obsCluster_vector", as.integer(unlist(orderCluster_all)), env) } else { # we need to assign it anyway assign(".cumtable_vector", 1L, env) assign(".obsCluster_vector", 1L, env) } } # basic NL envNL = new.env() assign("isNL", isNL, env) if(isNL){ for(var in nonlinear.varnames) assign(var, data[[var]], envNL) for(var in nonlinear.params) assign(var, start[var], envNL) } assign("envNL", envNL, env) assign(".nl.call", nl.call, env) assign("isGradient", isGradient, env) # other assign(".lhs", lhs, env) assign("isLinear", isLinear, env) assign("linear.params", linear.params, env) assign("nonlinear.params", nonlinear.params, env) assign("params", params, env) assign("nobs", length(lhs), env) assign(".verbose", verbose, env) assign("jacobian.method", jacobian.method, env) assign(".famFuns", famFuns, env) assign(".family", family, env) assign(".iter", 0, env) # Pour gerer les valeurs de mu: assign(".coefMu", list(), env) assign(".valueMu", list(), env) assign(".valueExpMu", list(), env) assign(".wasUsed", TRUE, env) # Pour les valeurs de la Jacobienne non lineaire assign(".JC_nbSave", 0, env) assign(".JC_nbMaxSave", 1, env) assign(".JC_savedCoef", list(), env) assign(".JC_savedValue", list(), env) # PRECISION assign(".eps.cluster", eps.cluster, env) assign(".eps.NR", eps.NR, env) assign(".eps.deriv", eps.deriv, env) # ITERATIONS assign(".itermax.cluster", itermax.cluster, env) assign(".itermax.deriv", itermax.deriv, env) # OTHER assign(".useAcc", useAcc, env) assign(".warn_0_Hessian", FALSE, env) assign(".warn_overfit_logit", FALSE, env) # To monitor how the clusters are computed (if the problem is difficult or not) assign(".firstIterCluster", 1e10, env) # the number of iterations in the first run assign(".firstRunCluster", TRUE, env) # flag for first enrty in get_dummies assign(".iterCluster", 1e10, env) # the previous number of cluster iterations assign(".evolutionLL", Inf, env) # diff b/w two successive LL assign(".pastLL", 0, env) assign(".iterLastPrecisionIncrease", 0, env) # the last iteration when precision was increased assign(".nbLowIncrease", 0, env) # number of successive evaluations with very low LL increments assign(".nbIterOne", 0, env) # nber of successive evaluations with only 1 iter to get the clusters assign(".difficultConvergence", FALSE, env) # Same for derivatives assign(".derivDifficultConvergence", FALSE, env) assign(".firstRunDeriv", TRUE, env) # flag for first entry in derivative assign(".accDeriv", TRUE, env) # Logical: flag for accelerating deriv assign(".iterDeriv", 1e10, env) # number of iterations in the derivatives step # # if there is only the intercept and cluster => we estimate only the clusters # if(!isLinear && !isNonLinear && Q>0){ if(family == "negbin"){ stop("To estimate the negative binomial model, you need at least one variable. (The estimation of the model with only the clusters is not implemented.)") } results = femlm_only_clusters(env, model0, cluster, dum_names) results$call = match.call() results$fml = fml if(length(obs2remove)>0){ results$obsRemoved = obs2remove results$clusterRemoved = dummyOmises } results$onlyCluster = TRUE return(results) } # On teste les valeurs initiales pour informer l'utilisateur if(isNL){ mu = NULL try(mu <- eval(nl.call, envir = envNL), silent = FALSE) if(is.null(mu)){ # the non linear part could not be evaluated - ad hoc message stop("The non-linear part (NL.fml) could not be evaluated. There may be a problem in 'NL.fml'.") } # DEPREC: the NL part should return stg the same length # # the special case of the constant # if(length(mu) == 1){ # mu = rep(mu, nrow(data)) # } # No numeric vectors if(!is.vector(mu) || !is.numeric(mu)){ stop("Evaluation of NL.fml should return a numeric vector. (This is currently not the case)") } # Handling NL.fml errors if(length(mu) != nrow(data)){ stop("Evaluation of NL.fml leads to ", length(mu), " observations while there are ", nrow(data), " observations in the data base. They should be of the same lenght.") } if(anyNA(mu)){ stop("Evaluating NL.fml leads to NA values (which are forbidden). Maybe it's a problem with the starting values, maybe it's another problem.") } } else { mu = eval(nl.call, envir = envNL) } # On sauvegarde les valeurs de la partie non lineaire assign(".nbMaxSave", NLsave, env) # nombre maximal de valeurs a sauvegarder assign(".nbSave", 1, env) # nombre de valeurs totales sauvegardees assign(".savedCoef", list(start[nonlinear.params]), env) assign(".savedValue", list(mu), env) if(isLinear) { mu <- mu + c(linear.mat%*%unlist(start[linear.params])) } if(anyNA(mu)){ stop("Evaluating the left hand side leads to NA values.") } # Check of the user-defined gradient, if given if(isGradient){ for(nom in nonlinear.params) assign(nom, start[nom], env) test <- eval(nl.gradient[[2]], envir=env) if(!class(test)%in%c("list", "data.frame")) stop("The function called by 'nl.gradient' must return an object of type 'list' or 'data.frame'.") if(!all(nonlinear.params%in%names(test))) stop(paste("The gradient must return a value for each parameter. Some are missing:\n", paste(nonlinear.params[!nonlinear.params%in%names(test)], collapse=", "), ".", sep="")) if(!all(names(test)%in%nonlinear.params)) warning(paste("Some values given by 'nl.gradient' are not in the parameters:\n", paste(names(test)[!names(test)%in%nonlinear.params], collapse=", "), ".", sep="")) if(mean(sapply(test[nonlinear.params], length))!=length(lhs)) stop("Strange, the length of the vector returned by 'nl.gradient' does not match with the data.") #we save 1 gradient: jacob.mat = as.matrix(test[nonlinear.params]) assign(".JC_nbSave", 1, env) assign(".JC_savedCoef", list(start[nonlinear.params]), env) assign(".JC_savedValue", list(jacob.mat), env) } # Mise en place du calcul du gradient gradient = femlm_gradient hessian <- NULL if(useHessian) hessian <- femlm_hessian # GIVE PARAMS if(!is.null(dots$give.params) && dots$give.params) return(list(coef=start, env=env)) if(verbose >= 2) cat("Setup in ", (proc.time() - ptm)[3], "s\n", sep="") # # Maximizing the likelihood # opt <- NULL opt <- stats::nlminb(start=start, objective=femlm_ll, env=env, lower=lower, upper=upper, gradient=gradient, hessian=hessian, control=opt.control) if(is.null(opt)){ stop("Could not achieve maximization.") } convStatus = TRUE warningMessage = "" if(!opt$message %in% c("X-convergence (3)", "relative convergence (4)", "both X-convergence and relative convergence (5)")){ # warning("[femlm] The optimization algorithm did not converge, the results are not reliable. Use function diagnostic() to see what's wrong.", call. = FALSE) warningMessage = " The optimization algorithm did not converge, the results are not reliable." convStatus = FALSE } #### #### After Maximization #### #### coef <- opt$par # The Hessian hessian = femlm_hessian(coef, env=env) # we add the names of the non linear variables in the hessian if(isNonLinear || family == "negbin"){ dimnames(hessian) = list(params, params) } # we create the Hessian without the bounded parameters hessian_noBounded = hessian # Handling the bounds if(!isNonLinear){ NL.fml = NULL bounds = NULL isBounded = NULL } else { # we report the bounds & if the estimated parameters are bounded upper_bound = upper[nonlinear.params] lower_bound = lower[nonlinear.params] # 1: are the estimated parameters at their bounds? coef_NL = coef[nonlinear.params] isBounded = rep(FALSE, length(params)) isBounded[1:length(coef_NL)] = (coef_NL == lower_bound) | (coef_NL == upper_bound) # 2: we save the bounds upper_bound_small = upper_bound[is.finite(upper_bound)] lower_bound_small = lower_bound[is.finite(lower_bound)] bounds = list() if(length(upper_bound_small) > 0) bounds$upper = upper_bound_small if(length(lower_bound_small) > 0) bounds$lower = lower_bound_small if(length(bounds) == 0){ bounds = NULL } # 3: we update the Hessian (basically, we drop the bounded element) if(any(isBounded)){ hessian_noBounded = hessian[-which(isBounded), -which(isBounded), drop = FALSE] boundText = ifelse(coef_NL == upper_bound, "Upper bounded", "Lower bounded")[isBounded] attr(isBounded, "type") = boundText } } # Variance var <- NULL try(var <- solve(hessian_noBounded), silent = TRUE) if(is.null(var)){ warningMessage = paste(warningMessage, "The information matrix is singular (likely presence of collinearity). Use function diagnostic() to pinpoint collinearity problems.") var = hessian_noBounded*NA se = diag(var) } else { se = diag(var) se[se < 0] = NA se = sqrt(se) } # Warning message if(nchar(warningMessage) > 0){ if(showWarning) warning("[femlm]:", warningMessage) } # To handle the bounded coefficient, we set its SE to NA if(any(isBounded)){ se = se[params] names(se) = params } zvalue <- coef/se pvalue <- 2*pnorm(-abs(zvalue)) # We add the information on the bound for the se & update the var to drop the bounded vars se_format = se if(any(isBounded)){ se_format[!isBounded] = decimalFormat(se_format[!isBounded]) se_format[isBounded] = boundText } coeftable <- data.frame("Estimate"=coef, "Std. Error"=se_format, "z value"=zvalue, "Pr(>|z|)"=pvalue, stringsAsFactors = FALSE) names(coeftable) <- c("Estimate", "Std. Error", "z value", "Pr(>|z|)") row.names(coeftable) <- params attr(se, "type") = attr(coeftable, "type") = "Standard" mu_both = get_mu(coef, env, final = TRUE) mu = mu_both$mu exp_mu = mu_both$exp_mu # calcul pseudo r2 loglik <- -opt$objective # moins car la fonction minimise ll_null <- model0$loglik # degres de liberte df_k = length(coef) if(isDummy) df_k = df_k + sum(sapply(dum_all, max) - 1) + 1 # dummies are constrained, they don't have full dof (cause you need to take one value off for unicity) # this is an approximation, in some cases there can be more than one ref. But good approx. pseudo_r2 <- 1 - (loglik-df_k)/(ll_null-1) # Calcul residus expected.predictor = famFuns$expected.predictor(mu, exp_mu, env) residuals = lhs - expected.predictor # calcul squared corr if(sd(expected.predictor) == 0){ sq.cor = NA } else { sq.cor = stats::cor(lhs, expected.predictor)**2 } # The scores scores = femlm_scores(coef, env) if(isNonLinear){ # we add the names of the non linear params in the score colnames(scores) = params } res <- list(coefficients=coef, coeftable=coeftable, loglik=loglik, iterations=opt$iterations, n=length(lhs), nparams=df_k, call=call, fml=fml, ll_null=ll_null, pseudo_r2=pseudo_r2, message=opt$message, convStatus=convStatus, sq.cor=sq.cor, fitted.values=expected.predictor, hessian=hessian, cov.unscaled=var, se=se, scores=scores, family=family, residuals=residuals) # Other optional elements if(!missing(offset)){ res$offset = offset } # The value of mu (if cannot be recovered from fitted()) if(family == "logit"){ qui_01 = expected.predictor %in% c(0, 1) if(any(qui_01)){ res$mu = mu } } else if(family %in% c("poisson", "negbin")){ qui_0 = expected.predictor == 0 if(any(qui_0)){ res$mu = mu } } if(!is.null(NL.fml)){ res$NL.fml = NL.fml if(!is.null(bounds)){ res$bounds = bounds res$isBounded = isBounded } } # Dummies if(isDummy){ dummies = attr(mu, "mu_dummies") if(useExp_clusterCoef){ dummies = rpar_log(dummies, env) } res$sumFE = dummies # res$clusterNames = cluster # # id_dummies = list() # for(i in 1:length(cluster)){ # dum = dum_all[[i]] # attr(dum, "clust_names") = as.character(dum_names[[i]]) # id_dummies[[cluster[i]]] = dum # } res$clusterNames = cluster[reorder] id_dummies = list() for(i in reorder){ dum = dum_all[[i]] attr(dum, "clust_names") = as.character(dum_names[[i]]) id_dummies[[cluster[i]]] = dum } res$id_dummies = id_dummies # clustSize = sapply(id_dummies, max) clustSize = nbCluster[reorder] names(clustSize) = res$clusterNames res$clusterSize = clustSize } # Observations removed (either NA or clusters) if(length(obs2remove)>0){ res$obsRemoved = obs2remove if(isDummy && any(lengths(dummyOmises) > 0)){ res$clusterRemoved = dummyOmises } } if(family == "negbin"){ theta = coef[".theta"] res$theta = theta if(theta > 1000){ warning("Very high value of theta (", theta, "). There is no sign of overdisperion, you may consider a Poisson model.") } } class(res) <- "femlm" if(verbose > 0){ cat("\n") } return(res) } femlm_only_clusters <- function(env, model0, cluster, dum_names){ # Estimation with only the cluster coefficients # # 1st step => computing the dummies # nobs = get("nobs", env) family = get(".family", env) offset.value = get("offset.value", env) if(family == "negbin"){ coef[[".theta"]] = model0$theta } else { coef = list() } # indicator of whether we compute the exp(mu) useExp = family %in% c("poisson", "logit", "negbin") useExp_clusterCoef = family %in% c("poisson") # mu, using the offset mu_noDum = offset.value if(length(mu_noDum) == 1) mu_noDum = rep(mu_noDum, nobs) # we create the exp of mu => used for later functions exp_mu_noDum = NULL if(useExp_clusterCoef){ exp_mu_noDum = rpar_exp(mu_noDum, env) } dummies = getDummies(mu_noDum, exp_mu_noDum, env, coef) exp_mu = NULL if(useExp_clusterCoef){ # despite being called mu, it is in fact exp(mu)!!! exp_mu = exp_mu_noDum*dummies mu = rpar_log(exp_mu, env) } else { mu = mu_noDum + dummies if(useExp){ exp_mu = rpar_exp(mu, env) } } # # 2nd step => saving information # dum_all = get(".dum_all", env) famFuns = get(".famFuns", env) lhs = get(".lhs", env) # The log likelihoods loglik = famFuns$ll(lhs, mu, exp_mu, env, coef) ll_null = model0$loglik # degres de liberte df_k = sum(sapply(dum_all, max) - 1) + 1 pseudo_r2 = 1 - loglik/ll_null # NON Adjusted # Calcul residus expected.predictor = famFuns$expected.predictor(mu, exp_mu, env) residuals = lhs - expected.predictor # calcul squared corr if(sd(expected.predictor) == 0){ sq.cor = NA } else { sq.cor = stats::cor(lhs, expected.predictor)**2 } # calcul r2 naif naive.r2 = 1 - sum(residuals**2) / sum((lhs - mean(lhs))**2) res = list(loglik=loglik, n=length(lhs), nparams=df_k, call=call, ll_null=ll_null, pseudo_r2=pseudo_r2, naive.r2=naive.r2, sq.cor=sq.cor, expected.predictor=expected.predictor, residuals=residuals, family=family) # # Information on the dummies if(useExp_clusterCoef){ dummies = rpar_log(dummies, env) } res$sumFE = dummies res$clusterNames = cluster id_dummies = list() for(i in 1:length(cluster)){ dum = dum_all[[i]] attr(dum, "clust_names") = as.character(dum_names[[i]]) id_dummies[[cluster[i]]] = dum } res$id_dummies = id_dummies clustSize = sapply(dum_all, max) names(clustSize) = cluster res$clusterSize = clustSize if(family == "negbin"){ theta = coef[".theta"] res$theta = theta } res$convStatus = TRUE class(res) = "femlm" return(res) } femlm_hessian <- function(coef, env){ # Computes the hessian verbose = get(".verbose", env) if(verbose >= 2) ptm = proc.time() params <- get("params", env) names(coef) <- params nonlinear.params <- get("nonlinear.params", env) k <- length(nonlinear.params) isNL <- get("isNL", env) hessianArgs = get("hessianArgs", env) famFuns = get(".famFuns", env) family = get(".family", env) y = get(".lhs", env) isDummy = get("isDummy", env) mu_both = get_savedMu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu jacob.mat = get_Jacobian(coef, env) ll_d2 = famFuns$ll_d2(y, mu, exp_mu, coef) if(isDummy){ dxi_dbeta = deriv_xi(jacob.mat, ll_d2, env, coef) jacob.mat = jacob.mat + dxi_dbeta } else dxi_dbeta = 0 hessVar = crossprod(jacob.mat, jacob.mat * ll_d2) if(isNL){ # we get the 2nd derivatives z = numDeriv::genD(evalNLpart, coef[nonlinear.params], env=env, method.args = hessianArgs)$D[, -(1:k), drop=FALSE] ll_dl = famFuns$ll_dl(y, mu, exp_mu, coef=coef, env=env) id_r = rep(1:k, 1:k) id_c = c(sapply(1:k, function(x) 1:x), recursive=TRUE) H = matrix(0, nrow=k, ncol=k) H[cbind(id_r, id_c)] = H[cbind(id_r, id_c)] = colSums(z*ll_dl) } else H = 0 # on ajoute la partie manquante if(isNL) hessVar[1:k, 1:k] = hessVar[1:k, 1:k] + H if(family=="negbin"){ theta = coef[".theta"] ll_dx_dother = famFuns$ll_dx_dother(y, mu, exp_mu, coef, env) if(isDummy){ dxi_dother = deriv_xi_other(ll_dx_dother, ll_d2, env, coef) } else { dxi_dother = 0 } # calcul des derivees secondes vav de theta h.theta.L = famFuns$hess.thetaL(theta, jacob.mat, y, dxi_dbeta, dxi_dother, ll_d2, ll_dx_dother) hessVar = cbind(hessVar, h.theta.L) h.theta = famFuns$hess_theta_part(theta, y, mu, exp_mu, dxi_dother, ll_dx_dother, ll_d2, env) hessVar = rbind(hessVar, c(h.theta.L, h.theta)) } if(anyNA(hessVar)){ stop("NaN in the Hessian, can be due to a possible overfitting problem.\nIf so, to have an idea of what's going on, you can reduce the value of the argument 'rel.tol' of the nlminb algorithm using the argument 'opt.control = list(rel.tol=?)' with ? the new value.") } # warn_0_Hessian = get(".warn_0_Hessian", env) # if(!warn_0_Hessian && any(diag(hessVar) == 0)){ # # We apply the warning only once # var_problem = params[diag(hessVar) == 0] # warning("Some elements of the diagonal of the hessian are equal to 0: likely presence of collinearity. FYI the problematic variables are: ", paste0(var_problem, collapse = ", "), ".", immediate. = TRUE) # assign(".warn_0_Hessian", TRUE, env) # } # if(verbose >= 2) cat("Hessian: ", (proc.time()-ptm)[3], "s\n", sep="") - hessVar } femlm_gradient <- function(coef, env){ # cat("gradient:\n") ; print(as.vector(coef)) params = get("params", env) names(coef) = params nonlinear.params = get("nonlinear.params", env) linear.params = get("linear.params", env) famFuns = get(".famFuns", env) family = get(".family", env) y = get(".lhs", env) mu_both = get_savedMu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu # calcul de la jacobienne res <- list() #stocks the results # cat("\tgetting jacobian") # ptm = proc.time() jacob.mat = get_Jacobian(coef, env) # cat("in", (proc.time()-ptm)[3], "s.\n") # cat("\tComputing gradient ") # ptm = proc.time() # res = famFuns$grad(jacob.mat, y, mu, env, coef) res = getGradient(jacob.mat, y, mu, exp_mu, env, coef) # cat("in", (proc.time()-ptm)[3], "s.\n") names(res) = c(nonlinear.params, linear.params) if(family=="negbin"){ theta = coef[".theta"] res[".theta"] = famFuns$grad.theta(theta, y, mu, exp_mu, env) } return(-unlist(res[params])) } femlm_scores <- function(coef, env){ # Computes the scores (Jacobian) params = get("params", env) names(coef) <- params famFuns = get(".famFuns", env) family = get(".family", env) y = get(".lhs", env) mu_both = get_savedMu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu jacob.mat = get_Jacobian(coef, env) scores = getScores(jacob.mat, y, mu, exp_mu, env, coef) if(family=="negbin"){ theta = coef[".theta"] score.theta = famFuns$scores.theta(theta, y, mu, exp_mu, env) scores = cbind(scores, score.theta) } return(scores) } femlm_ll <- function(coef, env){ # Log likelihood # misc funs iter = get(".iter", env) + 1 assign(".iter", iter, env) pastLL = get(".pastLL", env) verbose = get(".verbose", env) ptm = proc.time() if(verbose >= 1){ coef_names = sapply(names(coef), charShorten, width = 10) coef_line = paste0(coef_names, ": ", signif(coef), collapse = " -- ") cat("\nIter", iter, "- Coefficients:", coef_line, "\n") } # computing the LL famFuns = get(".famFuns", env) family = get(".family", env) y <- get(".lhs", env) if(any(is.na(coef))) stop("Divergence... (some coefs are NA)\nTry option verbose=2 to figure out the problem.") mu_both = get_mu(coef, env) mu = mu_both$mu exp_mu = mu_both$exp_mu # for the NEGBIN, we add the coef ll = famFuns$ll(y, mu, exp_mu, env, coef) evolutionLL = ll - pastLL assign(".evolutionLL", evolutionLL, env) assign(".pastLL", ll, env) if(iter == 1) evolutionLL = "--" if(verbose >= 1) cat("LL = ", ll, " (", (proc.time()-ptm)[3], "s)\tevol = ", evolutionLL, "\n", sep = "") if(ll==(-Inf)) return(1e308) return(-ll) # je retourne -ll car la fonction d'optimisation minimise } evalNLpart = function(coef, env){ # cat("Enter evalNLpart : ", as.vector(coef), "\n") # fonction qui evalue la partie NL isNL = get("isNL", env) if(!isNL) return(0) envNL = get("envNL", env) nonlinear.params <- get("nonlinear.params", env) nl.call <- get(".nl.call", env) nbSave = get(".nbSave", env) nbMaxSave = get(".nbMaxSave", env) savedCoef = get(".savedCoef", env) savedValue = get(".savedValue", env) if(!is.null(names(coef))){ coef = coef[nonlinear.params] } else if (length(coef) != length(nonlinear.params)){ stop("Problem with the length of the NL coefficients.") } if(nbMaxSave == 0){ for(var in nonlinear.params) assign(var, coef[var], envNL) y_nl <- eval(nl.call, envir = envNL) # we check problems if(anyNA(y_nl)){ stop("Evaluation of non-linear part returns NAs. The coefficients were: ", paste0(nonlinear.params, " = ", signif(coef[nonlinear.params], 3)), ".") } return(y_nl) } for(i in nbSave:1){ #les valeurs les + recentes sont en derniere position if(all(coef == savedCoef[[i]])){ return(savedValue[[i]]) } } # Si la valeur n'existe pas, on la sauvegarde # on met les valeurs les plus recentes en derniere position for(var in nonlinear.params) assign(var, coef[var], envNL) y_nl = eval(nl.call, envir = envNL) # we check problems if(anyNA(y_nl)){ stop("Evaluation of non-linear part returns NAs. The coefficients were: ", paste0(nonlinear.params, " = ", signif(coef[nonlinear.params], 3)), ".") } if(nbSave < nbMaxSave){ savedCoef[[nbSave + 1]] = coef savedValue[[nbSave + 1]] = y_nl assign(".nbSave", nbSave + 1, env) } else if(nbMaxSave > 1){ tmp = list() tmp[[nbSave]] = coef tmp[1:(nbSave-1)] = savedCoef[2:nbSave] savedCoef = tmp tmp = list() tmp[[nbSave]] = y_nl tmp[1:(nbSave-1)] = savedValue[2:nbSave] savedValue = tmp } else{ savedCoef = list(coef) savedValue = list(y_nl) } # cat("computed NL part:", as.vector(coef), "\n") assign(".savedCoef", savedCoef, env) assign(".savedValue", savedValue, env) return(y_nl) } get_mu = function(coef, env, final = FALSE){ # This function computes the RHS of the equation # mu_L => to save one matrix multiplication isNL = get("isNL", env) isLinear = get("isLinear", env) isDummy = get("isDummy", env) nobs = get("nobs", env) params = get("params", env) family = get(".family", env) offset.value = get("offset.value", env) names(coef) = params # UseExp: indicator if the family needs to use exp(mu) in the likelihoods: # this is useful because we have to compute it only once (save computing time) # useExp_clusterCoef: indicator if we use the exponential of mu to obtain the cluster coefficients # if it is TRUE, it will mean that the dummy will be equal # to exp(mu_dummies) despite being named mu_dummies useExp = family %in% c("poisson", "logit", "negbin") useExp_clusterCoef = family %in% c("poisson") # For managing mu: coefMu = get(".coefMu", env) valueMu = get(".valueMu", env) valueExpMu = get(".valueExpMu", env) wasUsed = get(".wasUsed", env) if(wasUsed){ coefMu = valueMu = valueExpMu = list() assign(".wasUsed", FALSE, env) } if(length(coefMu)>0){ for(i in 1:length(coefMu)){ if(all(coef==coefMu[[i]])){ return(list(mu = valueMu[[i]], exp_mu = valueExpMu[[i]])) } } } if(isNL){ muNL = evalNLpart(coef, env) } else muNL = 0 if(isLinear){ linear.params = get("linear.params", env) linear.mat = get("linear.mat", env) mu_L = c(linear.mat %*% coef[linear.params]) } else mu_L = 0 mu_noDum = muNL + mu_L + offset.value # Detection of overfitting issues with the logit model: if(family == "logit"){ warn_overfit_logit = get(".warn_overfit_logit", env) if(!warn_overfit_logit && max(abs(mu_noDum)) >= 300){ # overfitting => now finding the precise cause # browser() if(!isNL || (isLinear && max(abs(mu_L)) >= 100)){ # we create the matrix with the coefficients to find out the guy mat_L_coef = linear.mat * matrix(coef[linear.params], nrow(linear.mat), 2, byrow = TRUE) max_var = apply(abs(mat_L_coef), 2, max) best_suspect = linear.params[which.max(max_var)] warning("in femlm(): Likely presence of an overfitting problem. One suspect variable is: ", best_suspect, ".", immediate. = TRUE, call. = FALSE) } else { warning("in femlm(): Likely presence of an overfitting problem due to the non-linear part.", immediate. = TRUE, call. = FALSE) } assign(".warn_overfit_logit", TRUE, env) } } # we create the exp of mu => used for later functions exp_mu_noDum = NULL if(useExp_clusterCoef){ exp_mu_noDum = rpar_exp(mu_noDum, env) } if(isDummy){ # we get back the last dummy mu_dummies = getDummies(mu_noDum, exp_mu_noDum, env, coef, final) } else { if(useExp_clusterCoef){ mu_dummies = 1 } else { mu_dummies = 0 } } # We add the value of the dummy to mu and we compute the exp if necessary exp_mu = NULL if(useExp_clusterCoef){ # despite being called mu_dummies, it is in fact exp(mu_dummies)!!! exp_mu = exp_mu_noDum*mu_dummies mu = rpar_log(exp_mu, env) } else { mu = mu_noDum + mu_dummies if(useExp){ exp_mu = rpar_exp(mu, env) } } if(isDummy){ # BEWARE, if useExp_clusterCoef, it is equal to exp(mu_dummies) attr(mu, "mu_dummies") = mu_dummies } if(length(mu)==0) mu = rep(mu, nobs) # we save the value of mu: coefMu = append(coefMu, list(coef)) valueMu = append(valueMu, list(mu)) valueExpMu = append(valueExpMu, list(exp_mu)) assign(".coefMu", coefMu, env) assign(".valueMu", valueMu, env) assign(".valueExpMu", valueExpMu, env) return(list(mu = mu, exp_mu = exp_mu)) } get_savedMu = function(coef, env){ # This function gets the mu without computation # It follows a LL evaluation coefMu = get(".coefMu", env) valueMu = get(".valueMu", env) valueExpMu = get(".valueExpMu", env) assign(".wasUsed", TRUE, env) if(length(coefMu)>0) for(i in 1:length(coefMu)) if(all(coef==coefMu[[i]])){ # cat("coef nb:", i, "\n") return(list(mu = valueMu[[i]], exp_mu = valueExpMu[[i]])) } stop("Problem in \"get_savedMu\":\n gradient did not follow LL evaluation.") } get_Jacobian = function(coef, env){ # retrieves the Jacobian of the "rhs" params <- get("params", env) names(coef) <- params isNL <- get("isNL", env) isLinear <- get("isLinear", env) isGradient = get("isGradient", env) if(isNL){ nonlinear.params = get("nonlinear.params", env) jacob.mat = get_NL_Jacobian(coef[nonlinear.params], env) } else jacob.mat = c() if(isLinear){ linear.mat = get("linear.mat", env) if(is.null(dim(jacob.mat))){ jacob.mat = linear.mat } else { jacob.mat = cbind(jacob.mat, linear.mat) } } return(jacob.mat) } get_NL_Jacobian = function(coef, env){ # retrieves the Jacobian of the non linear part #cat("In NL JAC:\n") #print(coef) nbSave = get(".JC_nbSave", env) nbMaxSave = get(".JC_nbMaxSave", env) savedCoef = get(".JC_savedCoef", env) savedValue = get(".JC_savedValue", env) nonlinear.params <- get("nonlinear.params", env) coef = coef[nonlinear.params] if(nbSave>0) for(i in nbSave:1){ #les valeurs les + recentes sont en derniere position if(all(coef == savedCoef[[i]])){ # cat("Saved value:", as.vector(coef), "\n") return(savedValue[[i]]) } } #Si la valeur n'existe pas, on la sauvegarde #on met les valeurs les plus recentes en derniere position isGradient <- get("isGradient", env) if(isGradient){ call_gradient <- get(".call_gradient", env) #we send the coef in the environment for(var in nonlinear.params) assign(var, coef[var], env) jacob.mat <- eval(call_gradient, envir=env) jacob.mat <- as.matrix(as.data.frame(jacob.mat[nonlinear.params])) } else { jacobian.method <- get("jacobian.method", env) jacob.mat <- numDeriv::jacobian(evalNLpart, coef, env=env, method=jacobian.method) } #Controls: if(anyNA(jacob.mat)){ qui <- which(apply(jacob.mat, 2, function(x) anyNA(x))) variables <- nonlinear.params[qui] stop("ERROR: The Jacobian of the nonlinear part has NA!\nThis concerns the following variables:\n", paste(variables, sep=" ; ")) } #Sauvegarde if(nbSave<nbMaxSave){ savedCoef[[nbSave+1]] = coef savedValue[[nbSave+1]] = jacob.mat assign(".JC_nbSave", nbSave+1, env) } else if(nbMaxSave>1){ tmp = list() tmp[[nbSave]] = coef tmp[1:(nbSave-1)] = savedCoef[2:nbSave] savedCoef = tmp tmp = list() tmp[[nbSave]] = jacob.mat tmp[1:(nbSave-1)] = savedValue[2:nbSave] savedValue = tmp } else{ savedCoef = list(coef) savedValue = list(jacob.mat) } # print(colSums(jacob.mat)) # cat("computed NL Jacobian:", as.vector(coef), "\n") # print(savedCoef) assign(".JC_savedCoef", savedCoef, env) assign(".JC_savedValue", savedValue, env) return(jacob.mat) } get_model_null <- function(env, theta.init){ # I have the closed form of the ll0 famFuns = get(".famFuns", env) family = get(".family", env) N = get("nobs", env) y = get(".lhs", env) verbose = get(".verbose", env) ptm = proc.time() # one of the elements to be returned theta = NULL if(family == "poisson"){ # There is a closed form if(".lfactorial" %in% names(env)){ lfact = get(".lfactorial", env) } else { # lfactorial(x) == lgamma(x+1) # lfact = sum(lfactorial(y)) lfact = sum(rpar_lgamma(y + 1, env)) assign(".lfactorial", lfact, env) } sy = sum(y) constant = log(sy / N) # loglik = sy*log(sy) - sy*log(N) - sy - sum(lfactorial(y)) loglik = sy*log(sy) - sy*log(N) - sy - lfact } else if(family == "gaussian"){ # there is a closed form constant = mean(y) ss = sum( (y - constant)**2 ) sigma = sqrt( ss / N ) loglik = -1/2/sigma^2*ss - N*log(sigma) - N*log(2*pi)/2 } else if(family == "logit"){ # there is a closed form sy = sum(y) constant = log(sy) - log(N - sy) loglik = sy*log(sy) - sy*log(N-sy) - N*log(N) + N*log(N-sy) } else if(family=="negbin"){ if(".lgamma" %in% names(env)){ lgamm = get(".lgamma", env) } else { # lgamm = sum(lgamma(y + 1)) lgamm = sum(rpar_lgamma(y + 1, env)) assign(".lgamma", lgamm, env) } sy = sum(y) constant = log(sy / N) mean_y = mean(y) invariant = sum(y*constant) - lgamm if(is.null(theta.init)){ theta.guess = max(mean_y**2 / max((var(y) - mean_y), 1e-4), 0.05) } else { theta.guess = theta.init } # I set up a limit of 0.05, because when it is too close to 0, convergence isnt great opt <- nlminb(start=theta.guess, objective=famFuns$ll0_theta, y=y, gradient=famFuns$grad0_theta, lower=1e-3, mean_y=mean_y, invariant=invariant, hessian = famFuns$hess0_theta, env=env) loglik = -opt$objective theta = opt$par } if(verbose >= 2) cat("Null model in ", (proc.time()-ptm)[3], "s. ", sep ="") return(list(loglik=loglik, constant=constant, theta = theta)) } getGradient = function(jacob.mat, y, mu, exp_mu, env, coef, ...){ famFuns = get(".famFuns", env) ll_dl = famFuns$ll_dl(y, mu, exp_mu, coef=coef, env=env) c(crossprod(jacob.mat, ll_dl)) } getScores = function(jacob.mat, y, mu, exp_mu, env, coef, ...){ famFuns = get(".famFuns", env) isDummy = get("isDummy", env) ll_dl = famFuns$ll_dl(y, mu, exp_mu, coef=coef, env=env) scores = jacob.mat* ll_dl if(isDummy){ ll_d2 = famFuns$ll_d2(y, mu, exp_mu, coef=coef, env=env) dxi_dbeta = deriv_xi(jacob.mat, ll_d2, env, coef) scores = scores + dxi_dbeta * ll_dl } return(as.matrix(scores)) } getDummies = function(mu, exp_mu, env, coef, final = FALSE){ # function built to get all the dummy variables # We retrieve past dummies (that are likely to be good # starting values) mu_dummies = get(".savedDummy", env) family = get(".family", env) eps.cluster = get(".eps.cluster", env) verbose = get(".verbose", env) if(verbose >= 2) ptm = proc.time() # # Dynamic precision # iterCluster = get(".iterCluster", env) evolutionLL = get(".evolutionLL", env) nobs = get("nobs", env) iter = get(".iter", env) iterLastPrecisionIncrease = get(".iterLastPrecisionIncrease", env) nbIterOne = get(".nbIterOne", env) if(iterCluster <= 2){ nbIterOne = nbIterOne + 1 } else { # we reinitialise nbIterOne = 0 } assign(".nbIterOne", nbIterOne, env) # nber of times LL almost didn't increase nbLowIncrease = get(".nbLowIncrease", env) if(evolutionLL/nobs < 1e-8){ nbLowIncrease = nbLowIncrease + 1 } else { # we reinitialise nbLowIncrease = 0 } assign(".nbLowIncrease", nbLowIncrease, env) if(!final && eps.cluster > .Machine$double.eps*10000 && iterCluster <= 2 && nbIterOne >= 2 && nbLowIncrease >= 2 && (iter - iterLastPrecisionIncrease) >= 3){ eps.cluster = eps.cluster/10 if(verbose >= 2) cat("Precision increased to", eps.cluster, "\n") assign(".eps.cluster", eps.cluster, env) assign(".iterLastPrecisionIncrease", iter, env) # If the precision increases, we must also increase the precision of the dummies! if(family %in% c("negbin", "logit")){ assign(".eps.NR", eps.cluster / 100, env) } # we also set acceleration to on assign(".useAcc", TRUE, env) } else if(final){ # we don't need ultra precision for these last dummies eps.cluster = eps.cluster * 10**(iterLastPrecisionIncrease != 0) if(family %in% c("negbin", "logit")){ assign(".eps.NR", eps.cluster / 100, env) } } iterMax = get(".itermax.cluster", env) nbCluster = get(".nbCluster", env) Q = length(nbCluster) # whether we use the eponentiation of mu useExp_clusterCoef = family %in% c("poisson") if(useExp_clusterCoef){ mu_in = exp_mu * mu_dummies } else { mu_in = mu + mu_dummies } # # Computing the optimal mu # useAcc = get(".useAcc", env) carryOn = FALSE # Finding the complexity of the problem firstRunCluster = get(".firstRunCluster", env) if(firstRunCluster && Q >= 3){ # First iteration: we check if the problem is VERY difficult (for Q = 3+) useAcc = TRUE assign(".useAcc", TRUE, env) res = convergence(coef, mu_in, env, iterMax = 15) if(res$iter == 15){ assign(".difficultConvergence", TRUE, env) carryOn = TRUE } } else if(useAcc){ res = convergence(coef, mu_in, env, iterMax) if(res$iter <= 2){ # if almost no iteration => no acceleration next time assign(".useAcc", FALSE, env) } } else { res = convergence(coef, mu_in, env, iterMax = 15) if(res$iter == 15){ carryOn = TRUE } } if(carryOn){ # the problem is difficult => acceleration on useAcc = TRUE assign(".useAcc", TRUE, env) res = convergence(coef, res$mu_new, env, iterMax) } mu_new = res$mu_new iter = res$iter # # Retrieving the value of the dummies # if(useExp_clusterCoef){ mu_dummies = mu_new / exp_mu } else { mu_dummies = mu_new - mu } # Warning messages if necessary: if(iter == iterMax) warning("[Getting cluster coefficients] iteration limit reached (", iterMax, ").", call. = FALSE, immediate. = TRUE) assign(".iterCluster", iter, env) # we save the dummy: assign(".savedDummy", mu_dummies, env) if(verbose >= 2){ acc_info = ifelse(useAcc, "+Acc. ", "-Acc. ") cat("Cluster Coef.: ", (proc.time()-ptm)[3], "s (", acc_info, "iter:", iter, ")\t", sep = "") } # we update the flag assign(".firstRunCluster", FALSE, env) mu_dummies } deriv_xi = function(jacob.mat, ll_d2, env, coef){ # Derivative of the cluster coefficients # data: iterMax = get(".itermax.deriv", env) nbCluster = get(".nbCluster", env) Q = length(nbCluster) verbose = get(".verbose", env) if(verbose >= 2) ptm = proc.time() # # initialisation of dxi_dbeta # if(Q >= 2){ # We set the initial values for the first run if(!".sum_deriv" %in% names(env)){ # init of the sum of the derivatives => 0 dxi_dbeta = matrix(0, nrow(jacob.mat), ncol(jacob.mat)) } else { dxi_dbeta = get(".sum_deriv", env) } } else { # no need if only 1, direct solution dxi_dbeta = NULL } # # Computing the optimal dxi_dbeta # accDeriv = get(".accDeriv", env) carryOn = FALSE # Finding the complexity of the problem firstRunDeriv = get(".firstRunDeriv", env) if(firstRunDeriv){ # set accDeriv: we use information on cluster deriv iterCluster = get(".iterCluster", env) diffConv = get(".difficultConvergence", env) if(iterCluster < 20 & !diffConv){ accDeriv = FALSE assign(".accDeriv", FALSE, env) } } if(firstRunDeriv && accDeriv && Q >= 3){ # First iteration: we check if the problem is VERY difficult (for Q = 3+) assign(".accDeriv", TRUE, env) res = dconvergence(dxi_dbeta, jacob.mat, ll_d2, env, iterMax = 15) if(res$iter == 15){ assign(".derivDifficultConvergence", TRUE, env) carryOn = TRUE } } else if(accDeriv){ res = dconvergence(dxi_dbeta, jacob.mat, ll_d2, env, iterMax) if(res$iter <= 10){ # if almost no iteration => no acceleration next time assign(".accDeriv", FALSE, env) } } else { res = dconvergence(dxi_dbeta, jacob.mat, ll_d2, env, iterMax = 50) if(res$iter == 50){ carryOn = TRUE } } if(carryOn){ # the problem is difficult => acceleration on accDeriv = TRUE assign(".accDeriv", TRUE, env) res = dconvergence(res$dxi_dbeta, jacob.mat, ll_d2, env, iterMax) } dxi_dbeta = res$dxi_dbeta iter = res$iter if(iter == iterMax) warning("[Getting cluster derivatives] Maximum iterations reached (", iterMax, ").") assign(".firstRunDeriv", FALSE, env) assign(".sum_deriv", dxi_dbeta, env) if(verbose >= 2){ acc_info = ifelse(accDeriv, "+Acc. ", "-Acc. ") cat(" Derivatives: ", (proc.time()-ptm)[3], "s (", acc_info, "iter:", iter, ")\n", sep = "") } return(dxi_dbeta) } deriv_xi_other = function(ll_dx_dother, ll_d2, env, coef){ # derivative of the dummies wrt an other parameter dumMat_cpp = get(".dumMat_cpp", env) nbCluster = get(".nbCluster", env) dum_all = get(".dum_all", env) eps.deriv = get(".eps.deriv", env) tableCluster_all = get(".tableCluster", env) orderCluster_all = get(".orderCluster", env) Q = length(dum_all) iterMax = 5000 if(Q==1){ dum = dum_all[[1]] k = max(dum) S_Jmu = cpp_tapply_vsum(k, ll_dx_dother, dum) S_mu = cpp_tapply_vsum(k, ll_d2, dum) dxi_dother = - S_Jmu[dum] / S_mu[dum] } else { # The cpp way: N = length(ll_d2) # We set the initial values for the first run if(!".sum_deriv_other" %in% names(env)){ init = rep(0, N) } else { init = get(".sum_deriv_other", env) } dxi_dother <- cpp_partialDerivative_other(iterMax, Q, N, epsDeriv = eps.deriv, ll_d2, ll_dx_dother, init, dumMat_cpp, nbCluster) # we save the values assign(".sum_deriv_other", dxi_dother, env) } as.matrix(dxi_dother) } #### #### Convergence #### #### convergence = function(coef, mu_in, env, iterMax){ # computes the new mu wrt the cluster coefficients nbCluster = get(".nbCluster", env) Q = length(nbCluster) useAcc = get(".useAcc", env) diffConv = get(".difficultConvergence", env) if(useAcc && diffConv && Q > 2){ # in case of complex cases: it's more efficient # to initialize the first two clusters res = conv_acc(coef, mu_in, env, iterMax, only2 = TRUE) mu_in = res$mu_new } if(Q == 1){ mu_new = conv_single(coef, mu_in, env) iter = 1 } else if(Q >= 2){ # Dynamic setting of acceleration if(!useAcc){ res = conv_seq(coef, mu_in, env, iterMax = iterMax) } else if(useAcc){ res = conv_acc(coef, mu_in, env, iterMax = iterMax) } mu_new = res$mu_new iter = res$iter } # we return a list with: new mu and iterations list(mu_new = mu_new, iter = iter) } conv_single = function(coef, mu_in, env){ # convergence for a single cluster # it returns: the new mu (NOT mu_dummies) # Loading all the required variables lhs = get(".lhs", env) nbCluster = get(".nbCluster", env) dum_vector = get(".dum_vector", env) tableCluster_vector = get(".tableCluster_vector", env) sum_y_vector = get(".sum_y_vector", env) cumtable_vector = get(".cumtable_vector", env) obsCluster_vector = get(".obsCluster_vector", env) nbThreads = get(".CORES", env) eps.NR = get(".eps.NR", env) family = get(".familyConv", env) family_nb = switch(family, poisson=1, negbin=2, logit=3, gaussian=4, lpoisson=5) theta = ifelse(family == "negbin", coef[".theta"], 1) mu_new = update_mu_single_cluster(family = family_nb, nb_cluster = nbCluster, theta = theta, diffMax_NR = eps.NR, mu_in = mu_in, lhs = lhs, sum_y = sum_y_vector, dum = dum_vector, obsCluster = obsCluster_vector, table = tableCluster_vector, cumtable = cumtable_vector, nbThreads = nbThreads) return(mu_new) } conv_seq = function(coef, mu_in, env, iterMax){ # convergence of cluster coef without acceleration # Now all in cpp # Loading all the required variables lhs = get(".lhs", env) nbCluster = get(".nbCluster", env) dum_vector = get(".dum_vector", env) tableCluster_vector = get(".tableCluster_vector", env) sum_y_vector = get(".sum_y_vector", env) cumtable_vector = get(".cumtable_vector", env) obsCluster_vector = get(".obsCluster_vector", env) nbThreads = get(".CORES", env) eps.cluster = get(".eps.cluster", env) eps.NR = get(".eps.NR", env) family = get(".familyConv", env) family_nb = switch(family, poisson=1, negbin=2, logit=3, gaussian=4, lpoisson=5) theta = ifelse(family == "negbin", coef[".theta"], 1) Q = length(nbCluster) if(family == "lpoisson"){ # we transform the mu_in into a non exponential form mu_in = log(mu_in) } if(Q == 2 & family == "poisson"){ # Required Variables setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res = cpp_conv_seq_poi_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, dum_vector = dum_vector, sum_y_vector = sum_y_vector, iterMax = iterMax, diffMax = eps.cluster, exp_mu_in = mu_in) } else if(Q == 2 & family == "gaussian"){ # Required variables setup_gaussian_fixedcost(env) info = get(".fixedCostGaussian", env) invTableCluster_vector = get(".invTableCluster", env) res = cpp_conv_seq_gau_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, r_mat_row = info$mat_row, r_mat_col = info$mat_col, r_mat_value_Ab = info$mat_value_Ab, r_mat_value_Ba = info$mat_value_Ba, dum_vector = dum_vector, lhs = lhs, invTableCluster_vector = invTableCluster_vector, iterMax = iterMax, diffMax = eps.cluster, mu_in = mu_in) } else { res = cpp_conv_seq_gnl(family = family_nb, iterMax = iterMax, diffMax = eps.cluster, diffMax_NR = eps.NR, theta = theta, lhs = lhs, nb_cluster_all = nbCluster, mu_init = mu_in, dum_vector = dum_vector, tableCluster_vector = tableCluster_vector, sum_y_vector = sum_y_vector, cumtable_vector = cumtable_vector, obsCluster_vector = obsCluster_vector, nbThreads = nbThreads) } if(family == "lpoisson"){ # we transform the mu_in into an exponential form res$mu_new = exp(res$mu_new) } return(res) } conv_acc = function(coef, mu_in, env, iterMax, only2 = FALSE){ # convergence of cluster coef without acceleration # Now all in cpp # Loading all the required variables lhs = get(".lhs", env) nbCluster = get(".nbCluster", env) dum_vector = get(".dum_vector", env) tableCluster_vector = get(".tableCluster_vector", env) sum_y_vector = get(".sum_y_vector", env) cumtable_vector = get(".cumtable_vector", env) obsCluster_vector = get(".obsCluster_vector", env) nbThreads = get(".CORES", env) eps.cluster = get(".eps.cluster", env) eps.NR = get(".eps.NR", env) family = get(".familyConv", env) family_nb = switch(family, poisson=1, negbin=2, logit=3, gaussian=4, lpoisson=5) theta = ifelse(family == "negbin", coef[".theta"], 1) if(only2){ # means we compute the CC of the first two FE # we recreate the values we send nbCluster = nbCluster[1:2] nb_keep = sum(nbCluster) tableCluster_vector = tableCluster_vector[1:nb_keep] sum_y_vector = sum_y_vector[1:nb_keep] cumtable_vector = cumtable_vector[1:nb_keep] dum_vector = dum_vector[1:(2*length(lhs))] obsCluster_vector = obsCluster_vector[1:(2*length(lhs))] } Q = length(nbCluster) if(family == "lpoisson"){ # we transform the mu_in into a non exponential form mu_in = log(mu_in) } if(Q == 2 & family == "poisson"){ # Required Variables setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res = cpp_conv_acc_poi_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, dum_vector = dum_vector, sum_y_vector = sum_y_vector, iterMax = iterMax, diffMax = eps.cluster, exp_mu_in = mu_in) } else if(Q == 2 & family == "gaussian"){ # Required variables setup_gaussian_fixedcost(env) info = get(".fixedCostGaussian", env) invTableCluster_vector = get(".invTableCluster", env) res = cpp_conv_acc_gau_2(n_i = info$n_i, n_j = info$n_j, n_cells = info$n_cells, r_mat_row = info$mat_row, r_mat_col = info$mat_col, r_mat_value_Ab = info$mat_value_Ab, r_mat_value_Ba = info$mat_value_Ba, dum_vector = dum_vector, lhs = lhs, invTableCluster_vector = invTableCluster_vector, iterMax = iterMax, diffMax = eps.cluster, mu_in = mu_in) } else { res = cpp_conv_acc_gnl(family = family_nb, iterMax = iterMax, diffMax = eps.cluster, diffMax_NR = eps.NR, theta = theta, lhs = lhs, nb_cluster_all = nbCluster, mu_init = mu_in, dum_vector = dum_vector, tableCluster_vector = tableCluster_vector, sum_y_vector = sum_y_vector, cumtable_vector = cumtable_vector, obsCluster_vector = obsCluster_vector, nbThreads = nbThreads) } if(family == "poisson" && res$any_negative_poisson){ # we need to switch to log poisson assign(".familyConv", "lpoisson", env) verbose = get(".verbose", env) if(verbose >= 3) cat("Switch to log-poisson (to cope with high valued FEs).\n") res = conv_acc(coef, mu_in, env, iterMax, only2) # we switch back to original poisson assign(".familyConv", "poisson", env) } if(family == "lpoisson"){ # we transform the mu_in into an exponential form res$mu_new = exp(res$mu_new) } return(res) } #### #### Convergence Deriv cpp #### #### dconvergence = function(dxi_dbeta, jacob.mat, ll_d2, env, iterMax){ nbCluster = get(".nbCluster", env) Q = length(nbCluster) accDeriv = get(".accDeriv", env) derivDiffConv = get(".derivDifficultConvergence", env) if(accDeriv && derivDiffConv && Q > 2){ # in case of complex cases: it's more efficient # to initialize the first two clusters res = dconv_acc(dxi_dbeta, jacob.mat, ll_d2, env, iterMax, only2 = TRUE) dxi_dbeta = res$dxi_dbeta } if(Q == 1){ # calculer single en cpp dxi_dbeta = dconv_single(jacob.mat, ll_d2, env) iter = 1 } else { # The convergence algorithms if(accDeriv){ res = dconv_acc(dxi_dbeta, jacob.mat, ll_d2, env, iterMax) dxi_dbeta = res$dxi_dbeta iter = res$iter } else { res = dconv_seq(dxi_dbeta, jacob.mat, ll_d2, env, iterMax) dxi_dbeta = res$dxi_dbeta iter = res$iter } } return(list(dxi_dbeta = dxi_dbeta, iter = iter)) } dconv_single = function(jacob.mat, ll_d2, env){ # data: jacob_vector = as.vector(jacob.mat) n_vars = ncol(jacob.mat) nb_cluster_all = get(".nbCluster", env) dum_vector = get(".dum_vector", env) nb_coef = nb_cluster_all[[1]] dxi_dbeta = update_deriv_single(n_vars, nb_coef, ll_d2, jacob_vector, dum_vector) return(dxi_dbeta) } dconv_seq = function(dxi_dbeta, jacob.mat, ll_d2, env, iterMax){ # Parameters jacob_vector = as.vector(jacob.mat) n_vars = ncol(jacob.mat) nb_cluster_all = get(".nbCluster", env) dum_vector = get(".dum_vector", env) deriv_init_vector = as.vector(dxi_dbeta) eps.deriv = get(".eps.deriv", env) Q = length(nb_cluster_all) if(Q == 2){ setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res <- cpp_derivconv_seq_2(iterMax = iterMax, diffMax = eps.deriv, n_vars = n_vars, nb_cluster_all = nb_cluster_all, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, ll_d2 = ll_d2, jacob_vector = jacob_vector, deriv_init_vector = deriv_init_vector, dum_vector = dum_vector) } else { res <- cpp_derivconv_seq_gnl(iterMax = iterMax, diffMax = eps.deriv, n_vars, nb_cluster_all, ll_d2, jacob_vector, deriv_init_vector, dum_vector) } return(list(dxi_dbeta = res$dxi_dbeta, iter = res$iter)) } dconv_acc = function(dxi_dbeta, jacob.mat, ll_d2, env, iterMax, only2 = FALSE){ # Parameters jacob_vector = as.vector(jacob.mat) n_vars = ncol(jacob.mat) nb_cluster_all = get(".nbCluster", env) dum_vector = get(".dum_vector", env) deriv_init_vector = as.vector(dxi_dbeta) eps.deriv = get(".eps.deriv", env) if(only2){ # we update everything needed nb_cluster_all = nb_cluster_all[1:2] dum_vector = dum_vector[1:(2*nrow(jacob.mat))] } Q = length(nb_cluster_all) if(Q == 2){ setup_poisson_fixedcost(env) info = get(".fixedCostPoisson", env) res <- cpp_derivconv_acc_2(iterMax = iterMax, diffMax = eps.deriv, n_vars = n_vars, nb_cluster_all = nb_cluster_all, n_cells = info$n_cells, index_i = info$index_i, index_j = info$index_j, order = info$order, ll_d2 = ll_d2, jacob_vector = jacob_vector, deriv_init_vector = deriv_init_vector, dum_vector = dum_vector) } else { res <- cpp_derivconv_acc_gnl(iterMax = iterMax, diffMax = eps.deriv, n_vars = n_vars, nb_cluster_all = nb_cluster_all, ll_d2 = ll_d2, jacob_vector = jacob_vector, deriv_init_vector = deriv_init_vector, dum_vector = dum_vector) } return(list(dxi_dbeta = res$dxi_dbeta, iter = res$iter)) } #### #### Misc FE #### #### setup_poisson_fixedcost = function(env){ # We set up only one if(".fixedCostPoisson" %in% names(env)){ return(NULL) } ptm = proc.time() dum_all = get(".dum_all",env) dum_A = as.integer(dum_all[[1]]) dum_B = as.integer(dum_all[[2]]) myOrder = order(dum_A, dum_B) index_i = dum_A[myOrder] - 1L index_j = dum_B[myOrder] - 1L n_cells = get_n_cells(index_i, index_j) res = list(n_i = max(dum_A), n_j = max(dum_B), n_cells = n_cells, index_i = index_i, index_j = index_j, order = myOrder - 1L) assign(".fixedCostPoisson", res, env) verbose = get(".verbose", env) if(verbose >= 2) cat("Poisson fixed-cost setup: ", (proc.time()-ptm)[3], "s\n", sep = "") } setup_gaussian_fixedcost = function(env){ # We set up only one if(".fixedCostGaussian" %in% names(env)){ return(NULL) } ptm = proc.time() lhs = get(".lhs", env) invTableCluster_vector = get(".invTableCluster", env) dum_vector = get(".dum_vector", env) # already minus 1 dum_all = get(".dum_all", env) dum_i = as.integer(dum_all[[1]]) dum_j = as.integer(dum_all[[2]]) n_i = max(dum_i) n_j = max(dum_j) myOrder = order(dum_i, dum_j) index_i = dum_i[myOrder] - 1L index_j = dum_j[myOrder] - 1L n_cells = get_n_cells(index_i, index_j) res = cpp_fixed_cost_gaussian(n_i, n_cells, index_i, index_j, myOrder - 1L, invTableCluster_vector, dum_vector) res$n_i = n_i res$n_j = n_j res$n_cells = n_cells assign(".fixedCostGaussian", res, env) verbose = get(".verbose", env) if(verbose >= 2) cat("Gaussian fixed-cost setup: ", (proc.time()-ptm)[3], "s\n", sep = "") } #### #### Parallel Functions #### #### # In this section, we create all the functions that will be parallelized rpar_exp = function(x, env){ # fast exponentiation isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # simple exponentiation return(exp(x)) } else { # parallelized one return(cpppar_exp(x, FENmlm_CORES)) } } rpar_log = function(x, env){ # fast log isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # simple log return(log(x)) } else { # parallelized one return(cpppar_log(x, FENmlm_CORES)) } } rpar_lgamma = function(x, env){ # fast lgamma isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # lgamma via cpp is faster return(cpp_lgamma(x)) } else { # parallelized one return(cpppar_lgamma(x, FENmlm_CORES)) } } rpar_digamma = function(x, env){ isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # digamma via cpp is as fast => no need return(digamma(x)) } else { # parallelized one return(cpppar_digamma(x, FENmlm_CORES)) } } rpar_trigamma = function(x, env){ isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # trigamma via cpp is as fast => no need return(trigamma(x)) } else { # parallelized one return(cpppar_trigamma(x, FENmlm_CORES)) } } rpar_log_a_exp = function(a, mu, exp_mu, env){ # compute log_a_exp in a fast way isMulticore = get(".isMulticore", env) FENmlm_CORES = get(".CORES", env) if(!isMulticore){ # cpp is faster return(cpp_log_a_exp(a, mu, exp_mu)) } else { # parallelized one return(cpppar_log_a_exp(FENmlm_CORES, a, mu, exp_mu)) } }
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/browse.struct.R \name{deparseCalls} \alias{deparseCalls} \title{Pull Out Deparsed Calls From Objects} \usage{ deparseCalls(x, ...) } \value{ character the deparsed calls } \description{ Used primarily as a debugging tool, should probably be migrated to use \code{`\link{extractItems}`} } \keyword{internal}
/man/deparseCalls.Rd
no_license
loerasg/unitizer
R
false
false
394
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/browse.struct.R \name{deparseCalls} \alias{deparseCalls} \title{Pull Out Deparsed Calls From Objects} \usage{ deparseCalls(x, ...) } \value{ character the deparsed calls } \description{ Used primarily as a debugging tool, should probably be migrated to use \code{`\link{extractItems}`} } \keyword{internal}
library("dplyr") library("readr") library("tximport") library("devtools") library("SummarizedExperiment") load_all("../seqUtils/") load_all("analysis/housekeeping/") #Import Ensembl quant results for references ensembl_quants = readRDS("results/SummarizedExperiments/salmonella_salmon_Ensembl_87.rds") sample_names = colnames(ensembl_quants) #Iterate over annotations annotations = c("txrevise.grp_1_promoters","txrevise.grp_2_promoters") annotation_list = idVectorToList(annotations) #Make lists of file names file_names = purrr::map(annotation_list, ~setNames(file.path("processed/salmonella/salmon/",., sample_names, "quant.sf"), sample_names)) #Import all transcript abundances tx_abundances = purrr::map(file_names, ~tximport(., type = "salmon", txOut = TRUE, importer = read_tsv, dropInfReps = TRUE)) tx_transposed = purrr::transpose(tx_abundances) #Extract abundances, counts and lengths abundances = purrr::reduce(tx_transposed$abundance, rbind) counts = purrr::reduce(tx_transposed$counts, rbind) lengths = purrr::reduce(tx_transposed$counts, rbind) #Extract gene ids from event names gene_meta = tbl_df2(rowData(ensembl_quants)) %>% dplyr::select(gene_id, gene_name, chr, strand, start, end) %>% unique() gene_names = data_frame(transcript_id = rownames(abundances)) %>% tidyr::separate(transcript_id, c("ensembl_gene_id", "group", "position", "ensembl_transcript_id"), "\\.", remove = FALSE) %>% dplyr::mutate(gene_id = paste(ensembl_gene_id, position, sep = ".")) %>% dplyr::mutate(group_id = paste(ensembl_gene_id, group, position, sep = ".")) %>% dplyr::filter(ensembl_gene_id %in% gene_meta$gene_id) %>% dplyr::left_join(gene_meta, gene_meta, by = c("ensembl_gene_id" = "gene_id")) %>% dplyr::mutate(strand = ifelse(strand == 1, "+","-")) %>% dplyr::select(-group, -position) %>% as.data.frame() rownames(gene_names) = gene_names$transcript_id #Filter quants abundances_filtered = abundances[gene_names$transcript_id,] counts_filtered = counts[gene_names$transcript_id,] lengths_filtered = lengths[gene_names$transcript_id,] #Calculate abundance ratios gene_name_map = dplyr::transmute(gene_names, gene_id = group_id, transcript_id) abundance_ratios = calculateTranscriptRatios(abundances_filtered, gene_name_map) #Construct a SummarizedExperiment object se = SummarizedExperiment::SummarizedExperiment( assays = list(counts = counts_filtered, tpms = abundances_filtered, relLengths = lengths_filtered, tpm_ratios = abundance_ratios), colData = colData(ensembl_quants), rowData = gene_names) saveRDS(se, "results/SummarizedExperiments/salmonella_salmon_txrevise_promoters.rds")
/analysis/munge/salmonella_importTxrevisePromoters.R
permissive
kauralasoo/macrophage-tuQTLs
R
false
false
2,703
r
library("dplyr") library("readr") library("tximport") library("devtools") library("SummarizedExperiment") load_all("../seqUtils/") load_all("analysis/housekeeping/") #Import Ensembl quant results for references ensembl_quants = readRDS("results/SummarizedExperiments/salmonella_salmon_Ensembl_87.rds") sample_names = colnames(ensembl_quants) #Iterate over annotations annotations = c("txrevise.grp_1_promoters","txrevise.grp_2_promoters") annotation_list = idVectorToList(annotations) #Make lists of file names file_names = purrr::map(annotation_list, ~setNames(file.path("processed/salmonella/salmon/",., sample_names, "quant.sf"), sample_names)) #Import all transcript abundances tx_abundances = purrr::map(file_names, ~tximport(., type = "salmon", txOut = TRUE, importer = read_tsv, dropInfReps = TRUE)) tx_transposed = purrr::transpose(tx_abundances) #Extract abundances, counts and lengths abundances = purrr::reduce(tx_transposed$abundance, rbind) counts = purrr::reduce(tx_transposed$counts, rbind) lengths = purrr::reduce(tx_transposed$counts, rbind) #Extract gene ids from event names gene_meta = tbl_df2(rowData(ensembl_quants)) %>% dplyr::select(gene_id, gene_name, chr, strand, start, end) %>% unique() gene_names = data_frame(transcript_id = rownames(abundances)) %>% tidyr::separate(transcript_id, c("ensembl_gene_id", "group", "position", "ensembl_transcript_id"), "\\.", remove = FALSE) %>% dplyr::mutate(gene_id = paste(ensembl_gene_id, position, sep = ".")) %>% dplyr::mutate(group_id = paste(ensembl_gene_id, group, position, sep = ".")) %>% dplyr::filter(ensembl_gene_id %in% gene_meta$gene_id) %>% dplyr::left_join(gene_meta, gene_meta, by = c("ensembl_gene_id" = "gene_id")) %>% dplyr::mutate(strand = ifelse(strand == 1, "+","-")) %>% dplyr::select(-group, -position) %>% as.data.frame() rownames(gene_names) = gene_names$transcript_id #Filter quants abundances_filtered = abundances[gene_names$transcript_id,] counts_filtered = counts[gene_names$transcript_id,] lengths_filtered = lengths[gene_names$transcript_id,] #Calculate abundance ratios gene_name_map = dplyr::transmute(gene_names, gene_id = group_id, transcript_id) abundance_ratios = calculateTranscriptRatios(abundances_filtered, gene_name_map) #Construct a SummarizedExperiment object se = SummarizedExperiment::SummarizedExperiment( assays = list(counts = counts_filtered, tpms = abundances_filtered, relLengths = lengths_filtered, tpm_ratios = abundance_ratios), colData = colData(ensembl_quants), rowData = gene_names) saveRDS(se, "results/SummarizedExperiments/salmonella_salmon_txrevise_promoters.rds")
## This R script consist of a pair of functions that cache the inverse of a matrix and serves as assignment 2 for the R Programming Coursera course. ## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(m = matrix()) { n <- NULL set <- function(y) { m <<- y n <<- NULL } get <- function() m setInverse <- function(solve) n <<- solve getInverse <- function() n list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) } ## This function computes the inverse of the special "matrix" returned by makeCacheMatrix above. If the inverse has already been calculated (and the matrix has not changed), then the cachesolve should retrieve the inverse from the cache. cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' n <- x$getInverse() if(!is.null(n)) { message("getting cached data") return(n) } data <- x$get() n <- solve(data, ...) x$setInverse(n) n }
/cachematrix.R
no_license
Janssen123/ProgrammingAssignment2
R
false
false
1,010
r
## This R script consist of a pair of functions that cache the inverse of a matrix and serves as assignment 2 for the R Programming Coursera course. ## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(m = matrix()) { n <- NULL set <- function(y) { m <<- y n <<- NULL } get <- function() m setInverse <- function(solve) n <<- solve getInverse <- function() n list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) } ## This function computes the inverse of the special "matrix" returned by makeCacheMatrix above. If the inverse has already been calculated (and the matrix has not changed), then the cachesolve should retrieve the inverse from the cache. cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' n <- x$getInverse() if(!is.null(n)) { message("getting cached data") return(n) } data <- x$get() n <- solve(data, ...) x$setInverse(n) n }
state.trends <- read.csv("~/Desktop/Tables/seasonal trends/state_trends.csv") state.meta <- read.csv("~/Desktop/Tables/seasonal trends/state_meta.csv") state.data <- read.csv("~/Desktop/Tables/seasonal trends/state_data.csv") # class(state.trends$State) <- 'integer' # class(state.meta$State) <- 'integer' state.trends <- merge(state.trends, state.meta) winter.blue <- "#00c8ff" spring.green <- "#8fdf26" summer.red <- "#e02d1f" fall.orange <- "#fba924" xvals <- 0:44 szns <- unique(state.trends$Season) stateNums <- unique(state.trends$State) slp <- c() yvals <- c() #pdf("~/Desktop/Plots/Seasonal State Warming Trends 2015-01-22.pdf", width=8, height=6) for ( st in stateNums ) { stateName <- unique(subset(state.trends, State==st)$StateName) #pdf(paste0("~/Desktop/Plots/Seasonal State Warming Trends/Seasonal_State_Trends_PMA_out/Seasons-2015-12-11/",stateName,".pdf"), width=10, height=6) pdf(paste0("~/Desktop/Plots/Seasonal State Warming Trends/Seasonal_State_Trends_PMA_out/Grids-2015-12-11/",stateName,".pdf"), width=10, height=6) rm(yvals) yvals <- c() for ( szn in szns ) { rm(slp) slp <- subset(state.trends, State==st & Season==szn)$Slope[1] yvals <- cbind(yvals, slp*xvals) } min.slp <- min(c(0, yvals[45,])) max.slp <- max(yvals[45,]) colnames(yvals) <- szns # plot(xvals, yvals[,1], type = 'n', ylim=c(min(yvals),max(yvals)), main = paste(stateName, 'trends')) # plot(xvals, yvals[,1], xlab="Number of Years since 1970", ylab="Average Temperature Increase since 1970", type = 'n', ylim=c(-0.5,4.0), main = paste(stateName, 'trends')) # plot(xvals, yvals[,1], xlab='', ylab='', type = 'n', ylim=c(-0.5,4.0), axes=F, bty='n') plot(xvals, yvals[,1], xlab='', ylab='', type = 'n', ylim=c(min.slp, max.slp), axes=F, bty='n') # axis(2, las=1, col.axis="#cacaca", font=2, tcl=0, lty='blank') # grid(nx=NA, ny=NULL, lwd=4, lty="11") # winter blue # spring green # summer red # fall orange lines(xvals, yvals[,"SON"], col=fall.orange, lwd=8) lines(xvals, yvals[,"JJA"], col=summer.red, lwd=8) lines(xvals, yvals[,"MAM"], col=spring.green, lwd=8) lines(xvals, yvals[,"DJF"], col=winter.blue, lwd=8) # legend(0, 3.5, c("Winter", "Spring", "Summer", "Fall"), lwd=4, col = c(winter.blue, spring.green, summer.red, fall.orange)) dev.off() } #dev.off() ### For interactive... steepest <- reshape(state.trends, v.names = c("Slope","Intercept","P_value"), idvar = "StateAbb", timevar = "Season", direction = "wide") steepest$littleAbb <- tolower(steepest$StateAbb) steepest$steepest <- NA for (i in 1:nrow(steepest)) { steepest$steepest[i] <- which.max(c(steepest$Slope.DJF[i], steepest$Slope.MAM[i], steepest$Slope.JJA[i], steepest$Slope.SON[i])) } write.csv(steepest, "~/Desktop/Tables/steepest_seasonal_trends.csv") # Shared https://docs.google.com/a/climatecentral.org/spreadsheets/d/1DENPCNumWl3m9JQqrAzeA8GMgGOKYC7BByLfPyuzKUE/edit?usp=sharing
/state avgt seasonal trends since 1970 2015-12-11.r
no_license
bronzan/global-shifting-cities
R
false
false
2,954
r
state.trends <- read.csv("~/Desktop/Tables/seasonal trends/state_trends.csv") state.meta <- read.csv("~/Desktop/Tables/seasonal trends/state_meta.csv") state.data <- read.csv("~/Desktop/Tables/seasonal trends/state_data.csv") # class(state.trends$State) <- 'integer' # class(state.meta$State) <- 'integer' state.trends <- merge(state.trends, state.meta) winter.blue <- "#00c8ff" spring.green <- "#8fdf26" summer.red <- "#e02d1f" fall.orange <- "#fba924" xvals <- 0:44 szns <- unique(state.trends$Season) stateNums <- unique(state.trends$State) slp <- c() yvals <- c() #pdf("~/Desktop/Plots/Seasonal State Warming Trends 2015-01-22.pdf", width=8, height=6) for ( st in stateNums ) { stateName <- unique(subset(state.trends, State==st)$StateName) #pdf(paste0("~/Desktop/Plots/Seasonal State Warming Trends/Seasonal_State_Trends_PMA_out/Seasons-2015-12-11/",stateName,".pdf"), width=10, height=6) pdf(paste0("~/Desktop/Plots/Seasonal State Warming Trends/Seasonal_State_Trends_PMA_out/Grids-2015-12-11/",stateName,".pdf"), width=10, height=6) rm(yvals) yvals <- c() for ( szn in szns ) { rm(slp) slp <- subset(state.trends, State==st & Season==szn)$Slope[1] yvals <- cbind(yvals, slp*xvals) } min.slp <- min(c(0, yvals[45,])) max.slp <- max(yvals[45,]) colnames(yvals) <- szns # plot(xvals, yvals[,1], type = 'n', ylim=c(min(yvals),max(yvals)), main = paste(stateName, 'trends')) # plot(xvals, yvals[,1], xlab="Number of Years since 1970", ylab="Average Temperature Increase since 1970", type = 'n', ylim=c(-0.5,4.0), main = paste(stateName, 'trends')) # plot(xvals, yvals[,1], xlab='', ylab='', type = 'n', ylim=c(-0.5,4.0), axes=F, bty='n') plot(xvals, yvals[,1], xlab='', ylab='', type = 'n', ylim=c(min.slp, max.slp), axes=F, bty='n') # axis(2, las=1, col.axis="#cacaca", font=2, tcl=0, lty='blank') # grid(nx=NA, ny=NULL, lwd=4, lty="11") # winter blue # spring green # summer red # fall orange lines(xvals, yvals[,"SON"], col=fall.orange, lwd=8) lines(xvals, yvals[,"JJA"], col=summer.red, lwd=8) lines(xvals, yvals[,"MAM"], col=spring.green, lwd=8) lines(xvals, yvals[,"DJF"], col=winter.blue, lwd=8) # legend(0, 3.5, c("Winter", "Spring", "Summer", "Fall"), lwd=4, col = c(winter.blue, spring.green, summer.red, fall.orange)) dev.off() } #dev.off() ### For interactive... steepest <- reshape(state.trends, v.names = c("Slope","Intercept","P_value"), idvar = "StateAbb", timevar = "Season", direction = "wide") steepest$littleAbb <- tolower(steepest$StateAbb) steepest$steepest <- NA for (i in 1:nrow(steepest)) { steepest$steepest[i] <- which.max(c(steepest$Slope.DJF[i], steepest$Slope.MAM[i], steepest$Slope.JJA[i], steepest$Slope.SON[i])) } write.csv(steepest, "~/Desktop/Tables/steepest_seasonal_trends.csv") # Shared https://docs.google.com/a/climatecentral.org/spreadsheets/d/1DENPCNumWl3m9JQqrAzeA8GMgGOKYC7BByLfPyuzKUE/edit?usp=sharing
# Ensure the out put is English Sys.setlocale("LC_ALL", "en_US.UTF-8") power <- read.table('power.data') png(filename='plot3.png') power$dt <- strptime(paste(power$Date, power$Time, sep = " "), "%d/%m/%Y %H:%M:%S") plot( power$dt, power$Sub_metering_1, type='l', xlab='', ylab='Energy sub metering') lines(power$dt, power$Sub_metering_2, col='red') lines(power$dt, power$Sub_metering_3, col='blue') legend('topright', legend=c('Sub_metering_1', 'Sub_metering_2', 'Sub_metering_3'), col=c('black', 'red', 'blue'), lty='solid') dev.off()
/plot3.R
no_license
gatorliu/ExData_Plotting1
R
false
false
580
r
# Ensure the out put is English Sys.setlocale("LC_ALL", "en_US.UTF-8") power <- read.table('power.data') png(filename='plot3.png') power$dt <- strptime(paste(power$Date, power$Time, sep = " "), "%d/%m/%Y %H:%M:%S") plot( power$dt, power$Sub_metering_1, type='l', xlab='', ylab='Energy sub metering') lines(power$dt, power$Sub_metering_2, col='red') lines(power$dt, power$Sub_metering_3, col='blue') legend('topright', legend=c('Sub_metering_1', 'Sub_metering_2', 'Sub_metering_3'), col=c('black', 'red', 'blue'), lty='solid') dev.off()
rm(list=ls()) library(readxl) library(lubridate) library(openxlsx) library(ggplot2) library(tidyverse) library(gridExtra) library(data.table) library(MASS) library(randomForest) library(ranger) library(rfinterval) library(gganimate) library(mgcv) library(leaps) library(usmap) library(caret) library(dataRetrieval) library(tidyverse) library(tidyquant) library(timetk) library(sweep) library(forecast) library(ggmap) library(fiftystater) library(sf) dir <- "C:/Users/Sasa/Documents/Blog/09_police_deaths/" input <- paste0(dir, "input/") output <- paste0(dir, "output/") dat <- readRDS(paste0(input, "master.RDS")) min_pop <- distinct(dat, dat$subject_race_imp, dat$min_pop) %>% filter(!is.na(`dat$min_pop`)) colnames(min_pop) <- c("race", "pop") min_pop <- min_pop %>% filter(race != "white") tot_min_pop = sum(min_pop$pop) dat <- dat %>% mutate(minority = ifelse(subject_race_imp == "white", "White", "Minority"), police_killing = ifelse(cause_of_death == "Asphyxiated/Restrained" | cause_of_death == "Beaten/Bludgeoned with instrument" | cause_of_death == "Chemical agent/Pepper spray" | cause_of_death == "Gunshot" | cause_of_death == "Tasered", 1, 0), latitude = as.numeric(latitude), longitude = as.numeric(longitude), csa_name = as.character(csa_name), min_pop = as.numeric(as.character(min_pop)), oth_pop = ifelse(minority == "Minority", tot_min_pop, min_pop)) %>% rename(race = subject_race_imp) %>% mutate(race = ifelse(race == "asian", "Asian", ifelse(race == "black", "Black", ifelse(race == "latino", "Hispanic", ifelse(race == "native", "Native \n\r American", ifelse(race == "white", "White", NA)))))) dat_race <- dat %>% group_by(race) %>% summarize(count = sum(police_killing, na.rm = T), pop = max(min_pop)) %>% mutate(death_rate = count/pop) %>% filter(!is.na(death_rate)) p <- ggplot(data = dat_race, aes(x = race)) + geom_bar(aes(weight = death_rate)) + theme_classic() + scale_y_continuous(expand = c(0, 0), labels = scales::percent) + xlab("Race") + ylab("Police Killing Rate") + ggtitle("Police Killing Rate by Race") + theme(plot.title = element_text(hjust = 0.5)) ggsave(paste0(output, "killing_rate_race.png"),p)
/03_bar_chart.R
no_license
smsarkar1994/police_killings
R
false
false
2,590
r
rm(list=ls()) library(readxl) library(lubridate) library(openxlsx) library(ggplot2) library(tidyverse) library(gridExtra) library(data.table) library(MASS) library(randomForest) library(ranger) library(rfinterval) library(gganimate) library(mgcv) library(leaps) library(usmap) library(caret) library(dataRetrieval) library(tidyverse) library(tidyquant) library(timetk) library(sweep) library(forecast) library(ggmap) library(fiftystater) library(sf) dir <- "C:/Users/Sasa/Documents/Blog/09_police_deaths/" input <- paste0(dir, "input/") output <- paste0(dir, "output/") dat <- readRDS(paste0(input, "master.RDS")) min_pop <- distinct(dat, dat$subject_race_imp, dat$min_pop) %>% filter(!is.na(`dat$min_pop`)) colnames(min_pop) <- c("race", "pop") min_pop <- min_pop %>% filter(race != "white") tot_min_pop = sum(min_pop$pop) dat <- dat %>% mutate(minority = ifelse(subject_race_imp == "white", "White", "Minority"), police_killing = ifelse(cause_of_death == "Asphyxiated/Restrained" | cause_of_death == "Beaten/Bludgeoned with instrument" | cause_of_death == "Chemical agent/Pepper spray" | cause_of_death == "Gunshot" | cause_of_death == "Tasered", 1, 0), latitude = as.numeric(latitude), longitude = as.numeric(longitude), csa_name = as.character(csa_name), min_pop = as.numeric(as.character(min_pop)), oth_pop = ifelse(minority == "Minority", tot_min_pop, min_pop)) %>% rename(race = subject_race_imp) %>% mutate(race = ifelse(race == "asian", "Asian", ifelse(race == "black", "Black", ifelse(race == "latino", "Hispanic", ifelse(race == "native", "Native \n\r American", ifelse(race == "white", "White", NA)))))) dat_race <- dat %>% group_by(race) %>% summarize(count = sum(police_killing, na.rm = T), pop = max(min_pop)) %>% mutate(death_rate = count/pop) %>% filter(!is.na(death_rate)) p <- ggplot(data = dat_race, aes(x = race)) + geom_bar(aes(weight = death_rate)) + theme_classic() + scale_y_continuous(expand = c(0, 0), labels = scales::percent) + xlab("Race") + ylab("Police Killing Rate") + ggtitle("Police Killing Rate by Race") + theme(plot.title = element_text(hjust = 0.5)) ggsave(paste0(output, "killing_rate_race.png"),p)