Gone with the Wind (1939)
Grade: 93
"Gone with the Wind" is perhaps the most successful film of all time. It was the top grossing film until at least "The Sound of Music", some thirty years of inflation later. The story, and the characters, have become a part of American cultural heritage.
The story begins in Georgia, just prior to the Civil War. Beautiful and spoiled Scarlett O'Hara (Vivien Leigh) schemes to win the love of the honorable Ashley Wilkes (Leslie Howard), who is engaged to his saintly cousin Melanie (Olivia De Havilland). Scarlett fails in this effort, but wins the admiration of dashing scoundrel Rhett Butler (Clark Gable).
Ashley marries Melanie, then goes off to fight the Civil War. Scarlett moves to Atlanta to be with Melanie and wait for Ashley's return. Eventually, Union troops siege and capture Atlanta, forcing Scarlett, Melanie, and her newborn baby to flee to Scarlett's home at Tara, which has been impoverished by looting Federal troops.
After much humiliation and unethical behavior, Scarlett rebuilds Tara and becomes a wealthy businesswoman. She marries Rhett and has a daughter, but her marriage is stormy.
Is "Gone with the Wind" pro-slavery? In the pre-war scenes, blacks seem content with their lot, and show devotion to the white "masters" that control their lives. Pork (Oscar Polk) is a shuffling, slow-talking stereotype. Prissy (Butterfly McQueen) is described by Rhett as a "simple-minded darky".
But to its credit, "Gone with the Wind" has two very strong and positive roles. The characters listen with respect to Mammy (Hattie McDaniel), whose straightforward comments make for sage advice. McDaniel won Best Supporting Actress, an outstanding achievement during an era of segregation. Big Sam (Everett Brown) shows great courage rescuing Scarlett from grave danger.
However, my favorite supporting character is Scarlett's exuberant first husband Charles Hamilton (Rand Brooks). Also, Aunt Pittypat (Laura Hope Crews) gives an excellent comic-relief performance.
"Gone with the Wind" also won major Oscars for Best Screenplay (Sidney Howard), Best Actress (Scarlett O'Hara), Best Color Cinematography, Best Director, and Best Picture. Fleming was credited as director, although four directors were used. This was a clean sweep of all major awards except Best Actor, which passed over Clark Gable. (Vivien Leigh's husband, Laurence Olivier, was also nominated, for "Wuthering Heights." The winner that year was Robert Donat).
"Gone with the Wind" clocks in at 222 minutes, more than twice the length of an typical film from 1939. The story does sag once or twice, but only in comparison with its best parts. The film peaks midway, during the siege of Atlanta. The film's best action scenes are here, and the devastation war is clearly demonstrated by the horrific hospital scenes and acres of wounded soldiers.
The film picks up again during a postwar sequence loaded with suspense. Scarlett has narrowly escaped an attack on her by lowlifes in a shantytown. A dangerous vigilante action is then taken by the men in Scarlett's life, while their wives wait anxiously for their return.
Scarlett O'Hara, the central character, is shrewd, manipulating, and selfish. She is despised by most of the other female characters. Yet she is presented to the audience clearly as a heroine. Women identify with her determination, and she shows positive traits helping Melanie to deliver her baby, and saving and rebuilding Tara after the war.
Rhett Butler is a self-proclaimed scoundrel, but he keeps performing heroic actions that contradict what he says, just as his love for Scarlett shows despite his frequent cruelty to her. Although he enjoys adventures apart from Scarlett, one of the film's recurrent themes is his return to her, and his determination to have her love him more than Ashley.
One wonders at first viewing why Melanie is so nice to Scarlett, who constantly schemes to steal Ashley from her. But Melanie does not view Scarlett as a threat, and perhaps she loves her more than Scarlett loves Ashley.
Of course, "Gone with the Wind" is a costume epic and a soap opera. Because of its genre, and its strong appeal to women (the story is told through Vivien Leigh's character), there are naysayers (mostly men) who dislike the movie. But there is no doubt that it an outstanding film. If the costumes, the cinematography, and the script aren't enough to convince (which they certainly should be), the leading characters are extremely interesting and well defined.
<EMAIL_ADDRESS>http://members.tripod.com/~Brian_Koller/movies.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- title: Engineering salaries revisited author: Mikael Lundqvist date: '2020-04-16' slug: engineering-salaries-revisited categories: - R tags: - plot - R Markdown - regression ---
For a couple of posts, I have analysed what predictors affect the education level in Sweden. In this post, I will return to analysing the salary of engineers and I will try to use my experiences from studying the education level.
Statistics Sweden use NUTS (Nomenclature des Unités Territoriales Statistiques), which is the EU’s hierarchical regional division, to specify the regions.
Please send suggestions for improvement of the analysis to<EMAIL_ADDRESS>First, define libraries and functions.
library (tidyverse)
## -- Attaching packages -------------------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.2.1 v purrr 0.3.3
## v tibble 2.1.3 v dplyr 0.8.3
## v tidyr 1.0.2 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.4.0
## -- Conflicts ----------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library (broom)
library (car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
## The following object is masked from 'package:purrr':
##
## some
library (sjPlot)
## Registered S3 methods overwritten by 'lme4':
## method from
## cooks.distance.influence.merMod car
## influence.merMod car
## dfbeta.influence.merMod car
## dfbetas.influence.merMod car
library (leaps)
library (MASS)
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
library (earth)
## Warning: package 'earth' was built under R version 3.6.3
## Loading required package: Formula
## Loading required package: plotmo
## Warning: package 'plotmo' was built under R version 3.6.3
## Loading required package: plotrix
## Loading required package: TeachingDemos
## Warning: package 'TeachingDemos' was built under R version 3.6.3
library (lspline)
## Warning: package 'lspline' was built under R version 3.6.3
library (boot)
##
## Attaching package: 'boot'
## The following object is masked from 'package:car':
##
## logit
library (faraway)
##
## Attaching package: 'faraway'
## The following objects are masked from 'package:boot':
##
## logit, melanoma
## The following objects are masked from 'package:car':
##
## logit, vif
library (arm)
## Warning: package 'arm' was built under R version 3.6.3
## Loading required package: Matrix
##
## Attaching package: 'Matrix'
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
## Loading required package: lme4
##
## arm (Version 1.10-1, built: 2018-4-12)
## Working directory is C:/R/rblog/content/post
##
## Attaching package: 'arm'
## The following objects are masked from 'package:faraway':
##
## fround, logit, pfround
## The following object is masked from 'package:boot':
##
## logit
## The following object is masked from 'package:plotrix':
##
## rescale
## The following object is masked from 'package:car':
##
## logit
library (caret)
## Warning: package 'caret' was built under R version 3.6.3
## Loading required package: lattice
##
## Attaching package: 'lattice'
## The following object is masked from 'package:faraway':
##
## melanoma
## The following object is masked from 'package:boot':
##
## melanoma
##
## Attaching package: 'caret'
## The following object is masked from 'package:purrr':
##
## lift
library (recipes)
## Warning: package 'recipes' was built under R version 3.6.3
##
## Attaching package: 'recipes'
## The following object is masked from 'package:stringr':
##
## fixed
## The following object is masked from 'package:stats':
##
## step
library (vip)
## Warning: package 'vip' was built under R version 3.6.3
##
## Attaching package: 'vip'
## The following object is masked from 'package:utils':
##
## vi
library (pdp)
## Warning: package 'pdp' was built under R version 3.6.3
##
## Attaching package: 'pdp'
## The following object is masked from 'package:faraway':
##
## pima
## The following object is masked from 'package:purrr':
##
## partial
library (PerformanceAnalytics)
## Warning: package 'PerformanceAnalytics' was built under R version 3.6.3
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
##
## legend
library (ggpubr)
## Warning: package 'ggpubr' was built under R version 3.6.3
## Loading required package: magrittr
##
## Attaching package: 'magrittr'
## The following object is masked from 'package:purrr':
##
## set_names
## The following object is masked from 'package:tidyr':
##
## extract
library (glmnet)
## Warning: package 'glmnet' was built under R version 3.6.3
## Loaded glmnet 3.0-2
library (rpart)
##
## Attaching package: 'rpart'
## The following object is masked from 'package:faraway':
##
## solder
library (ipred)
## Warning: package 'ipred' was built under R version 3.6.3
readfile <- function (file1){read_csv (file1, col_types = cols(), locale = readr::locale (encoding = "latin1"), na = c("..", "NA")) %>%
gather (starts_with("19"), starts_with("20"), key = "year", value = groupsize) %>%
drop_na() %>%
mutate (year_n = parse_number (year))
}
perc_women <- function(x){
ifelse (length(x) == 2, x[2] / (x[1] + x[2]), NA)
}
nuts <- read.csv("nuts.csv") %>%
mutate(NUTS2_sh = substr(NUTS2, 3, 4))
nuts %>%
distinct (NUTS2_en) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Nomenclature des Unités Territoriales Statistiques (NUTS)')
| NUTS2_en |
|---|
| SE11 Stockholm |
| SE12 East-Central Sweden |
| SE21 Småland and islands |
| SE22 South Sweden |
| SE23 West Sweden |
| SE31 North-Central Sweden |
| SE32 Central Norrland |
| SE33 Upper Norrland |
bs <- function(formula, data, indices) {
d <- data[indices,] # allows boot to select sample
fit <- lm(formula, weights = tbnum_weights, data=d)
return(coef(fit))
}
The data tables are downloaded from Statistics Sweden. They are saved as a comma-delimited file without heading, UF0506A1.csv, http://www.statistikdatabasen.scb.se/pxweb/en/ssd/.
The tables:
UF0506A1_1.csv: Population 16-74 years of age by region, highest level of education, age and sex. Year 1985 - 2018 NUTS 2 level 2008- 10 year intervals (16-74)
000000CG_1: Average basic salary, monthly salary and women´s salary as a percentage of men´s salary by region, sector, occupational group (SSYK 2012) and sex. Year 2014 - 2018 Monthly salary All sectors.
000000CD_1.csv: Average basic salary, monthly salary and women´s salary as a percentage of men´s salary by region, sector, occupational group (SSYK 2012) and sex. Year 2014 - 2018 Number of employees All sectors-
The data is aggregated, the size of each group is in the column groupsize.
I have also included some calculated predictors from the original data.
perc_women: The percentage of women within each group defined by edulevel, region and year
perc_women_region: The percentage of women within each group defined by year and region
regioneduyears: The average number of education years per capita within each group defined by sex, year and region
eduquotient: The quotient between regioneduyears for men and women
salaryquotient: The quotient between salary for men and women within each group defined by year and region
perc_women_eng_region: The percentage of women who are engineers within each group defined by year and region
numedulevel <- read.csv("edulevel_1.csv")
numedulevel[, 2] <- data.frame(c(8, 9, 10, 12, 13, 15, 22, NA))
tb <- readfile("000000CG_1.csv")
tb <- readfile("000000CD_1.csv") %>%
left_join(tb, by = c("region", "year", "sex", "sector","occuptional (SSYK 2012)")) %>%
filter(`occuptional (SSYK 2012)` == "214 Engineering professionals")
tb <- readfile("UF0506A1_1.csv") %>%
right_join(tb, by = c("region", "year", "sex")) %>%
right_join(numedulevel, by = c("level of education" = "level.of.education")) %>%
filter(!is.na(eduyears)) %>%
mutate(edulevel = `level of education`) %>%
group_by(edulevel, region, year, sex) %>%
mutate(groupsize_all_ages = sum(groupsize)) %>%
group_by(edulevel, region, year) %>%
mutate (perc_women = perc_women (groupsize_all_ages[1:2])) %>%
group_by (sex, year, region) %>%
mutate(regioneduyears = sum(groupsize * eduyears) / sum(groupsize)) %>%
mutate(regiongroupsize = sum(groupsize)) %>%
mutate(suming = groupsize.x) %>%
group_by(region, year) %>%
mutate (sum_pop = sum(groupsize)) %>%
mutate (perc_women_region = perc_women (regiongroupsize[1:2])) %>%
mutate (eduquotient = regioneduyears[2] / regioneduyears[1]) %>%
mutate (salary = groupsize.y) %>%
mutate (salaryquotient = salary[2] / salary[1]) %>%
mutate (perc_women_eng_region = perc_women(suming[1:2])) %>%
left_join(nuts %>% distinct (NUTS2_en, NUTS2_sh), by = c("region" = "NUTS2_en")) %>%
drop_na()
## Warning: Column `level of education`/`level.of.education` joining character
## vector and factor, coercing into character vector
## Warning: Column `region`/`NUTS2_en` joining character vector and factor,
## coercing into character vector
summary(tb)
## region age level of education sex
## Length:532 Length:532 Length:532 Length:532
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## year groupsize year_n sector
## Length:532 Min. : 405 Min. :2014 Length:532
## Class :character 1st Qu.: 20996 1st Qu.:2015 Class :character
## Mode :character Median : 43656 Median :2016 Mode :character
## Mean : 64760 Mean :2016
## 3rd Qu.:102394 3rd Qu.:2017
## Max. :271889 Max. :2018
## occuptional (SSYK 2012) groupsize.x year_n.x groupsize.y
## Length:532 Min. : 340 Min. :2014 Min. :34700
## Class :character 1st Qu.: 1700 1st Qu.:2015 1st Qu.:40300
## Mode :character Median : 3000 Median :2016 Median :42000
## Mean : 5850 Mean :2016 Mean :42078
## 3rd Qu.: 7475 3rd Qu.:2017 3rd Qu.:43925
## Max. :21400 Max. :2018 Max. :49400
## year_n.y eduyears edulevel groupsize_all_ages
## Min. :2014 Min. : 8.00 Length:532 Min. : 405
## 1st Qu.:2015 1st Qu.: 9.00 Class :character 1st Qu.: 20996
## Median :2016 Median :12.00 Mode :character Median : 43656
## Mean :2016 Mean :12.71 Mean : 64760
## 3rd Qu.:2017 3rd Qu.:15.00 3rd Qu.:102394
## Max. :2018 Max. :22.00 Max. :271889
## perc_women regioneduyears regiongroupsize suming
## Min. :0.3575 Min. :11.18 Min. :128262 Min. : 340
## 1st Qu.:0.4338 1st Qu.:11.61 1st Qu.:288058 1st Qu.: 1700
## Median :0.4631 Median :11.74 Median :514608 Median : 3000
## Mean :0.4771 Mean :11.79 Mean :453318 Mean : 5850
## 3rd Qu.:0.5132 3rd Qu.:12.04 3rd Qu.:691870 3rd Qu.: 7475
## Max. :0.6423 Max. :12.55 Max. :827940 Max. :21400
## sum_pop perc_women_region eduquotient salary
## Min. : 262870 Min. :0.4831 Min. :1.019 Min. :34700
## 1st Qu.: 587142 1st Qu.:0.4882 1st Qu.:1.029 1st Qu.:40300
## Median :1029820 Median :0.4934 Median :1.034 Median :42000
## Mean : 906635 Mean :0.4923 Mean :1.034 Mean :42078
## 3rd Qu.:1395157 3rd Qu.:0.4970 3rd Qu.:1.041 3rd Qu.:43925
## Max. :1655215 Max. :0.5014 Max. :1.047 Max. :49400
## salaryquotient perc_women_eng_region NUTS2_sh
## Min. :0.8653 Min. :0.1566 Length:532
## 1st Qu.:0.9329 1st Qu.:0.1787 Class :character
## Median :0.9395 Median :0.2042 Mode :character
## Mean :0.9447 Mean :0.2039
## 3rd Qu.:0.9537 3rd Qu.:0.2216
## Max. :1.0446 Max. :0.2746
Prepare the data using Tidyverse recipes package, i.e. centre, scale and make sure all predictors are numerical.
tbtemp <- ungroup(tb) %>% dplyr::select(region, salary, year_n, regiongroupsize, sex, regioneduyears, suming, perc_women_region, salaryquotient, eduquotient, perc_women_eng_region)
tb_outliers_info <- unique(tbtemp)
tb_unique <- unique(dplyr::select(tbtemp, -region))
tbnum_weights <- tb_unique$suming
blueprint <- recipe(salary ~ ., data = tb_unique) %>%
step_nzv(all_nominal()) %>%
step_integer(matches("Qual|Cond|QC|Qu")) %>%
step_center(all_numeric(), -all_outcomes()) %>%
step_scale(all_numeric(), -all_outcomes()) %>%
step_dummy(all_nominal(), -all_outcomes(), one_hot = TRUE)
prepare <- prep(blueprint, training = tb_unique)
tbnum <- bake(prepare, new_data = tb_unique)
The correlation chart shows that many predictors are correlated with the response variable but also that many predictors are correlated between each other. The vif function also shows high multicollinearity. Some notable correlations are in a dedicated plot below.
chart.Correlation(tbnum, histogram = TRUE, pch = 19)
vif(tbnum)
## Warning in summary.lm(lm(object[, i] ~ object[, -i])): essentially perfect fit:
## summary may be unreliable
## Warning in summary.lm(lm(object[, i] ~ object[, -i])): essentially perfect fit:
## summary may be unreliable
## year_n regiongroupsize regioneduyears
## 4.665634 21.810910 14.478685
## suming perc_women_region salaryquotient
## 8.688599 8.259497 1.382593
## eduquotient perc_women_eng_region salary
## 12.400845 8.141404 8.359112
## sex_men sex_women
## Inf Inf
p1 <- tb %>%
ggscatter(x = "regiongroupsize", y = "perc_women_region",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson")
p2 <- tb %>%
ggscatter(x = "regiongroupsize", y = "perc_women_eng_region",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson")
p3 <- tb %>%
ggscatter(x = "regiongroupsize", y = "eduquotient",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson")
p4 <- tb %>%
ggscatter(x = "perc_women_region", y = "eduquotient",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson")
gridExtra::grid.arrange(p1, p2, p3, p4, ncol = 2)
The dataset only contains 76 rows. This together with multicollinearity limits the number of predictors to include in the regression. I would like to choose the predictors that best contains most information from the dataset with respect to the response.
I will use an elastic net to find the variable that contains the best signals for later use in the analysis. First I will search for the explanatory variables that best predict the response using no interactions. I will use 10-fold cross-validation with an elastic net. Elastic nets are linear and do not take into account the shape of the relations between the predictors. Alpha = 1 indicates a lasso regression.
X <- model.matrix(salary ~ ., tbnum)[, -1]
Y <- tbnum$salary
set.seed(123) # for reproducibility
cv_glmnet <- train(
x = X,
y = Y,
weights = tbnum_weights,
method = "glmnet",
preProc = c("zv", "center", "scale"),
trControl = trainControl(method = "cv", number = 10),
tuneLength = 20
)
## Warning in nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo, :
## There were missing values in resampled performance measures.
vip(cv_glmnet, num_features = 20, geom = "point")
cv_glmnet$bestTune
## alpha lambda
## 371 1 49.48132
elastic_min <- glmnet(
x = X,
y = Y,
alpha = 1
)
plot(elastic_min, xvar = "lambda", main = "Elastic net penalty\n\n")
Next, I will use an elastic net to find the variable that contains the best signals including interactions.
temp <- dplyr::select(tbnum, -salary)
f <- as.formula( ~ .*.)
X <- model.matrix(f, temp)[, -1]
Y <- tbnum$salary
set.seed(123) # for reproducibility
cv_glmnet <- train(
x = X,
y = Y,
weights = tbnum_weights,
method = "glmnet",
metric = "Rsquared",
maximize = TRUE,
preProc = c("zv", "center", "scale"),
trControl = trainControl(method = "cv", number = 10),
tuneLength = 30
)
## Warning in nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo, :
## There were missing values in resampled performance measures.
## Warning in train.default(x = X, y = Y, weights = tbnum_weights, method =
## "glmnet", : missing values found in aggregated results
vip(cv_glmnet, num_features = 20, geom = "point")
cv_glmnet$bestTune
## alpha lambda
## 758 0.8758621 4.280173
elastic_min <- glmnet(
x = X,
y = Y,
alpha = 0.9
)
plot(elastic_min, xvar = "lambda", main = "Elastic net penalty\n\n")
I use MARS to fit the best signals using from the elastic net using no interactions. Four predictors minimise the AIC while still ensuring that the coefficients are valid, testing them with bootstrap.
temp <- dplyr::select(tbnum, c(salary, year_n, sex_men, perc_women_region, suming))
mmod_scaled <- earth(salary ~ ., weights = tbnum_weights, data = temp, nk = 9, degree = 1)
summary (mmod_scaled)
## Call: earth(formula=salary~., data=temp, weights=tbnum_weights, degree=1, nk=9)
##
## coefficients
## (Intercept) 40889.888
## sex_men 1684.691
## h(0-year_n) -884.328
## h(year_n-0) 1673.931
## h(0.311813-perc_women_region) -1249.276
## h(perc_women_region-0.311813) 1754.546
## h(suming- -0.549566) 553.529
##
## Selected 7 of 8 terms, and 4 of 4 predictors
## Termination condition: Reached nk 9
## Importance: suming, year_n, perc_women_region, sex_men
## Weights: 21400, 6800, 11500, 3000, 2400, 500, 7000, 1900, 16000, 4100, 3...
## Number of terms at each degree of interaction: 1 6 (additive model)
## GCV<PHONE_NUMBER> RSS<PHONE_NUMBER>25 GRSq 0.9000639 RSq 0.9294851
plot (mmod_scaled)
plotmo (mmod_scaled)
## plotmo grid: year_n sex_men perc_women_region suming
## 0 0.5 0.2069953 -0.4539968
model_mmod_scale <- lm (salary ~
sex_men +
lspline(year_n, c(0)) +
lspline(perc_women_region, c(0.311813)) +
lspline(suming, c(-0.549566)),
weights = tbnum_weights,
data = tbnum)
b <- regsubsets(salary ~ sex_men + lspline(year_n, c(0)) + lspline(perc_women_region, c(0.311813)) + lspline(suming, c(-0.549566)) + lspline(suming, c(-1.22297)), data = tbnum, weights = tbnum_weights, nvmax = 12)
## Warning in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in =
## force.in, : 2 linear dependencies found
## Warning in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in =
## force.in, : nvmax reduced to 7
rs <- summary(b)
AIC <- 50 * log (rs$rss / 50) + (2:8) * 2
which.min (AIC)
## [1] 6
names (rs$which[6,])[rs$which[6,]]
## [1] "(Intercept)"
## [2] "sex_men"
## [3] "lspline(year_n, c(0))1"
## [4] "lspline(year_n, c(0))2"
## [5] "lspline(perc_women_region, c(0.311813))1"
## [6] "lspline(perc_women_region, c(0.311813))2"
## [7] "lspline(suming, c(-1.22297))2"
model_mmod_scale <- lm (salary ~
sex_men +
lspline(year_n, c(0)) +
lspline(perc_women_region, c(0.311813)) +
lspline(suming, c(-0.549566)),
weights = tbnum_weights,
data = tbnum)
summary (model_mmod_scale)$adj.r.squared
## [1] 0.9244956
AIC(model_mmod_scale)
## [1] 1258.423
set.seed(123)
results <- boot(data = tbnum, statistic = bs,
R = 1000, formula = as.formula(model_mmod_scale))
#conf = coefficient not passing through zero
summary (model_mmod_scale) %>% tidy() %>%
mutate(bootest = tidy(results)$statistic,
bootbias = tidy(results)$bias,
booterr = tidy(results)$std.error,
conf = !((tidy(confint(results))$X2.5.. < 0) & (tidy(confint(results))$X97.5.. > 0)))
## Warning in norm.inter(t, adj.alpha): extreme order statistics used as endpoints
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## Warning in norm.inter(t, adj.alpha): extreme order statistics used as endpoints
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## # A tibble: 8 x 9
## term estimate std.error statistic p.value bootest bootbias booterr conf
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <lgl>
## 1 (Interce~ 42276. 1260. 33.6 4.85e-44 42276. -105. 1344. TRUE
## 2 sex_men 1502. 299. 5.02 4.02e- 6 1502. 27.6 428. TRUE
## 3 lspline(~ 868. 164. 5.31 1.32e- 6 868. -78.3 354. TRUE
## 4 lspline(~ 1656. 159. 10.4 9.25e-16 1656. 58.4 352. TRUE
## 5 lspline(~ 1049. 274. 3.82 2.88e- 4 1049. 146. 327. TRUE
## 6 lspline(~ 1719. 161. 10.7 3.31e-16 1719. -155. 265. TRUE
## 7 lspline(~ 2979. 2084. 1.43 1.57e- 1 2979. -264. 2216. FALSE
## 8 lspline(~ 603. 129. 4.66 1.52e- 5 603. -42.0 204. TRUE
plot(results, index=1) # intercept
I will include the interaction between sex_men and salaryquotient. If I include more terms from MARS I judge that the predictions are getting unstable testing with bootstrap.
# The three best candidates from the elastic net search
model_mmod_scale <- lm (salary ~
year_n +
perc_women_region +
year_n:perc_women_region,
weights = tbnum_weights,
data = tbnum)
summary (model_mmod_scale)
##
## Call:
## lm(formula = salary ~ year_n + perc_women_region + year_n:perc_women_region,
## data = tbnum, weights = tbnum_weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -210878 -73763 -29626 45157 267181
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 42830.76 200.55 213.569 < 2e-16 ***
## year_n 1362.05 205.00 6.644 4.97e-09 ***
## perc_women_region 1953.39 187.13 10.439 4.66e-16 ***
## year_n:perc_women_region -32.32 194.19 -0.166 0.868
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 102900 on 72 degrees of freedom
## Multiple R-squared: 0.6949, Adjusted R-squared: 0.6822
## F-statistic: 54.65 on 3 and 72 DF, p-value: < 2.2e-16
set.seed(123)
results <- boot(data = tbnum, statistic = bs,
R = 1000, formula = as.formula(model_mmod_scale))
summary (model_mmod_scale) %>% tidy() %>%
mutate(bootest = tidy(results)$statistic,
bootbias = tidy(results)$bias,
booterr = tidy(results)$std.error,
conf = !((tidy(confint(results))$X2.5.. < 0) & (tidy(confint(results))$X97.5.. > 0)))
## Warning in confint.boot(results): BCa method fails for this problem. Using
## 'perc' instead
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## Warning in confint.boot(results): BCa method fails for this problem. Using
## 'perc' instead
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## # A tibble: 4 x 9
## term estimate std.error statistic p.value bootest bootbias booterr conf
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <lgl>
## 1 (Interc~ 42831. 201. 214. 1.22e-102 42831. -776. 254. TRUE
## 2 year_n 1362. 205. 6.64 4.97e- 9 1362. 10.8 253. TRUE
## 3 perc_wo~ 1953. 187. 10.4 4.66e- 16 1953. -94.0 273. TRUE
## 4 year_n:~ -32.3 194. -0.166 8.68e- 1 -32.3 -73.3 291. FALSE
temp <- dplyr::select(tbnum, c(salary, year_n, sex_men, perc_women_region, suming, salaryquotient, regioneduyears))
# A test with MARS and interactions
mmod_scaled <- earth(salary ~ ., weights = tbnum_weights, data = temp, nk = 11, degree = 2)
summary (mmod_scaled)
## Call: earth(formula=salary~., data=temp, weights=tbnum_weights, degree=2,
## nk=11)
##
## coefficients
## (Intercept) 41145.980
## sex_men 1911.153
## h(0-year_n) -959.068
## h(year_n-0) 1703.923
## h(0.311813-perc_women_region) -1598.885
## h(perc_women_region-0.311813) 1546.770
## h(suming- -0.549566) 377.482
## sex_men * salaryquotient -526.973
##
## Selected 8 of 9 terms, and 5 of 6 predictors
## Termination condition: Reached nk 11
## Importance: year_n, suming, perc_women_region, sex_men, salaryquotient, ...
## Weights: 21400, 6800, 11500, 3000, 2400, 500, 7000, 1900, 16000, 4100, 3...
## Number of terms at each degree of interaction: 1 6 1
## GCV<PHONE_NUMBER> RSS<PHONE_NUMBER>69 GRSq 0.9209559 RSq 0.9535396
mmod_scaled <- earth(salary ~ ., weights = tbnum_weights, data = temp, nk = 13, degree = 2)
summary (mmod_scaled)
## Call: earth(formula=salary~., data=temp, weights=tbnum_weights, degree=2,
## nk=13)
##
## coefficients
## (Intercept) 41200.129
## sex_men 1935.664
## h(0-year_n) -867.152
## h(year_n-0) 1727.342
## h(0.311813-perc_women_region) -1532.402
## h(perc_women_region-0.311813) 1450.579
## h(suming- -0.549566) 353.205
## h(-1.22297-salaryquotient) -3067.317
## sex_men * salaryquotient -647.409
##
## Selected 9 of 11 terms, and 5 of 6 predictors
## Termination condition: Reached nk 13
## Importance: year_n, suming, perc_women_region, sex_men, salaryquotient, ...
## Weights: 21400, 6800, 11500, 3000, 2400, 500, 7000, 1900, 16000, 4100, 3...
## Number of terms at each degree of interaction: 1 7 1
## GCV<PHONE_NUMBER> RSS<PHONE_NUMBER>44 GRSq 0.922118 RSq 0.9581168
plot (mmod_scaled)
plotmo (mmod_scaled)
## plotmo grid: year_n sex_men perc_women_region suming salaryquotient
## 0 0.5 0.2069953 -0.4539968 0
## regioneduyears
## -0.1394781
model_mmod_scale <- lm (salary ~
sex_men +
lspline(year_n, c(0)) +
lspline(perc_women_region, c(0.311813)) +
lspline(suming, c(-0.549566)) +
lspline(salaryquotient, c(-1.22297)) +
sex_men:salaryquotient,
weights = tbnum_weights,
data = tbnum)
summary (model_mmod_scale)
##
## Call:
## lm(formula = salary ~ sex_men + lspline(year_n, c(0)) + lspline(perc_women_region,
## c(0.311813)) + lspline(suming, c(-0.549566)) + lspline(salaryquotient,
## c(-1.22297)) + sex_men:salaryquotient, data = tbnum, weights = tbnum_weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -159343 -17893 2866 18128 79279
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 44723.0 1743.3 25.655 < 2e-16
## sex_men 1772.4 238.2 7.440 2.88e-10
## lspline(year_n, c(0))1 868.1 131.4 6.606 8.56e-09
## lspline(year_n, c(0))2 1710.1 122.9 13.910 < 2e-16
## lspline(perc_women_region, c(0.311813))1 1382.3 225.1 6.142 5.51e-08
## lspline(perc_women_region, c(0.311813))2 1518.7 139.2 10.911 2.48e-16
## lspline(suming, c(-0.549566))1 1786.4 1624.5 1.100 0.275534
## lspline(suming, c(-0.549566))2 395.8 105.3 3.758 0.000369
## lspline(salaryquotient, c(-1.22297))1 2705.7 1126.2 2.403 0.019147
## lspline(salaryquotient, c(-1.22297))2 295.7 151.4 1.953 0.055071
## sex_men:salaryquotient -884.9 158.6 -5.578 5.07e-07
##
## (Intercept) ***
## sex_men ***
## lspline(year_n, c(0))1 ***
## lspline(year_n, c(0))2 ***
## lspline(perc_women_region, c(0.311813))1 ***
## lspline(perc_women_region, c(0.311813))2 ***
## lspline(suming, c(-0.549566))1
## lspline(suming, c(-0.549566))2 ***
## lspline(salaryquotient, c(-1.22297))1 *
## lspline(salaryquotient, c(-1.22297))2 .
## sex_men:salaryquotient ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 38700 on 65 degrees of freedom
## Multiple R-squared: 0.961, Adjusted R-squared: 0.955
## F-statistic: 160.3 on 10 and 65 DF, p-value: < 2.2e-16
set.seed(123)
results <- boot(data = tbnum, statistic = bs,
R = 1000, formula = as.formula(model_mmod_scale))
summary (model_mmod_scale) %>% tidy() %>%
mutate(bootest = tidy(results)$statistic,
bootbias = tidy(results)$bias,
booterr = tidy(results)$std.error,
conf = !((tidy(confint(results))$X2.5.. < 0) & (tidy(confint(results))$X97.5.. > 0)))
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## # A tibble: 11 x 9
## term estimate std.error statistic p.value bootest bootbias booterr conf
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <lgl>
## 1 (Interc~ 44723. 1743. 25.7 1.02e-35 44723. 1007. 3439. TRUE
## 2 sex_men 1772. 238. 7.44 2.88e-10 1772. -3.65 339. TRUE
## 3 lspline~ 868. 131. 6.61 8.56e- 9 868. -88.4 299. TRUE
## 4 lspline~ 1710. 123. 13.9 3.71e-21 1710. -11.6 250. TRUE
## 5 lspline~ 1382. 225. 6.14 5.51e- 8 1382. -104. 308. TRUE
## 6 lspline~ 1519. 139. 10.9 2.48e-16 1519. -51.2 248. TRUE
## 7 lspline~ 1786. 1625. 1.10 2.76e- 1 1786. 80.7 1608. FALSE
## 8 lspline~ 396. 105. 3.76 3.69e- 4 396. 47.0 171. FALSE
## 9 lspline~ 2706. 1126. 2.40 1.91e- 2 2706. 904. 2568. FALSE
## 10 lspline~ 296. 151. 1.95 5.51e- 2 296. 77.6 196. FALSE
## 11 sex_men~ -885. 159. -5.58 5.07e- 7 -885. -153. 264. TRUE
I will also use 10-fold cross-validation fit with decision trees and bagging on the data.
set.seed(123)
tbnum_bag <- train(
salary ~ .,
data = tbnum,
method = "treebag",
weights = tbnum_weights,
trControl = trainControl(method = "cv", number = 10),
nbagg = 200,
control = rpart.control(minsplit = 2, cp = 0)
)
vip::vip(tbnum_bag, num_features = 20, bar = FALSE)
## Warning in vip.default(tbnum_bag, num_features = 20, bar = FALSE): The `bar`
## argument has been deprecated in favor of the new `geom` argument. It will be
## removed in version 0.3.0.
Perform diagnostics on the final model.
model <- lm (salary ~
sex_men +
lspline(year_n, c(0)) +
lspline(perc_women_region, c(0.311813)) +
lspline(suming, c(-0.549566)) +
sex_men:salaryquotient,
weights = tbnum_weights,
data = tbnum)
summary (model)
##
## Call:
## lm(formula = salary ~ sex_men + lspline(year_n, c(0)) + lspline(perc_women_region,
## c(0.311813)) + lspline(suming, c(-0.549566)) + sex_men:salaryquotient,
## data = tbnum, weights = tbnum_weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -158211 -13213 -2260 20760 84251
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 41612.74 1045.30 39.809 < 2e-16
## sex_men 1806.47 252.49 7.155 8.00e-10
## lspline(year_n, c(0))1 948.66 135.66 6.993 1.56e-09
## lspline(year_n, c(0))2 1693.55 131.00 12.928 < 2e-16
## lspline(perc_women_region, c(0.311813))1 1481.96 238.41 6.216 3.72e-08
## lspline(perc_women_region, c(0.311813))2 1531.75 136.49 11.222 < 2e-16
## lspline(suming, c(-0.549566))1 1625.10 1734.28 0.937 0.35210
## lspline(suming, c(-0.549566))2 408.52 112.02 3.647 0.00052
## sex_men:salaryquotient -515.55 89.72 -5.746 2.44e-07
##
## (Intercept) ***
## sex_men ***
## lspline(year_n, c(0))1 ***
## lspline(year_n, c(0))2 ***
## lspline(perc_women_region, c(0.311813))1 ***
## lspline(perc_women_region, c(0.311813))2 ***
## lspline(suming, c(-0.549566))1
## lspline(suming, c(-0.549566))2 ***
## sex_men:salaryquotient ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 41350 on 67 degrees of freedom
## Multiple R-squared: 0.9541, Adjusted R-squared: 0.9487
## F-statistic: 174.2 on 8 and 67 DF, p-value: < 2.2e-16
anova (model)
## Analysis of Variance Table
##
## Response: salary
## Df Sum Sq Mean Sq F value
## sex_men 1 4.1914e+11 4.1914e+11 245.090
## lspline(year_n, c(0)) 2 6.3234e+11 3.1617e+11 184.879
## lspline(perc_women_region, c(0.311813)) 2 1.2213e+12 6.1063e+11 357.064
## lspline(suming, c(-0.549566)) 2 5.4719e+10 2.7360e+10 15.998
## sex_men:salaryquotient 1 5.6461e+10 5.6461e+10 33.015
## Residuals 67 1.1458e+11 1.7101e+09
## Pr(>F)
## sex_men < 2.2e-16 ***
## lspline(year_n, c(0)) < 2.2e-16 ***
## lspline(perc_women_region, c(0.311813)) < 2.2e-16 ***
## lspline(suming, c(-0.549566)) 2.090e-06 ***
## sex_men:salaryquotient 2.439e-07 ***
## Residuals
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (model)
binnedplot(predict(model), resid(model))
halfnorm(rstudent(model))
tbnum %>% mutate(residuals = residuals(model)) %>%
group_by(salary, perc_women_region, suming, year_n, sex_men) %>%
summarise(residuals = mean(residuals), count = sum(suming)) %>%
ggplot (aes(x = salary, y = residuals, size = sqrt(count), colour = perc_women_region)) +
geom_point() + facet_grid(. ~ year_n)
## Warning in sqrt(count): NaNs produced
## Warning in sqrt(count): NaNs produced
## Warning: Removed 49 rows containing missing values (geom_point).
set.seed(123)
results <- boot(data = tbnum, statistic = bs,
R = 1000, formula = as.formula(model))
summary (model) %>% tidy() %>%
mutate(bootest = tidy(results)$statistic,
bootbias = tidy(results)$bias,
booterr = tidy(results)$std.error,
conf = !((tidy(confint(results))$X2.5.. < 0) & (tidy(confint(results))$X97.5.. > 0)))
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## Warning: 'tidy.matrix' is deprecated.
## See help("Deprecated")
## # A tibble: 9 x 9
## term estimate std.error statistic p.value bootest bootbias booterr conf
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <lgl>
## 1 (Interce~ 41613. 1045. 39.8 2.33e-48 41613. 50.1 1258. TRUE
## 2 sex_men 1806. 252. 7.15 8.00e-10 1806. -5.79 402. TRUE
## 3 lspline(~ 949. 136. 6.99 1.56e- 9 949. -99.1 358. TRUE
## 4 lspline(~ 1694. 131. 12.9 7.16e-20 1694. 26.7 329. TRUE
## 5 lspline(~ 1482. 238. 6.22 3.72e- 8 1482. 10.7 326. TRUE
## 6 lspline(~ 1532. 136. 11.2 4.88e-17 1532. -119. 241. TRUE
## 7 lspline(~ 1625. 1734. 0.937 3.52e- 1 1625. 118. 2169. FALSE
## 8 lspline(~ 409. 112. 3.65 5.20e- 4 409. 19.5 196. TRUE
## 9 sex_men:~ -516. 89.7 -5.75 2.44e- 7 -516. 12.3 246.  I will plot both the regression and the decision trees models for comparison.
temp <- dplyr::select(tb_unique, c(salary, year_n, sex, perc_women_region, suming, salaryquotient, regioneduyears))
mmod <- earth(salary ~ ., weights = tbnum_weights, data = temp, nk = 11, degree = 2)
summary(mmod)
## Call: earth(formula=salary~., data=temp, weights=tbnum_weights, degree=2,
## nk=11)
##
## coefficients
## (Intercept) 43393.134
## sexwomen -1907.433
## h(2016-year_n) -704.320
## h(year_n-2016) 1184.617
## h(0.493906-perc_women_region) -250482.793
## h(perc_women_region-0.493906) 295538.165
## h(suming-2400) 0.067
## h(0.925101-salaryquotient) -31088.734
## h(salaryquotient-0.925101) -18920.288
##
## Selected 9 of 10 terms, and 5 of 6 predictors
## Termination condition: Reached nk 11
## Importance: year_n, suming, perc_women_region, sexwomen, salaryquotient, ...
## Weights: 21400, 6800, 11500, 3000, 2400, 500, 7000, 1900, 16000, 4100, 3...
## Number of terms at each degree of interaction: 1 8 (additive model)
## GCV<PHONE_NUMBER> RSS<PHONE_NUMBER>83 GRSq 0.9055366 RSq 0.9491997
model <- lm (salary ~
sex +
lspline(year_n, c(2016)) +
lspline(perc_women_region, c(0.493906)) +
lspline(suming, c(2400)) +
sex:salaryquotient,
weights = tbnum_weights,
data = tb_unique)
set.seed(123) # for reproducibility
tbnum_bag <- train(
salary ~ .,
data = tb_unique,
method = "treebag",
weights = suming,
trControl = trainControl(method = "cv", number = 10),
nbagg = 200,
control = rpart.control(minsplit = 2, cp = 0)
)
p1 <- plot_model (model, type = "pred", terms = c("perc_women_region"))
p2 <- partial(tbnum_bag, pred.var = "perc_women_region") %>% autoplot()
gridExtra::grid.arrange(p1, p2, ncol = 2)
tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = perc_women_region, y = salary)) +
labs(
x = "Percent women in region",
y = "Salary"
)
p1 <- plot_model (model, type = "pred", terms = c("year_n"))
p2 <- partial(tbnum_bag, pred.var = "year_n") %>% autoplot()
gridExtra::grid.arrange(p1, p2, ncol = 2)
tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = year_n, y = salary)) +
labs(
x = "Year",
y = "Salary"
)
p1 <- plot_model (model, type = "pred", terms = c("sex"))
p2 <- tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = sex, y = salary)) +
labs(
x = "Sex",
y = "Salary"
)
gridExtra::grid.arrange(p1, p2, ncol = 2)
p1 <- plot_model (model, type = "pred", terms = c("suming"))
p2 <- partial(tbnum_bag, pred.var = "suming") %>% autoplot()
gridExtra::grid.arrange(p1, p2, ncol = 2)
tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = suming, y = salary)) +
labs(
x = "# engineers in the region",
y = "Salary"
)
p1 <- plot_model (model, type = "pred", terms = c("salaryquotient", "sex"))
p2 <- tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = salaryquotient, y = salary, colour = sex)) +
labs(
x = "Quotient between salary for men and women",
y = "Salary"
)
gridExtra::grid.arrange(p1, p2, ncol = 2)
p1 <- plot_model (model, type = "pred", terms = c("year_n", "sex"))
p2 <- tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = year_n, y = salary, colour = sex)) +
labs(
x = "Year",
y = "Salary"
)
gridExtra::grid.arrange(p1, p2, ncol = 2)
p1 <- plot_model (model, type = "pred", terms = c("perc_women_region", "sex"))
p2 <- tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = perc_women_region, y = salary, colour = sex)) +
labs(
x = "Percent women in region",
y = "Salary"
)
gridExtra::grid.arrange(p1, p2, ncol = 2)
p1 <- plot_model (model, type = "pred", terms = c("suming", "sex"))
p2 <- tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = suming, y = salary, colour = sex)) +
labs(
x = "# engineers in the region",
y = "Salary"
)
gridExtra::grid.arrange(p1, p2, ncol = 2)
p1 <- plot_model (model, type = "pred", terms = c("year_n", "perc_women_region"))
p2 <- partial(tbnum_bag, pred.var = c("perc_women_region", "year_n")) %>%
plotPartial(levelplot = FALSE, zlab = "yhat", drape = TRUE,
colorkey = TRUE, screen = list(z = -20, x = -60))
gridExtra::grid.arrange(p1, p2, ncol = 2)
tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = year_n, y = salary, colour = perc_women_region)) +
labs(
x = "Year",
y = "Salary"
)
p1 <- plot_model (model, type = "pred", terms = c("year_n", "suming"))
p2 <- partial(tbnum_bag, pred.var = c("suming", "year_n")) %>%
plotPartial(levelplot = FALSE, zlab = "yhat", drape = TRUE,
colorkey = TRUE, screen = list(z = -20, x = -60))
gridExtra::grid.arrange(p1, p2, ncol = 2)
tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = year_n, y = salary, colour = suming)) +
labs(
x = "Year",
y = "Salary"
)
p1 <- plot_model (model, type = "pred", terms = c("suming", "perc_women_region"))
p2 <- partial(tbnum_bag, pred.var = c("perc_women_region", "suming")) %>%
plotPartial(levelplot = FALSE, zlab = "yhat", drape = TRUE,
colorkey = TRUE, screen = list(z = -20, x = -60))
gridExtra::grid.arrange(p1, p2, ncol = 2)
tb_unique %>%
ggplot () +
geom_jitter (mapping = aes(x = suming, y = salary, colour = perc_women_region)) +
labs(
x = "# engineers in the region",
y = "Salary"
)


