ModelSummary and Stargazer fail when RQ s.e. calculation fails
stargazer(m_demo_int_qr)
Error in base::backsolve(r, x, k = k, upper.tri = upper.tri, transpose = transpose, :
singular matrix in 'backsolve'. First zero in diagonal [13]
------------- | |
set.seed(123) | |
# Step 1: Simulate Population | |
num_strata <- 10 # Number of strata | |
population_size <- 100000 # Total population size | |
# Generate strata sizes and proportions |
# Set random seed for reproducibility | |
set.seed(123) | |
# Time t parameters | |
n_novels_x_t <- 500 # 50% of 1000 novels are type x at time t | |
n_novels_y_t <- 500 | |
k <- 30 # 30% more likely to read type x | |
total_readings <- 800 # Fixed total reading capacity | |
# Time t simulation |
# Set seed for reproducibility | |
set.seed(123) | |
# Number of observations | |
n <- 1000 | |
# Simulate a perfectly measured outcome (Y_perfect) | |
# Treatment effect | |
treatment_effect <- 5 | |
base_noise <- rnorm(n, mean = 0, sd = 1) # Base noise for the perfect outcome |
library(readr) | |
shrug <- read_csv("/Users/soodoku/Downloads/shrug-vd11-csv/pc11_vd_clean_shrid.csv") | |
# Take out missing from village pop (just 1) and sort | |
t_pop <- shrug$pc11_vd_t_p[!is.na(shrug$pc11_vd_t_p)] | |
sorted_values <- sort(t_pop, decreasing = TRUE) | |
# We have like 570k villages. 50k villages have ... | |
sum(sorted_values[1:50000])/sum(sorted_values) | |
# [1] 0.3720554 |
page | क्र ० सं ० | जाति | आंकड़ा | प्रतिशत ( % ) | |
---|---|---|---|---|---|
0 | 1 | अघोरी | 9039 | 0.0069 % | |
0 | 2 | अदरखी | 30857 | 0.0236 % | |
0 | 3 | अबदल | 11433 | 0.0087 % | |
0 | 4 | अमात | 285221 | 0.2182 % | |
0 | 5 | अवध बनिया | 41643 | 0.0319 % | |
0 | 6 | असुर , अगरिया | 7706 | 0.0059 % | |
0 | 7 | इदरीसी या दर्जी ( मुस्लिम ) | 329661 | 0.2522 % | |
0 | 8 | ईटफरोश / ईटाफरोश / गदहेड़ी / ईटपज इब्राहिमी ( मुस्लिम ) | 9462 | 0.0072 % | |
0 | 9 | इसाई धर्मावलंबी ( हरिजन ) | 9708 | 0.0074 % |
State,Name,Party,Rel.,Prior Exp.,Education,Year in,Born,Top College,R Top Coll.,D Top Coll.,Ad. Degree,R ,D | |
Alabama ,Richard Shelby ,Republican ,Presbyterian ,"U.S. House, Alabama Senate ","Alabama (BA, JD) ",1987,1934,,0,0,1,1,0 | |
Alabama ,"Sessions, JeffJeff Sessions ",Republican ,Methodist ,Alabama Attorney General ,"Huntingdon College, University of Alabama ",1997,1946,,0,0,1,1,0 | |
Alaska ,"Murkowski, LisaLisa Murkowski ",Republican ,Roman Catholic ,Alaska House of Representatives ,"Georgetown, Willamette ",2002,1957,,0,0,1,1,0 | |
Alaska ,"Begich, MarkMark Begich ",Democratic ,Roman Catholic ,Mayor of Anchorage ,University of Alaska Anchorage (attended) ,2009,1962,,0,0,,0,0 | |
Arizona ,"McCain, JohnJohn McCain ",Republican ,Baptist[1] ,"U.S. House, military ",U.S. Naval Academy[2] ,1987,1936,,0,0,1,1,0 | |
Arizona ,"Kyl, JonJon Kyl ",Republican ,Presbyterian ,U.S. House ,"Arizona (BA, JD) ",1995,1942,,0,0,1,1,0 | |
Arkansas ,"Lincoln, BlancheBlanche Lincoln ",Democratic ,Episcopalian ,U.S. House ,"Randolph-Macon Women\'s C |