## Warning: package 'modelsummary' was built under R version 4.2.3
## Warning: package 'fst' was built under R version 4.2.3
## Warning: package 'viridis' was built under R version 4.2.3
## Loading required package: viridisLite
## Warning: package 'viridisLite' was built under R version 4.2.3
## Warning: package 'knitr' was built under R version 4.2.3
## Warning: package 'kableExtra' was built under R version 4.2.3
##
## Attaching package: 'kableExtra'
##
## The following object is masked from 'package:dplyr':
##
## group_rows
## Warning: package 'rmarkdown' was built under R version 4.2.3
## Warning: package 'ggridges' was built under R version 4.2.3
## Warning: package 'questionr' was built under R version 4.2.3
## Warning: package 'flextable' was built under R version 4.2.3
##
## Attaching package: 'flextable'
##
## The following objects are masked from 'package:kableExtra':
##
## as_image, footnote
##
## The following object is masked from 'package:purrr':
##
## compose
## Warning: package 'infer' was built under R version 4.2.3
## Warning: package 'effects' was built under R version 4.2.3
## Loading required package: carData
## Warning: package 'carData' was built under R version 4.2.3
## lattice theme set by effectsTheme()
## See ?effectsTheme for details.
## Warning: package 'survey' was built under R version 4.2.3
Calculating the p-value of sample for education level
p_val <- null_distribution %>%
get_pvalue(obs_stat = test_stat, direction = "greater")
## Warning: Please be cautious in reporting a p-value of 0. This result is an
## approximation based on the number of `reps` chosen in the `generate()` step.
## See `?get_p_value()` for more information.
p_val
## # A tibble: 1 × 1
## p_value
## <dbl>
## 1 0
Visualising for education level
null_distribution %>%
visualize() +
shade_p_value(obs_stat = test_stat, direction = "greater")
## Warning in min(diff(unique_loc)): no non-missing arguments to min; returning
## Inf
Calculating test statistic for number of intimate friends
Calculating the p-value of sample for number of intimate
friends
p_friend <- null_friend %>%
get_pvalue(obs_stat = friend_stat, direction = "greater")
## Warning: Please be cautious in reporting a p-value of 0. This result is an
## approximation based on the number of `reps` chosen in the `generate()` step.
## See `?get_p_value()` for more information.
p_friend
## # A tibble: 1 × 1
## p_value
## <dbl>
## 1 0
Visualising for number of intimate friends
null_friend %>%
visualize() +
shade_p_value(obs_stat = friend_stat, direction = "greater")
## Warning in min(diff(unique_loc)): no non-missing arguments to min; returning
## Inf
Calculating the p-value of sample for income decile
p_income <- null_income %>%
get_pvalue(obs_stat = income_stat, direction = "greater")
## Warning: Please be cautious in reporting a p-value of 0. This result is an
## approximation based on the number of `reps` chosen in the `generate()` step.
## See `?get_p_value()` for more information.
p_income
## # A tibble: 1 × 1
## p_value
## <dbl>
## 1 0
Visualising for income decile
null_income %>%
visualize() +
shade_p_value(obs_stat = income_stat, direction = "greater")
## Warning in min(diff(unique_loc)): no non-missing arguments to min; returning
## Inf
Modelling (Education Attainment and Number of Intimate Friends)
## Warning: package 'dplyr' is in use and will not be installed
## Installing packages into 'C:/Users/yi en/AppData/Local/R/win-library/4.2'
## (as 'lib' is unspecified)
## package 'xfun' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'xfun'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\xfun\libs\x64\xfun.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\xfun\libs\x64\xfun.dll:
## Permission denied
## Warning: restored 'xfun'
## package 'rlang' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'rlang'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\rlang\libs\x64\rlang.dll
## to C:\Users\yi en\AppData\Local\R\win-library\4.2\rlang\libs\x64\rlang.dll:
## Permission denied
## Warning: restored 'rlang'
## package 'cli' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'cli'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\cli\libs\x64\cli.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\cli\libs\x64\cli.dll: Permission
## denied
## Warning: restored 'cli'
## package 'sass' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'sass'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\sass\libs\x64\sass.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\sass\libs\x64\sass.dll:
## Permission denied
## Warning: restored 'sass'
## package 'jsonlite' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'jsonlite'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi
## en\AppData\Local\R\win-library\4.2\00LOCK\jsonlite\libs\x64\jsonlite.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\jsonlite\libs\x64\jsonlite.dll:
## Permission denied
## Warning: restored 'jsonlite'
## package 'later' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'later'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\later\libs\x64\later.dll
## to C:\Users\yi en\AppData\Local\R\win-library\4.2\later\libs\x64\later.dll:
## Permission denied
## Warning: restored 'later'
## package 'vctrs' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'vctrs'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\vctrs\libs\x64\vctrs.dll
## to C:\Users\yi en\AppData\Local\R\win-library\4.2\vctrs\libs\x64\vctrs.dll:
## Permission denied
## Warning: restored 'vctrs'
## package 'fansi' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'fansi'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\fansi\libs\x64\fansi.dll
## to C:\Users\yi en\AppData\Local\R\win-library\4.2\fansi\libs\x64\fansi.dll:
## Permission denied
## Warning: restored 'fansi'
## package 'stringi' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'stringi'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi
## en\AppData\Local\R\win-library\4.2\00LOCK\stringi\libs\x64\stringi.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\stringi\libs\x64\stringi.dll:
## Permission denied
## Warning: restored 'stringi'
## package 'yaml' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'yaml'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi en\AppData\Local\R\win-library\4.2\00LOCK\yaml\libs\x64\yaml.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\yaml\libs\x64\yaml.dll:
## Permission denied
## Warning: restored 'yaml'
## package 'httpuv' successfully unpacked and MD5 sums checked
## Warning: cannot remove prior installation of package 'httpuv'
## Warning in file.copy(savedcopy, lib, recursive = TRUE): problem copying
## C:\Users\yi
## en\AppData\Local\R\win-library\4.2\00LOCK\httpuv\libs\x64\httpuv.dll to
## C:\Users\yi en\AppData\Local\R\win-library\4.2\httpuv\libs\x64\httpuv.dll:
## Permission denied
## Warning: restored 'httpuv'
##
## The downloaded binary packages are in
## C:\Users\yi en\AppData\Local\Temp\RtmpcfdJeC\downloaded_packages
## ── R CMD build ─────────────────────────────────────────────────────────────────
## WARNING: Rtools is required to build R packages, but is not currently installed.
##
## Please download and install Rtools 4.2 from https://cran.r-project.org/bin/windows/Rtools/.
##
checking for file 'C:\Users\yi en\AppData\Local\Temp\RtmpcfdJeC\remotes362c33d46076\datalorax-equatiomatic-39e8c3e/DESCRIPTION' ...
✔ checking for file 'C:\Users\yi en\AppData\Local\Temp\RtmpcfdJeC\remotes362c33d46076\datalorax-equatiomatic-39e8c3e/DESCRIPTION' (430ms)
##
─ preparing 'equatiomatic': (2.5s)
## checking DESCRIPTION meta-information ...
checking DESCRIPTION meta-information ...
✔ checking DESCRIPTION meta-information
##
─ checking for LF line-endings in source and make files and shell scripts
##
─ checking for empty or unneeded directories
##
─ building 'equatiomatic_0.3.1.tar.gz'
##
##
## Installing package into 'C:/Users/yi en/AppData/Local/R/win-library/4.2'
## (as 'lib' is unspecified)
# Getting the equation
equatiomatic::extract_eq(model2, use_coefs = TRUE)