Social
Call Nurse
Pain
I Need
I Feel
Social
Room Control
Yes
No
I don't know
Maybe
Thank you
Call Home
Facebook
Twitter
Calling Nurse


Research Associate at Carnegie Mellon University HCII: CoALA Lab + Tech Solidarity Lab
February 2021 - Present, Pittsburgh PA
Studio Guide for Art, Making & Anti-Racism at Northwestern University
January 2021 - late-March 2021, Pittsburgh PA
Community Design Advisor with The Opportunity Fund
December 2020 - Present, Pittsburgh PA
Research Scientist/Engineer with Oasis Farm and Fishery
October 2020 - mid-February 2021, Pittsburgh PA
AI Trainer with OpenAI
August 2020 - October 2020, Pittsburgh PA [remote]
Intern: Phipps Conservatory
June 2020 - mid-August 2020, Pittsburgh PA
Volunteer at Oasis Farm and Fishery
April 2020 - June 2020, Pittsburgh PA
Artist Educator in Residence: Council for Cultural Equity and Emancipated Education
Pittsburgh Public Schools
March 2020, Pittsburgh PA *interrupted by covid19 pandemic
Elmina Homecoming: Return to my birthplace after 22 years away
October 2019 - March 2020, Central Region, Ghana
Graduated from Northwestern University: BS Manufacturing and Design Engineering from the McCormick School of Engineering
September 2019, Evanston IL
Design Engineering Capstone; Cattle Tech (Client: Raitong Organics Farm)
December 2018 - June 2019, Evanston IL & Sisaket Thailand
Administrative & Design Aide: Segal Design Institute, Northwestern University
September 2018 - June 2019, Evanston IL
Engineering Intern: LTA Research and Exploration LLC
June 2018 - August 2018, Mountain View CA
Compass Peer Mentor: Northwestern University SES
Spetember 2017 - June 2018, Evanston IL
Independent Art Practice
June 2017 - August 2017, Pittsburgh PA
Media Intern, AON Studios at Music Garage Chicago
Spetember 2016 - November 2016, Chicago IL
Swim Instructor, Northwestern University
January 2016 - June 2016, Evanston IL
Enrolled at Northwestern University
Spetember 2015, Evanston IL
Youth Philanthropy Intern: The Heinz Endowments
June 2015 - August 2015, Pittsburgh PA
Graduated from George School, IB Diploma
May 2015, Newtown PA
Reading Warrior, Neighborhood Learning Alliance
June 2014 - August 2014, Pittsburgh PA
Volunteer, George School Service Project
March 2014, Cape Town, South Africa
Farm Hand, Red Wilds Garden
July 2013 - August 2013, Pittsburgh PA
Shop Assistant, Ming Yip Acupuncture and Herbal Therapy
June 2013 - July 2013, Pittsburgh PA


body field test888
{{> afQuickField name="body"}} {{/autoForm}}November 05, 1955
This is a "Facebook" styled Card. The header is created from a Thumbnail List item, the content is from a card-body consisting of an image and paragraph text. The footer consists of tabs, icons aligned left, within the card-footer.


203 J.S.P Complex, Near Guruvayurappan Temple, Uthukuli Main Road, Thirupur 641601. Cell: 98645 64943, 98465 56485
Govt.Regd.No:673/2016
(in Full & Block Letter)


Add the bs-donate
class to any element to activate widget
The only required options here are address
and chain
- which should be added to the HTML data-attributes as follows:
Donate
data-qr
default is set to true
Displaying QR Codes requires the qrcode.js
dependency.
data-bip
default is set to true
Would you like to display Desktop QT Link?
data-amount
default is set to 0
Include defined amount in BIP Link and Modal Header?
data-inject
default is set to true
Attempt to auto-inject modal HTML?
data-group
default is set to false
If updating text we use this as the class and add the dynamic text to an element with the following class, as follows (and seen above):
0
data-balance
default is set to false
Update balances based on group class and address.
data-txs
default is set to false
Update TX counts based on group class and address.
data-loading
default is set to false
This is the text to display prior to fetching dynamic content and will use the content within the HTML if nothing specific has been set.
data-label
default is set to false
This allows you to add a label to Desktop QT links.
Add bs-generate
class to any element to activate widget
The only required options here are salt
and chain
- which should be added to the data-attributes as follows:
Generate Keys
data-random
default is set to true
Allow random salt generation
data-deterministic
default is set to true
Allow deterministic salt generation
data-callback
default is set to true
This allows you to control what happens once the keys
have been generated. By default it calls the bs_default_generate_callback
function, which creates a modal window containing the key pair.
data-print
default is set to true
If using the default callback, show the print keys button?
data-save
default is set to true
If using the default callback, show the save keys button?
Add bs-accounts-modal
class to element to activate
This widget does not have any required options, but can utilize the following if set to HTML data attributes:
data-all
default is set to false
If set to true it will show all Blockstrap accounts rather than just accounts created by widgets.
Add the bs-request
class to any element to activate widget
Required options here include currency
, chains
, amount
, addresses
and salt
- all of which should be added to the HTML data-attributes as follows:
Request Payment
We provide support for 165 currencies, where the corresponding amount
is converted and presented via a choice of chains
. Deterministic payment addresses are created whilst waiting for specific transactions that are then routed to the corresponding addresses
. Please note that the chains
and addresses
values should be comma separated arrays that follow the same order.
data-amounts
default is set to 0
If currency
is set to false or is unsupported this comma separated array can be used in the same order as the chains
to provide crypto-only payment requests.
If set to 0
and required due to invalid currency, twice the mining fee of the chain will be requested.
data-callback
default is set to true
This allows you to control what happens once the payment has been routed correctly. By default it calls the bs_default_payment_callback
function, which generates a modal with information about the transaction.
data-qr
default is set to true
Displaying QR Codes requires the qrcode.js
dependency.
data-bip
default is set to true
Would you like to display Desktop QT Link?
data-poll
default is set to 60
How many seconds between polls?
data-title
default is set to Payment Request
The title of the modal window
data-description
default is set to false
The description given to the payment request, which if set to false will use the text within the button as the description.
THESE WIDGETS REQUIRE OUR HTML5 FRAMEWORK
© 2015 | All Rights Reserved | Made by Neuroware.io | Please read our Beta Disclaimer


About us
The problem
Sending the same text message on a large scale is cumbersome, slow, and generic.
The solution
An app that offers a seamless, simple, and slick interface to deliver personalized text messages to a vast audience.
Founders
Lucas and Anders met in University of Oregon's computer science department and have been building products since 2015.
Personify stemmed from wasting precious time over the holidays to send out personalized text messages to friends and loved ones. Personify fixes this problem through our slick and simple application interface. Keeping Google's Material Design in mind, we wanted to create a product that gives users the easiest platform to deliver their message powerfully.
Contact usPrivacy Policy
SECTION 1 - USER INFORMATION
Personify does nothing with the sensitive information regarding your contacts or messages other than what is intended by the application. Your messages are guarenteed secure and only visible by you and the people you send them too. We do not have any contact with any third-parties, nor do we have access to the internet in order to upload any of your data.
SECTION 2 - PRIVILEGES
What privileges does Personify require?- Read contacts
- Send SMS
- Read/Write storage
- Read contacts: This should be a fairly self explanatory one, but we need access to your contacts to load this information for you. We load contact data for both letting you select the contacts you want to message, and for accessing custom or native Android groups.
 We do not send messages without the explicit consent from the user.
- Read/Write storage: This particular permission is needed only when you are adding custom photos to a custom contact group made through Personify. The read permission is needed to read photos from storage, and write is needed to save photos if you are capturing the image yourself. The only place this is used is through the custom group feature, and no where else.
You can opt-out of any of the permissions through Settings -> Applications -> Personify and the permissions tab. Although the user experience of the app relies heavily on the first two permissions, you may revoke access to these permissions at any time.
SECTION 3 - THIRD-PARTY SERVICES
We do not integrate with any third-party services, nor pass along any data to any third party service. There is no ability for Personify to accesss the internet connection so you are safe to assume there's no way for Personify to upload any contact or SMS data to anyone.
QUESTIONS AND CONTACT INFORMATION
If you would like to contact the developer for any information regarding privacy policy information or anything regarding the Personify application, contact us.
Get in touch
Email address
<EMAIL_ADDRESS>Location
Eugene, Oregon


Customize your word list.
This feature is optional. If you or your company, has a few words relating to technical, non-technical or experience that are expected from a candidate's resume, you can provide them here.
Now, we do not guarantee that all resumes which contain the exact words will be ranked extremely high, as there are other factors that decide proficiency too.
However, resumes that contain these words tend to have an edge, because it tells us that these are the type of profiles you look for in a candidate, and thus helps us serve you better.
Instructions
You will have to enter a word and its importance on a scale of 0-10, 0 being least important, and 10 being the highest. Click the 'Go' Buttons corresponding to each of the criteria sections to add the word.
You will be redirected to this page to add more words. If you are done, or do not wish to do this, press 'Skip' and the ranking scores shall be displayed.


WCF Security
Security Modes
- Transport- eg SSL. basicHttpBinding is the only binding with no default security (to enable, configure the binding with security mode="Transport".). You also can't do transport security with wsDualHttpBinding (callback listeners).
- Message- eg WS-Security <security mode="Message">
message clientCredentialType="Windows" or "Certificate" or UserName ... - Transport with message credential - both, but it's not end-to-end security like Message
If using transport security, you can only use Certificate or Windows credential type. behavior/serviceCredentials configure where to find authentication (eg certificate)
Contexts
Like Asp.Net's HttpContext, WCF has OperationContext and also ServiceSecurityContext which works the same way for just security stuff.
//For windows authentication access the current user by
var name1 = OperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name;
//or
var name2 = ServiceSecurityContext.Current.PrimaryIdentity.Name;
In a json webHttp endpoint with [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] you can use HttpContext.Current.User.Identity.Name as normal.
Impersonation
You can use the securitycontext for impersonation (MSDN) ServiceSecurityContext.Current.Windowsldentity.ImpersonationLevel = TokenlmpersonationLevel.Impersonation (or to access remote systems) .Delegation
You can impersonate some operations (Allowed or Required) using the ServiceAuthorization behavior ImpersonateCallerForAllOperations=true
Custom authentication
For custom authentication, set the credentialType="UserName", and create a class that inherits from UserNamePasswordValidator (Validate doesn't return boolean- throw a SecurityTokenValidationException) For authorization, you can use OperationContext.Current.ServiceSecurityContext - you can get claimSets.
There's an IAuthorizationPolicy interface for custom authentication (reference System.IdentityModel). Implement the Evaluate method and assign a readonly list<IAuthorizationPolicy>
to host.Authorization.ExternalAuthorizationPolicies or in config <serviceAuthorization>
<authorizationPolicies>
<add policyType=""/>
Use ASP Membership with WCF
<serviceCredentials> has a <userNameAuthentication> element- set userNamePasswordValidationMode="MembershipProvider" for ASP.Net membership instead of windows.
Or use <serviceAuthorization
principalPermissionMode="UseAspNetRoles"
roleProviderName ="SqlProvider" />
Certificates
serviceCredentials has a clientCertificate and serviceCertificate.
clientCertificate/serviceCredentials/authentication has a certificateValidationMode can be Custom (a customCertificateValidatorType), ChainTrust (chain to root certificates) or PeerTrust (self-issued in Trusted People store).
ProtectionLevel
In code you can set ProtectionLevel [OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] (if you're using Transport security, this has no effect; you can't use it with BasicHttpBinding as that has no default security)
Debugging Security
Add the serviceSecurityAudit element to the server, and check the audit log:
<serviceBehaviors>
<behavior name="defaultBehavior">
<serviceSecurityAudit
auditLogLocation="Application"
serviceAuthorizationAuditLevel="Failure"
messageAuthenticationAuditLevel="Failure" />
</behavior>
</serviceBehaviors>


Lithuania pushes for NATO ally involvement in EU defence projects
by BNNLithuanian National Defence Minister Raimundas Karoblis has emphasised that European Union’s (EU) defence projects should be open to NATO allies from outside the EU to join in.
The Lithuanian National Defence Ministry wrote in a press release that on Tuesday, November 12, Karoblis took part in a meeting of EU defence ministers, where they discussed EU’s permanent structured cooperation (PESCO).
It is an instrument laid out in the Treaty of Lisbon, for deepening the cooperation in security and defence area for those EU member states that have military capabilities meeting higher criteria and are bound by greater commitments.
«We have to make sure that flexible rules are provided for third states, especially NATO allies, to take part in PESCO projects because only participation of NATO allies can ensure quality implementation of prioritized PESCO projects, such as concerning military mobility or cybersecurity, and proper level of cooperation and transparency,» R. Karoblis pointed out.
34 PESCO projects are currently underway, including Lithuania’s project on EU Cyber Rapid Response Teams (CRRTs) and Mutual Assistance in Cyber Security, one of the most significantly progressed PESCO projects, according to the ministry.


Employees Spring Boot App
Click the following link to launch the client application:
HTML5 REST Client
REST URLs testable via the browser
/employees
/employees/lastname/S
/employees/department/M
/employees/title/S


If `form` is an instance of [`RunOrg.Form`](/forms/form.htm),
then `form.List(limit,offset)` reads `limit` filled instances
of that form, starting at `offset`. The order is unspecified but
consistent.
Returns a [promise](/concept/promise.htm) that will resolve to
a list of [`RunOrg.Form.Filled`](/forms/filled.htm) objects.
var form = new RunOrg.Form("");
form.List(10, 0).then(function(list) {
for (var i = 0; i < list.length; ++i)
console.log("Person %s answered %s", list[i].owner, list[i].data.q1)
});
Returns all the filled instances of form `{id}`, in an unspecified
but consistent order, with [pagination](/concepts/pagination.htm).
The response contains two fields:
| count | | The total number of filled instances for this form.
| list | array | A list of filled form instances on the requested
page, in [the same format as individual requests](/forms/get-filled.htm).
GET /db/0SNQc00211H/forms/0SNQc00711H/filled?as=0Sd7003511H&limit=3&offset=213
200 OK
Content-Type: application/json
{ "list" : [ {
"owner" : "0SNQe00311H",
"data": { "color" : "Orange", "birth" : "1985-04-19" }
}, {
"owner" : "0SNQe00311H",
"data": { "birth" : "2013-10-08" }
} ],
"count": 215 }
# Errors
## Returns `401 Unauthorized`
- if the provided token does not authenticate the requester
## Returns `403 Forbidden`
- if requester does not have **admin** access to the form.
## Returns `404 Not Found`
- if database `{db}` does not exist
- if form `{id}` does not exist in database `{db}`
- if requester cannot view form `{id}`
# Access restrictions
The **admin** [access level](/forms/audience.htm) is required to
view all filled form instances.


{{ partial "post/head.html" . }} {{ partial "post/header.html" . }}
The Art of PostgreSQL blog introduces PostgreSQL concepts that are useful for application developers. The content of this blog is either extracted from the published book, or written in preparation for book material. Reading this blog, you can enjoy The Art of PostgreSQL content one piece at a time!
Remember to practice what you learn here and elsewhere!


Easily Improve Your Bottom Line Using Inductive Automation's MES Tools
By: Alex Marcy on December 12, 2014
Tagged: KPI Inductive Automation MES
In today's world of fully automated production it can be difficult to turn process data into useful information. One way of doing this is by using Inductive Automation's MES suite. In this series we will cover the basics of what Inductive Automation's tools do, their benefits, details on implementation, and how to quickly realize the ROI on your investment.
Turning Data into Information
Many manufacturing companies cannot easily assess the health of their plants. This is rarely due to a lack of data. Process Historians collect real-time data and can be used to show trends over time, quality control data can be compared to those trends and even some KPIs can be calculated for the process as a whole. This system breaks down when raw data is the only resource available to provide the necessary insight to answer questions about operations.
Data fails to take into account micro-level details affecting macro-level performance. For example, with raw data alone it can be difficult to determine which machines are causing the most downtime, where bottlenecks are in the process and where quality losses are greatest. Determining the top 10 causes of downtime would require first collecting all of the data in one location, summing the downtime for all pieces of equipment, and ordering the list. If you are lucky you might be able to get all of this done before the phone rings with some other distractions.
How do people find ways to track their process, find the major issues, and get them resolved? One way is to use performance management systems such as Inductive Automations MES tools. These systems take the process data you are already collecting and provide the context necessary for the data to be useful as a decision making tool.
Deciding to Do Things Differently
The decision to implement a performance monitoring system can seem daunting. The cost of buying the software, the time involved in configuring things, learning a new system and integrating it into your workflow. While there are some costs associated with the system both in terms of time and resources, these systems can have a direct impact on your bottom line. One simple is example of this is by using the tools to identify and reduce the top 3 reasons for downtime in your plant, thus automatically increasing productivity. Our customers have made similar gains by decreasing processing time by identifying bottlenecks and reducing re-work and scrap by identifying faulty equipment.
In this series we will focus on Inductive Automations MES tools. We will answer some common questions about what MES is, what it isn't, and discuss of the direct benefits our customers have found after using the tools. If you are looking at similar solutions from other companies, we will cover those in a future series. We have worked with similar tools from most of the major companies and will do a compare and contrast post after we have gone into some detail across the board.
To summarize, performance management systems give you the ability to ask questions about your operation while at the same time giving you the information you need to answer those questions and prioritize improvements. The give you an honest assessment of your plant's health. While this may be difficult to stomach, if your plant needs some help wouldn't you want to know exactly what to fix to make it better?
Recent Posts:
MES Essentials Webinar Wrap-Up
07/17/15
MES Essentials Webinar
07/10/15
Tweets by @CorsoSystems


[dscrdeql] <CowboyCrypto- Founder> I forgot to seal the sides lol
[dscrdeql] <CowboyCrypto- Founder> Not an issue though
[dscrdeql] <CowboyCrypto- Founder> It’s a test block so as long as I can test it I’m a few weeks I’ll be happy
GatewayBOT13-Sep-18 07:23 PM
[dscrdeql] <c2k> when are you expecting delivery of metal form?
GatewayBOT13-Sep-18 07:34 PM
[dscrdeql] <Jellysmash> thanks for the update picture @CowboyCrypto- Founder
[dscrdeql] <CowboyCrypto- Founder> they said 2-4 weeks on it
[dscrdeql] <CowboyCrypto- Founder> so it will take a bit.
[dscrdeql] <CowboyCrypto- Founder> I am ordering 1 for now just as they are crazy expensive
[dscrdeql] <AndronicusBass-Founder> I'm up super early from a weird bird noises from across the road. Havent heard that kind of cackle before, every 20-30 seconds haha
[dscrdeql] <Jellysmash> birds around here are starting earlier and earlier as it's getting lighter in the morning
[dscrdeql] <Jellysmash> my place backs onto the bush so there are birds everywhere
[dscrdeql] <AndronicusBass-Founder> Wish I had a BB gun lol
[dscrdeql] <Jellysmash> which is good
[dscrdeql] <Jellysmash> but noisy
[dscrdeql] <AndronicusBass-Founder> JK
[dscrdeql] <Jellysmash> the cockatoos are the loudest
[dscrdeql] <Jellysmash> kookaburras as well
[dscrdeql] <AndronicusBass-Founder> I love waking up early. Can't remember the last time I heard a kookaburra
[dscrdeql] <AndronicusBass-Founder> When camping at the river in the past, the Galahs are loud af, big screeches(edited)
GatewayBOT13-Sep-18 09:04 PM
[dscrdeql] <Jellysmash> this is going to be awesome
[dscrdeql] <SwimedDragon> I wish you guy's had a prototype . As much as the hurricane coming is bad, it would have been a perfect test to see how it acts in hurricane weather
[dscrdeql] <AndronicusBass-Founder> Its hurricane season now I believe(edited)
[dscrdeql] <SwimedDragon> I've never been in a hurricane before. I don't even think we have those here in Europe. At least not where I live
[dscrdeql] <SwimedDragon> When I see it on the news I can't imagine how it is to leave your home behind to go to a safe place. Your home should be the place where you can be safe, alway's.
[dscrdeql] <AndronicusBass-Founder> I couldnt fathom the idea of being in one.
GatewayBOT13-Sep-18 09:22 PM
[dscrdeql] <AndronicusBass-Founder> I will have to get used to the idea when I'm building in areas that are susceptible to them.
GatewayBOT13-Sep-18 09:34 PM
[dscrdeql] <Jellysmash> i htink it'd be one of those things that you wonder how amazing it would be to be there and see it....but when it happens you'd be scared af
GatewayBOT13-Sep-18 09:42 PM
[dscrdeql] <Jonathan-Mod> I'll be on the edge of one in a few days, it got knocked down to category 2 though
GatewayBOT13-Sep-18 09:50 PM
[dscrdeql] <CowboyCrypto- Founder> the concrete gains strength over time, but we would be strapping it in with hurricane straps to secure it to a foundation, ,making it much more stable.
[dscrdeql] <CowboyCrypto- Founder> Domes are amazing for high winds as the wind just goes around them.
GatewayBOT13-Sep-18 10:12 PM
[dscrdeql] <ghøst> good night
[dscrdeql] <AndronicusBass-Founder>
GatewayBOT13-Sep-18 10:41 PM
[dscrdeql] <Jellysmash> good night there @ghøst
[dscrdeql] <Jellysmash>
[dscrdeql] <Jellysmash> Oh well, time for me to get to work
[dscrdeql] <Vinsmoke> Goodmorning!!
[dscrdeql] <Jellysmash> at least it's a beautiful day
[dscrdeql] <Jellysmash> good morning to ride the motorscooter to work
[dscrdeql] <Jellysmash> love riding when it's warm and sunny
[dscrdeql] <Jellysmash> perfect time of year for riding
[dscrdeql] <Jellysmash> pity have to wear a motorcycle helmet, I know it's a safety thing, so gotta do it
[dscrdeql] <Jellysmash> i think in other countries it's not mandatory, but probably should be
[dscrdeql] <Jellysmash> still be nice to be able to ride without it on small trips occassionally
[dscrdeql] <Jellysmash> whoa nice level
[dscrdeql] <Jellysmash> thanks guys
[dscrdeql] <Jellysmash> ok, now I'm really off to work
GatewayBOT13-Sep-18 11:05 PM
[dscrdeql] <Kixluo28> Good morning everyone!
[dscrdeql] <AndronicusBass-Founder> ahoy
[dscrdeql] <Vinsmoke> @jellysmash take care. Have a nice day
[dscrdeql] <Vinsmoke> Thats huge. Level 16
GatewayBOT14-Sep-18 12:01 AM
[dscrdeql] <AndronicusBass-Founder> Nice. I've been observing global markets and economics for the past half decade, there are excessive bubbles everywhere and the fact that BTC had a healthy correction only set's it up for the bull run of all bull runs when people exit other markets before they crash from debt.
[dscrdeql] <AndronicusBass-Founder> Stock markets are being pumped for a massive dump https://youtu.be/6nCL3yTLw5k


|
ORACS
0.8
Meta-heuristic for solving VRP problems.
|
#include <env.h>
Public Member Functions | |
| Env () | |
| Constructor. | |
| Env (Init &init) | |
| Constructor. More... | |
| void | updatePenalty (Solution &solution) |
| Update the penalty parameter between the minimum d_penaltyLower and the maximum d_penaltyUpper. More... | |
Public Attributes | |
| Solution | d_bestSolution |
| Solution | d_currentSolution |
| Solution | d_newSolution |
| Solution | d_bestFeasibleSolution |
| DoubleMatrix | d_distanceMatrix |
| std::default_random_engine | d_rng |
| double | d_delta |
| double | d_penalty |
| double | d_penaltyUpper |
| double | d_penaltyLower |
| double | d_temp |
| double | d_r |
| double | d_tempMin |
Private Types | |
| typedef std::vector< std::vector< double > > | DoubleMatrix |
Env is a class that holds all the global data for the algorithm.
| Env::Env | ( | Init & | init | ) |
| void Env::updatePenalty | ( | Solution & | solution | ) |
Update the penalty parameter between the minimum d_penaltyLower and the maximum d_penaltyUpper.
| [in] | solution | Solution to check whether this is feasible or not |
Definition at line 13 of file updatepenalty.cpp.
| Solution Env::d_bestFeasibleSolution |
| DoubleMatrix Env::d_distanceMatrix |
| double Env::d_penalty |
| double Env::d_penaltyLower |
| double Env::d_penaltyUpper |
| double Env::d_tempMin |


|
tesseract
5.0.0-alpha-619-ge9db
|
Go to the source code of this file.
Classes | |
| struct | list_rec |
Macros | |
| #define | NIL_LIST static_cast<LIST>(nullptr) |
| #define | list_rest(l) ((l) ? (l)->next : NIL_LIST) |
| #define | first_node(l) ((l) ? (l)->node : NIL_LIST) |
| #define | iterate(l) for (; (l) != NIL_LIST; (l) = list_rest(l)) |
| #define | set_rest(l, cell) ((l)->next = (cell)) |
Typedefs | |
| using | int_compare = int(*)(void *, void *) |
| using | void_dest = void(*)(void *) |
| using | LIST = list_rec * |
Functions | |
| int | count (LIST var_list) |
| LIST | delete_d (LIST list, void *key, int_compare is_equal) |
| LIST | destroy (LIST list) |
| void | destroy_nodes (LIST list, void_dest destructor) |
| LIST | last (LIST var_list) |
| LIST | pop (LIST list) |
| LIST | push (LIST list, void *element) |
| LIST | push_last (LIST list, void *item) |
| LIST | search (LIST list, void *key, int_compare is_equal) |
| using int_compare = int (*)(void*, void*) |
| int count | ( | LIST | var_list | ) |
Definition at line 79 of file oldlist.cpp.
| LIST delete_d | ( | LIST | list, |
| void * | key, | ||
| int_compare | is_equal | ||
| ) |
Definition at line 93 of file oldlist.cpp.
Definition at line 123 of file oldlist.cpp.
Definition at line 138 of file oldlist.cpp.
Definition at line 151 of file oldlist.cpp.
Definition at line 161 of file oldlist.cpp.
Definition at line 172 of file oldlist.cpp.
Definition at line 185 of file oldlist.cpp.
| LIST search | ( | LIST | list, |
| void * | key, | ||
| int_compare | is_equal | ||
| ) |
Definition at line 202 of file oldlist.cpp.


|
SX126x-Arduino
2.0.1
|
Implementation according to LoRaWAN Specification v1.0.2. More...
Functions | |
| PhyParam_t | RegionAS923GetPhyParam (GetPhyParams_t *getPhy) |
| The function gets a value of a specific phy attribute. More... | |
| void | RegionAS923SetBandTxDone (SetBandTxDoneParams_t *txDone) |
| Updates the last TX done parameters of the current channel. More... | |
| void | RegionAS923InitDefaults (InitType_t type) |
| Initializes the channels masks and the channels. More... | |
| bool | RegionAS923Verify (VerifyParams_t *verify, PhyAttribute_t phyAttribute) |
| Verifies a parameter. More... | |
| void | RegionAS923ApplyCFList (ApplyCFListParams_t *applyCFList) |
| The function parses the input buffer and sets up the channels of the CF list. More... | |
| bool | RegionAS923ChanMaskSet (ChanMaskSetParams_t *chanMaskSet) |
| Sets a channels mask. More... | |
| bool | RegionAS923AdrNext (AdrNextParams_t *adrNext, int8_t *drOut, int8_t *txPowOut, uint32_t *adrAckCounter) |
| Calculates the next datarate to set, when ADR is on or off. More... | |
| void | RegionAS923ComputeRxWindowParameters (int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams) |
| bool | RegionAS923RxConfig (RxConfigParams_t *rxConfig, int8_t *datarate) |
| Configuration of the RX windows. More... | |
| bool | RegionAS923TxConfig (TxConfigParams_t *txConfig, int8_t *txPower, TimerTime_t *txTimeOnAir) |
| TX configuration. More... | |
| uint8_t | RegionAS923LinkAdrReq (LinkAdrReqParams_t *linkAdrReq, int8_t *drOut, int8_t *txPowOut, uint8_t *nbRepOut, uint8_t *nbBytesParsed) |
| The function processes a Link ADR Request. More... | |
| uint8_t | RegionAS923RxParamSetupReq (RxParamSetupReqParams_t *rxParamSetupReq) |
| The function processes a RX Parameter Setup Request. More... | |
| uint8_t | RegionAS923NewChannelReq (NewChannelReqParams_t *newChannelReq) |
| The function processes a Channel Request. More... | |
| int8_t | RegionAS923TxParamSetupReq (TxParamSetupReqParams_t *txParamSetupReq) |
| The function processes a TX ParamSetup Request. More... | |
| uint8_t | RegionAS923DlChannelReq (DlChannelReqParams_t *dlChannelReq) |
| The function processes a DlChannel Request. More... | |
| int8_t | RegionAS923AlternateDr (AlternateDrParams_t *alternateDr) |
| Alternates the datarate of the channel for the join request. More... | |
| void | RegionAS923CalcBackOff (CalcBackOffParams_t *calcBackOff) |
| Calculates the back-off time. More... | |
| bool | RegionAS923NextChannel (NextChanParams_t *nextChanParams, uint8_t *channel, TimerTime_t *time, TimerTime_t *aggregatedTimeOff) |
| Searches and set the next random available channel. More... | |
| LoRaMacStatus_t | RegionAS923ChannelAdd (ChannelAddParams_t *channelAdd) |
| Adds a channel. More... | |
| bool | RegionAS923ChannelsRemove (ChannelRemoveParams_t *channelRemove) |
| Removes a channel. More... | |
| void | RegionAS923SetContinuousWave (ContinuousWaveParams_t *continuousWave) |
| Sets the radio into continuous wave mode. More... | |
| uint8_t | RegionAS923ApplyDrOffset (uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset) |
| Computes new datarate according to the given offset. More... | |
| bool | RegionAS923SetVersion (uint8_t version) |
| Adjust frequency band to AS923-1, AS923-2, AS923-3. More... | |
Variables | |
| static const uint8_t | DataratesAS923 [] = {12, 11, 10, 9, 8, 7, 7, 50} |
| static const uint32_t | BandwidthsAS923 [] = {125000, 125000, 125000, 125000, 125000, 125000, 250000, 0} |
| static const uint8_t | MaxPayloadOfDatarateDwell0AS923 [] = {59, 59, 59, 123, 230, 230, 230, 230} |
| static const uint8_t | MaxPayloadOfDatarateRepeaterDwell0AS923 [] = {59, 59, 59, 123, 250, 250, 250, 250} |
| static const uint8_t | MaxPayloadOfDatarateDwell1UpAS923 [] = {0, 0, 19, 61, 133, 250, 250, 250} |
| static const uint8_t | MaxPayloadOfDatarateDwell1DownAS923 [] = {0, 0, 19, 61, 133, 250, 250, 250} |
| static const int8_t | EffectiveRx1DrOffsetAS923 [] = {0, 1, 2, 3, 4, 5, -1, -2} |
Implementation according to LoRaWAN Specification v1.0.2.
| #define AS923_MAX_NB_CHANNELS 16 |
LoRaMac maximum number of channels
| #define AS923_NUMB_DEFAULT_CHANNELS 8 |
Number of default channels
| #define AS923_NUMB_CHANNELS_CF_LIST 5 |
Number of channels to apply for the CF list
| #define AS923_TX_MIN_DATARATE DR_0 |
Minimal datarate that can be used by the node
| #define AS923_TX_MAX_DATARATE DR_7 |
Maximal datarate that can be used by the node
| #define AS923_RX_MIN_DATARATE DR_0 |
Minimal datarate that can be used by the node
| #define AS923_RX_MAX_DATARATE DR_7 |
Maximal datarate that can be used by the node
| #define AS923_DEFAULT_DATARATE DR_2 |
Default datarate used by the node
| #define AS923_DWELL_LIMIT_DATARATE DR_2 |
The minimum datarate which is used when the dwell time is limited.
| #define AS923_MIN_RX1_DR_OFFSET 0 |
Minimal Rx1 receive datarate offset
| #define AS923_MAX_RX1_DR_OFFSET 7 |
Maximal Rx1 receive datarate offset
| #define AS923_DEFAULT_RX1_DR_OFFSET 0 |
Default Rx1 receive datarate offset
| #define AS923_MIN_TX_POWER TX_POWER_7 |
Minimal Tx output power that can be used by the node
| #define AS923_MAX_TX_POWER TX_POWER_0 |
Maximal Tx output power that can be used by the node
| #define AS923_DEFAULT_TX_POWER TX_POWER_0 |
Default Tx output power used by the node
| #define AS923_DEFAULT_UPLINK_DWELL_TIME 1 |
Default uplink dwell time configuration
| #define AS923_DEFAULT_DOWNLINK_DWELL_TIME 1 |
Default downlink dwell time configuration
| #define AS923_DEFAULT_MAX_EIRP 16.0f |
Default Max EIRP
| #define AS923_DEFAULT_ANTENNA_GAIN 2.15f |
Default antenna gain
| #define AS923_ADR_ACK_LIMIT 64 |
ADR Ack limit
| #define AS923_ADR_ACK_DELAY 32 |
ADR Ack delay
| #define AS923_DUTY_CYCLE_ENABLED 0 |
Enabled or disabled the duty cycle
| #define AS923_MAX_RX_WINDOW 3000 |
Maximum RX window duration
| #define AS923_RECEIVE_DELAY1 1000 |
Receive delay 1
| #define AS923_RECEIVE_DELAY2 2000 |
Receive delay 2
| #define AS923_JOIN_ACCEPT_DELAY1 5000 |
Join accept delay 1
| #define AS923_JOIN_ACCEPT_DELAY2 6000 |
Join accept delay 2
| #define AS923_MAX_FCNT_GAP 16384 |
Maximum frame counter gap
| #define AS923_ACKTIMEOUT 2000 |
Ack timeout
| #define AS923_ACK_TIMEOUT_RND 1000 |
Random ack timeout limits
| #define AS923_RX_WND_2_DR DR_2 |
Second reception window channel datarate definition.
| #define AS923_MAX_NB_BANDS 1 |
Maximum number of bands
| #define AS923_BAND0 |
Band 0 definition { DutyCycle, TxMaxPower, LastTxDoneTime, TimeOff }
| #define AS923_LC1 |
| #define AS923_LC2 |
LoRaMac channels which are allowed for the join procedure
| #define AS923_RSSI_FREE_TH -85 |
RSSI threshold for a free channel [dBm]
| #define AS923_CARRIER_SENSE_TIME 6 |
Specifies the time the node performs a carrier sense
| PhyParam_t RegionAS923GetPhyParam | ( | GetPhyParams_t * | getPhy | ) |
The function gets a value of a specific phy attribute.
| getPhy | Pointer to the function parameters. |
| Returns | a structure containing the PHY parameter. |
| void RegionAS923SetBandTxDone | ( | SetBandTxDoneParams_t * | txDone | ) |
Updates the last TX done parameters of the current channel.
| txDone | Pointer to the function parameters. |
| void RegionAS923InitDefaults | ( | InitType_t | type | ) |
Initializes the channels masks and the channels.
| type | Sets the initialization type. |
| bool RegionAS923Verify | ( | VerifyParams_t * | verify, |
| PhyAttribute_t | phyAttribute | ||
| ) |
Verifies a parameter.
| verify | Pointer to the function parameters. |
| phyAttribute | Sets the initialization type. |
| Returns | true, if the parameter is valid. |
| void RegionAS923ApplyCFList | ( | ApplyCFListParams_t * | applyCFList | ) |
The function parses the input buffer and sets up the channels of the CF list.
| applyCFList | Pointer to the function parameters. |
| bool RegionAS923ChanMaskSet | ( | ChanMaskSetParams_t * | chanMaskSet | ) |
Sets a channels mask.
| chanMaskSet | Pointer to the function parameters. |
| Returns | true, if the channels mask could be set. |
| bool RegionAS923AdrNext | ( | AdrNextParams_t * | adrNext, |
| int8_t * | drOut, | ||
| int8_t * | txPowOut, | ||
| uint32_t * | adrAckCounter | ||
| ) |
Calculates the next datarate to set, when ADR is on or off.
| adrNext | Pointer to the function parameters. |
| drOut | The calculated datarate for the next TX. |
| txPowOut | The TX power for the next TX. |
| adrAckCounter | The calculated ADR acknowledgement counter. |
| Returns | true, if an ADR request should be performed. |
| void RegionAS923ComputeRxWindowParameters | ( | int8_t | datarate, |
| uint8_t | minRxSymbols, | ||
| uint32_t | rxError, | ||
| RxConfigParams_t * | rxConfigParams | ||
| ) |
Computes the Rx window timeout and offset.
| datarate | Rx window datarate index to be used |
| minRxSymbols | Minimum required number of symbols to detect an Rx frame. |
| rxError | System maximum timing error of the receiver. In milliseconds The receiver will turn on in a [-rxError : +rxError] ms interval around RxOffset |
| rxConfigParams | Returns updated WindowTimeout and WindowOffset fields. |
| bool RegionAS923RxConfig | ( | RxConfigParams_t * | rxConfig, |
| int8_t * | datarate | ||
| ) |
Configuration of the RX windows.
| rxConfig | Pointer to the function parameters. |
| datarate | The datarate index which was set. |
| Returns | true, if the configuration was applied successfully. |
| bool RegionAS923TxConfig | ( | TxConfigParams_t * | txConfig, |
| int8_t * | txPower, | ||
| TimerTime_t * | txTimeOnAir | ||
| ) |
TX configuration.
| txConfig | Pointer to the function parameters. |
| txPower | The tx power index which was set. |
| txTimeOnAir | The time-on-air of the frame. |
| Returns | true, if the configuration was applied successfully. |
| uint8_t RegionAS923LinkAdrReq | ( | LinkAdrReqParams_t * | linkAdrReq, |
| int8_t * | drOut, | ||
| int8_t * | txPowOut, | ||
| uint8_t * | nbRepOut, | ||
| uint8_t * | nbBytesParsed | ||
| ) |
The function processes a Link ADR Request.
| linkAdrReq | Pointer to the function parameters. |
| drOut | Data rate. |
| txPowOut | TX power. |
| nbRepOut | Number of repeats. |
| nbBytesParsed | Number of parsed bytes. |
| Returns | the status of the operation, according to the LoRaMAC specification. |
| uint8_t RegionAS923RxParamSetupReq | ( | RxParamSetupReqParams_t * | rxParamSetupReq | ) |
The function processes a RX Parameter Setup Request.
| rxParamSetupReq | Pointer to the function parameters. |
| Returns | the status of the operation, according to the LoRaMAC specification. |
| uint8_t RegionAS923NewChannelReq | ( | NewChannelReqParams_t * | newChannelReq | ) |
The function processes a Channel Request.
| newChannelReq | Pointer to the function parameters. |
| Returns | the status of the operation, according to the LoRaMAC specification. |
| int8_t RegionAS923TxParamSetupReq | ( | TxParamSetupReqParams_t * | txParamSetupReq | ) |
The function processes a TX ParamSetup Request.
| txParamSetupReq | Pointer to the function parameters. |
| Returns | the status of the operation, according to the LoRaMAC specification. Returns -1, if the functionality is not implemented. In this case, the end node shall not process the command. |
| uint8_t RegionAS923DlChannelReq | ( | DlChannelReqParams_t * | dlChannelReq | ) |
The function processes a DlChannel Request.
| dlChannelReq | Pointer to the function parameters. |
| Returns | the status of the operation, according to the LoRaMAC specification. |
| int8_t RegionAS923AlternateDr | ( | AlternateDrParams_t * | alternateDr | ) |
Alternates the datarate of the channel for the join request.
| alternateDr | Pointer to the function parameters. |
| Datarate | to apply. |
| void RegionAS923CalcBackOff | ( | CalcBackOffParams_t * | calcBackOff | ) |
Calculates the back-off time.
| calcBackOff | Pointer to the function parameters. |
| bool RegionAS923NextChannel | ( | NextChanParams_t * | nextChanParams, |
| uint8_t * | channel, | ||
| TimerTime_t * | time, | ||
| TimerTime_t * | aggregatedTimeOff | ||
| ) |
Searches and set the next random available channel.
| nextChanParams | Parameters of next channel to use for TX. |
| channel | Next channel to use for TX. |
| time | Time to wait for the next transmission according to the duty cycle. |
| aggregatedTimeOff | Updates the aggregated time off. |
| Function | status [1: OK, 0: Unable to find a channel on the current datarate] |
| LoRaMacStatus_t RegionAS923ChannelAdd | ( | ChannelAddParams_t * | channelAdd | ) |
Adds a channel.
| channelAdd | Pointer to the function parameters. |
| Status | of the operation. |
| bool RegionAS923ChannelsRemove | ( | ChannelRemoveParams_t * | channelRemove | ) |
Removes a channel.
| channelRemove | Pointer to the function parameters. |
| Returns | true, if the channel was removed successfully. |
| void RegionAS923SetContinuousWave | ( | ContinuousWaveParams_t * | continuousWave | ) |
Sets the radio into continuous wave mode.
| continuousWave | Pointer to the function parameters. |
| uint8_t RegionAS923ApplyDrOffset | ( | uint8_t | downlinkDwellTime, |
| int8_t | dr, | ||
| int8_t | drOffset | ||
| ) |
Computes new datarate according to the given offset.
| downlinkDwellTime | Downlink dwell time configuration. 0: No limit, 1: 400ms |
| dr | Current datarate |
| drOffset | Offset to be applied |
| newDr | Computed datarate. |
| bool RegionAS923SetVersion | ( | uint8_t | version | ) |
Adjust frequency band to AS923-1, AS923-2, AS923-3.
| version | 1 => use default frequencies (AS923-1) 2 => adjust frequencies by substracting 1.8MHz (AS923-2) 3 => adjust frequencies by substracting 6.6MHz (AS923-3) 4 => adjust frequencies by substracting 5.9MHz (AS923-4), only lower 8 channels supported |
|
static |
Data rates table definition
|
static |
Bandwidths table definition in Hz
|
static |
Maximum payload with respect to the datarate index. Cannot operate with repeater. The table is valid for the dwell time configuration of 0 for uplinks and downlinks.
|
static |
Maximum payload with respect to the datarate index. Can operate with repeater. The table is valid for the dwell time configuration of 0 for uplinks and downlinks. The table provides repeater support.
|
static |
Maximum payload with respect to the datarate index. Can operate with and without repeater. The table proides repeater support. The table is only valid for uplinks.
|
static |
Maximum payload with respect to the datarate index. Can operate with and without repeater. The table proides repeater support. The table is only valid for downlinks.
|
static |
Effective datarate offsets for receive window 1.


La Nuit Americaine
(Day for Night, 1973; French with English subtitles)
Seen at the Paris for $8.50 on 17 August 1997.
The latest trend re-releasing lovingly restored or simply significant films, 25 years or older (the exception being *Dirty Dancing*, being completely remerchandised after a decade).
*Day for Night* is one of those movies every film student knows about bu t never sees, and since I eschew video, I was grateful to stumble upon the current screening just by walked past the theatre.
The premise of *Day for Night* is simple: What goes on behind the scenes of a film being made? Who cares? Many people don't but I loved it. The characters all ring true, but they are not absolutely fascinating and compelling. The true star of the film is the filmmaking process. The shooting, the retakes, the "family" dynamics that take place and then vanish when the film is over, the pressure to complete the film against all odds. How do you deal with the drunken Italian actress who can never remembers a line? How do you film a pregnant woman who is showing and her main scene is poolside? Will neurotic English actress Julie Baker (Jaqueline Bisset), show up on time, or flip out, again? Why is the production manager's wife always nearby, knitting furiously and scowling at every miniskirt? Why won't that damned kitten drink the milk already?
These issues confront the director (play ed by the film's director, Francois Truffaut) as he films *Meet Pamela.* It might look like everything that can possibly wrong is--but guess what? That's show biz. The final product looks dreamy and seamless, but problems and a hell of a lot of waiting be tween takes goes into every film. Scenes are improvised and scenes are dropped; your private conversations appear in new dialogue; the show must go on (film).
*Day for Night* is told frankly against the backdrop of an angst-ridden tragic romance being filmed. What is interesting, and probably more interesting on repeated viewings, is the parallel of real lives compared to the film. Life goes on for the cast and crew despite the filming *and* their personal crises. In *Meet Pamela*, things are much more simple; the new wife has an affair with her father-in-law and the son kills his father; Pamela dies. All very neat and tidy--and fatalistic--those tragedies. Not so in real life. True confessions are made and somehow, people just deal with it. Amazing.
Recent films like imitate *Day for Night*: *Living in Oblivion* and *The Paper*; the former is an over-the-top comedy while the latter is a typical Hollywood star vehicle about the newspaper business. They are fine, but their focusing on the obvious is blissfully absent here. It's lighthearted and funny "because it is true," for lack of a better cliche.
All but three of the actors are probably unfamiliar to American viewers: Truffaut himself, the bilingual Bisset (recently speaking French in *La Ceremonie*) and Jean-Pierre Leaud, a longtime actor fixture in Truffaut's films, most notably as Antoine Doinel, a character chronicled in several films, starting with The 400 Blows (shown on Bravo).
Also notable: The Paris treated us to a cartoon as well--starring the well-known French actor Pepe le Pew.  I then took a brisk walk to the wonder Wondee Siam for takeout.
Copyright (c) 1997 Seth J. Bookey, New York, NY 10021
More movie reviews by Seth Bookey, with graphics, can be found at http://www.geocities.com/Athens/2679/kino.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document outlines a proposed simplification of the XML Signature Transform mechanism, intended to enhance security, performance, streamability and to ease adoption.
This document has been superseded.
The information in this document is incorporated into the following documents:
A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/.