SlideShare ist ein Scribd-Unternehmen logo
1 von 4
#------------------------------------------------------------------------------------# REFsim by D V M Bishop
# Simulates impact of REF on university income
# 13/10/13
#------------------------------------------------------------------------------------# Plots funding income for each university over each funding cycle
# Assumes greater funding allows higher-level academics are appointed
# You can vary the following:
# N universities (Nunis)
# Nstaff per university (Nstaff; currently constant for all unis)
# turnover ; proportion of staff changing over each cycle
# nrounds ; number of cycles of hiring/REF
# cutoff; mycut dimension: zscores corresponding to 1*,2*,3*,4* the higher cut[4] is, the fewer will
meet 4*
# starwt; dimension specifying weighting given to each star level
# budget; arbitrary - currently kept constant at each cycle
# plotdec; determines whether plot shows all unis or grouped into deciles
# results also depend on unipower, which is computed below
# unipower determines how spending power relates to calibre of new academics
# it's a weighted z-score of income
Nacads=10000; #total pool of academics
Nunis=100
Nstaff=50

# N universities
#Nstaff per uni

turnover=.1; #% staff change each run
turnstaff=round(turnover*Nstaff)
nrounds=6;
mycut=c(-1,0,1,2)
#zscorecutoffs for 1star, 2star,3star and 4star
#determines the percentage of cases meeting criteria for each star band
starwt=c(0,0,1,9)
#determines the weighting given to each star in funding formula band
budget=5000; #arbitrary number to keep total spend constant over time
plotdec=0; #set to one to plot decile ranges rather than all unis
uniall=matrix(rep(0,nrounds*Nunis),nrow=Nunis)#initialise matrix
#------------------------------------------------------------------------acadscore=rnorm(n=Nacads, m=0, sd=1) #random normal distribution of outputs
#assign academics to universities
acaduni = matrix(
sample(acadscore,Nstaff*Nunis), # the data elements
nrow=Nunis ,

# number of rows

ncol=Nstaff,

# number of columns

byrow = TRUE)

#--------------------------------------------------------------# initialise funds to zero for all
#--------------------------------------------------------------fundsuni=matrix(rep(0,Nstaff*Nunis),
nrow=Nunis, ncol=Nstaff)
#------------------------------------------------------------#
# loop start here
#-----------------------------------------------------------for (thisround in 1:nrounds){
fourstar=which(acaduni>mycut[4])
threestar=which(acaduni>mycut[3])
twostar=which(acaduni>mycut[2])
onestar=which(acaduni>mycut[1])
fundsuni[onestar]=starwt[1]
fundsuni[twostar]=starwt[2];
fundsuni[threestar]=starwt[3];
fundsuni[fourstar]=starwt[4];

unirawtotalincome=rowSums(fundsuni) #income per uni not adjusted for budget
unitotalincome=budget*unirawtotalincome/sum(unirawtotalincome) #adjusted for budget

#uncomment lines below to show histogram
# mytitle=c('round',thisround,'totalspend',sum(unitotalincome))
# hist(unitotalincome,main=mytitle,breaks=10)

#readline("Press <return> on console to continue")

incmean=mean(unitotalincome)
incsd=sd(unitotalincome)

unipower=(unitotalincome-incmean)/(incsd*.75) #formula that relates income to
# calibre of new staff

for (thisuni in 1:Nunis){
changestaff=sample(1:Nstaff,turnstaff)
acaduni[thisuni,changestaff]=acaduni[thisuni,changestaff]+unipower[thisuni]
}
uniall[,thisround]=unitotalincome
}
# for plotting sort the unis by income
unisorted=(uniall[order(uniall[,1]),] )

pickuni=seq(1,Nunis,by=10)#pick every 10th uni
uniall2=(unisorted[pickuni,]+unisorted[pickuni+1,]+unisorted[pickuni+2,]+unisorted[pickuni+3,]+unis
orted[pickuni+4,]+unisorted[pickuni+5,]+unisorted[pickuni+6,]+unisorted[pickuni+7,]+unisorted[pick
uni+8,]+unisorted[pickuni+9,])/10
mytitle=t(c('Weights: 1*=',starwt[1],"; 2*=",starwt[2],'; 3*=',starwt[3],'; 4*=',starwt[4]))
mydata=uniall #default plot all unis
if (plotdec==1){
mydata=uniall2 #otherwise plot decile bands

}
matplot(t(mydata),type='l',lwd=2,las=1,xlab='Cycle',ylab='Income',main=paste(mytitle,collapse=''),co
l=1,lty=2,ylim=c(0,300))

Weitere ähnliche Inhalte

Was ist angesagt?

Read/Import data from flat/delimited files into R
Read/Import data from flat/delimited files into RRead/Import data from flat/delimited files into R
Read/Import data from flat/delimited files into RRsquared Academy
 
Gate level minimization (1st update)
Gate level minimization (1st update)Gate level minimization (1st update)
Gate level minimization (1st update)Aravir Rose
 
Game and Search
Game and SearchGame and Search
Game and SearchAdri Jovin
 
First step of Performance Tuning
First step of Performance TuningFirst step of Performance Tuning
First step of Performance Tuningrisou
 
Read data from Excel spreadsheets into R
Read data from Excel spreadsheets into RRead data from Excel spreadsheets into R
Read data from Excel spreadsheets into RRsquared Academy
 

Was ist angesagt? (8)

Introduction to tibbles
Introduction to tibblesIntroduction to tibbles
Introduction to tibbles
 
Read/Import data from flat/delimited files into R
Read/Import data from flat/delimited files into RRead/Import data from flat/delimited files into R
Read/Import data from flat/delimited files into R
 
Gate level minimization (1st update)
Gate level minimization (1st update)Gate level minimization (1st update)
Gate level minimization (1st update)
 
เซต
เซตเซต
เซต
 
Game and Search
Game and SearchGame and Search
Game and Search
 
First step of Performance Tuning
First step of Performance TuningFirst step of Performance Tuning
First step of Performance Tuning
 
Read data from Excel spreadsheets into R
Read data from Excel spreadsheets into RRead data from Excel spreadsheets into R
Read data from Excel spreadsheets into R
 
Presentation1
Presentation1Presentation1
Presentation1
 

Ähnlich wie Refsim (R program)

Common Performance Pitfalls in Odoo apps
Common Performance Pitfalls in Odoo appsCommon Performance Pitfalls in Odoo apps
Common Performance Pitfalls in Odoo appsOdoo
 
Understanding Optimizer-Statistics-for-Developers
Understanding Optimizer-Statistics-for-DevelopersUnderstanding Optimizer-Statistics-for-Developers
Understanding Optimizer-Statistics-for-DevelopersEnkitec
 
Math primar primary 3 المراجعة النهائية لنصف العام
Math primar primary 3 المراجعة النهائية لنصف العام Math primar primary 3 المراجعة النهائية لنصف العام
Math primar primary 3 المراجعة النهائية لنصف العام أمنية وجدى
 
Color Palettes in R
Color Palettes in RColor Palettes in R
Color Palettes in RMichel Alves
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersRiyaj Shamsudeen
 

Ähnlich wie Refsim (R program) (8)

Sql2
Sql2Sql2
Sql2
 
Common Performance Pitfalls in Odoo apps
Common Performance Pitfalls in Odoo appsCommon Performance Pitfalls in Odoo apps
Common Performance Pitfalls in Odoo apps
 
Understanding Optimizer-Statistics-for-Developers
Understanding Optimizer-Statistics-for-DevelopersUnderstanding Optimizer-Statistics-for-Developers
Understanding Optimizer-Statistics-for-Developers
 
Math primar primary 3 المراجعة النهائية لنصف العام
Math primar primary 3 المراجعة النهائية لنصف العام Math primar primary 3 المراجعة النهائية لنصف العام
Math primar primary 3 المراجعة النهائية لنصف العام
 
SQLQueries
SQLQueriesSQLQueries
SQLQueries
 
Input output
Input outputInput output
Input output
 
Color Palettes in R
Color Palettes in RColor Palettes in R
Color Palettes in R
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
 

Mehr von Dorothy Bishop

Exercise/fish oil intervention for dyslexia
Exercise/fish oil intervention for dyslexiaExercise/fish oil intervention for dyslexia
Exercise/fish oil intervention for dyslexiaDorothy Bishop
 
Open Research Practices in the Age of a Papermill Pandemic
Open Research Practices in the Age of a Papermill PandemicOpen Research Practices in the Age of a Papermill Pandemic
Open Research Practices in the Age of a Papermill PandemicDorothy Bishop
 
Language-impaired preschoolers: A follow-up into adolescence.
Language-impaired preschoolers: A follow-up into adolescence.Language-impaired preschoolers: A follow-up into adolescence.
Language-impaired preschoolers: A follow-up into adolescence.Dorothy Bishop
 
Journal club summary: Open Science save lives
Journal club summary: Open Science save livesJournal club summary: Open Science save lives
Journal club summary: Open Science save livesDorothy Bishop
 
Short talk on 2 cognitive biases and reproducibility
Short talk on 2 cognitive biases and reproducibilityShort talk on 2 cognitive biases and reproducibility
Short talk on 2 cognitive biases and reproducibilityDorothy Bishop
 
Otitis media with effusion: an illustration of ascertainment bias
Otitis media with effusion: an illustration of ascertainment biasOtitis media with effusion: an illustration of ascertainment bias
Otitis media with effusion: an illustration of ascertainment biasDorothy Bishop
 
Insights from psychology on lack of reproducibility
Insights from psychology on lack of reproducibilityInsights from psychology on lack of reproducibility
Insights from psychology on lack of reproducibilityDorothy Bishop
 
What are metrics good for? Reflections on REF and TEF
What are metrics good for? Reflections on REF and TEFWhat are metrics good for? Reflections on REF and TEF
What are metrics good for? Reflections on REF and TEFDorothy Bishop
 
Biomarkers for psychological phenotypes?
Biomarkers for psychological phenotypes?Biomarkers for psychological phenotypes?
Biomarkers for psychological phenotypes?Dorothy Bishop
 
Data simulation basics
Data simulation basicsData simulation basics
Data simulation basicsDorothy Bishop
 
Simulating data to gain insights into power and p-hacking
Simulating data to gain insights intopower and p-hackingSimulating data to gain insights intopower and p-hacking
Simulating data to gain insights into power and p-hackingDorothy Bishop
 
Talk on reproducibility in EEG research
Talk on reproducibility in EEG researchTalk on reproducibility in EEG research
Talk on reproducibility in EEG researchDorothy Bishop
 
What is Developmental Language Disorder
What is Developmental Language DisorderWhat is Developmental Language Disorder
What is Developmental Language DisorderDorothy Bishop
 
Developmental language disorder and auditory processing disorder: 
Same or di...
Developmental language disorder and auditory processing disorder: 
Same or di...Developmental language disorder and auditory processing disorder: 
Same or di...
Developmental language disorder and auditory processing disorder: 
Same or di...Dorothy Bishop
 
Fallibility in science: Responsible ways to handle mistakes
Fallibility in science: Responsible ways to handle mistakesFallibility in science: Responsible ways to handle mistakes
Fallibility in science: Responsible ways to handle mistakesDorothy Bishop
 
Improve your study with pre-registration
Improve your study with pre-registrationImprove your study with pre-registration
Improve your study with pre-registrationDorothy Bishop
 
Introduction to simulating data to improve your research
Introduction to simulating data to improve your researchIntroduction to simulating data to improve your research
Introduction to simulating data to improve your researchDorothy Bishop
 
Southampton: lecture on TEF
Southampton: lecture on TEFSouthampton: lecture on TEF
Southampton: lecture on TEFDorothy Bishop
 
Reading list: What’s wrong with our universities
Reading list: What’s wrong with our universitiesReading list: What’s wrong with our universities
Reading list: What’s wrong with our universitiesDorothy Bishop
 
IJLCD Winter Lecture 2016-7 : References
IJLCD Winter Lecture 2016-7 : ReferencesIJLCD Winter Lecture 2016-7 : References
IJLCD Winter Lecture 2016-7 : ReferencesDorothy Bishop
 

Mehr von Dorothy Bishop (20)

Exercise/fish oil intervention for dyslexia
Exercise/fish oil intervention for dyslexiaExercise/fish oil intervention for dyslexia
Exercise/fish oil intervention for dyslexia
 
Open Research Practices in the Age of a Papermill Pandemic
Open Research Practices in the Age of a Papermill PandemicOpen Research Practices in the Age of a Papermill Pandemic
Open Research Practices in the Age of a Papermill Pandemic
 
Language-impaired preschoolers: A follow-up into adolescence.
Language-impaired preschoolers: A follow-up into adolescence.Language-impaired preschoolers: A follow-up into adolescence.
Language-impaired preschoolers: A follow-up into adolescence.
 
Journal club summary: Open Science save lives
Journal club summary: Open Science save livesJournal club summary: Open Science save lives
Journal club summary: Open Science save lives
 
Short talk on 2 cognitive biases and reproducibility
Short talk on 2 cognitive biases and reproducibilityShort talk on 2 cognitive biases and reproducibility
Short talk on 2 cognitive biases and reproducibility
 
Otitis media with effusion: an illustration of ascertainment bias
Otitis media with effusion: an illustration of ascertainment biasOtitis media with effusion: an illustration of ascertainment bias
Otitis media with effusion: an illustration of ascertainment bias
 
Insights from psychology on lack of reproducibility
Insights from psychology on lack of reproducibilityInsights from psychology on lack of reproducibility
Insights from psychology on lack of reproducibility
 
What are metrics good for? Reflections on REF and TEF
What are metrics good for? Reflections on REF and TEFWhat are metrics good for? Reflections on REF and TEF
What are metrics good for? Reflections on REF and TEF
 
Biomarkers for psychological phenotypes?
Biomarkers for psychological phenotypes?Biomarkers for psychological phenotypes?
Biomarkers for psychological phenotypes?
 
Data simulation basics
Data simulation basicsData simulation basics
Data simulation basics
 
Simulating data to gain insights into power and p-hacking
Simulating data to gain insights intopower and p-hackingSimulating data to gain insights intopower and p-hacking
Simulating data to gain insights into power and p-hacking
 
Talk on reproducibility in EEG research
Talk on reproducibility in EEG researchTalk on reproducibility in EEG research
Talk on reproducibility in EEG research
 
What is Developmental Language Disorder
What is Developmental Language DisorderWhat is Developmental Language Disorder
What is Developmental Language Disorder
 
Developmental language disorder and auditory processing disorder: 
Same or di...
Developmental language disorder and auditory processing disorder: 
Same or di...Developmental language disorder and auditory processing disorder: 
Same or di...
Developmental language disorder and auditory processing disorder: 
Same or di...
 
Fallibility in science: Responsible ways to handle mistakes
Fallibility in science: Responsible ways to handle mistakesFallibility in science: Responsible ways to handle mistakes
Fallibility in science: Responsible ways to handle mistakes
 
Improve your study with pre-registration
Improve your study with pre-registrationImprove your study with pre-registration
Improve your study with pre-registration
 
Introduction to simulating data to improve your research
Introduction to simulating data to improve your researchIntroduction to simulating data to improve your research
Introduction to simulating data to improve your research
 
Southampton: lecture on TEF
Southampton: lecture on TEFSouthampton: lecture on TEF
Southampton: lecture on TEF
 
Reading list: What’s wrong with our universities
Reading list: What’s wrong with our universitiesReading list: What’s wrong with our universities
Reading list: What’s wrong with our universities
 
IJLCD Winter Lecture 2016-7 : References
IJLCD Winter Lecture 2016-7 : ReferencesIJLCD Winter Lecture 2016-7 : References
IJLCD Winter Lecture 2016-7 : References
 

Kürzlich hochgeladen

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Kürzlich hochgeladen (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Refsim (R program)

  • 1. #------------------------------------------------------------------------------------# REFsim by D V M Bishop # Simulates impact of REF on university income # 13/10/13 #------------------------------------------------------------------------------------# Plots funding income for each university over each funding cycle # Assumes greater funding allows higher-level academics are appointed # You can vary the following: # N universities (Nunis) # Nstaff per university (Nstaff; currently constant for all unis) # turnover ; proportion of staff changing over each cycle # nrounds ; number of cycles of hiring/REF # cutoff; mycut dimension: zscores corresponding to 1*,2*,3*,4* the higher cut[4] is, the fewer will meet 4* # starwt; dimension specifying weighting given to each star level # budget; arbitrary - currently kept constant at each cycle # plotdec; determines whether plot shows all unis or grouped into deciles # results also depend on unipower, which is computed below # unipower determines how spending power relates to calibre of new academics # it's a weighted z-score of income Nacads=10000; #total pool of academics Nunis=100 Nstaff=50 # N universities #Nstaff per uni turnover=.1; #% staff change each run turnstaff=round(turnover*Nstaff) nrounds=6; mycut=c(-1,0,1,2)
  • 2. #zscorecutoffs for 1star, 2star,3star and 4star #determines the percentage of cases meeting criteria for each star band starwt=c(0,0,1,9) #determines the weighting given to each star in funding formula band budget=5000; #arbitrary number to keep total spend constant over time plotdec=0; #set to one to plot decile ranges rather than all unis uniall=matrix(rep(0,nrounds*Nunis),nrow=Nunis)#initialise matrix #------------------------------------------------------------------------acadscore=rnorm(n=Nacads, m=0, sd=1) #random normal distribution of outputs #assign academics to universities acaduni = matrix( sample(acadscore,Nstaff*Nunis), # the data elements nrow=Nunis , # number of rows ncol=Nstaff, # number of columns byrow = TRUE) #--------------------------------------------------------------# initialise funds to zero for all #--------------------------------------------------------------fundsuni=matrix(rep(0,Nstaff*Nunis), nrow=Nunis, ncol=Nstaff) #------------------------------------------------------------# # loop start here #-----------------------------------------------------------for (thisround in 1:nrounds){ fourstar=which(acaduni>mycut[4]) threestar=which(acaduni>mycut[3])
  • 3. twostar=which(acaduni>mycut[2]) onestar=which(acaduni>mycut[1]) fundsuni[onestar]=starwt[1] fundsuni[twostar]=starwt[2]; fundsuni[threestar]=starwt[3]; fundsuni[fourstar]=starwt[4]; unirawtotalincome=rowSums(fundsuni) #income per uni not adjusted for budget unitotalincome=budget*unirawtotalincome/sum(unirawtotalincome) #adjusted for budget #uncomment lines below to show histogram # mytitle=c('round',thisround,'totalspend',sum(unitotalincome)) # hist(unitotalincome,main=mytitle,breaks=10) #readline("Press <return> on console to continue") incmean=mean(unitotalincome) incsd=sd(unitotalincome) unipower=(unitotalincome-incmean)/(incsd*.75) #formula that relates income to # calibre of new staff for (thisuni in 1:Nunis){ changestaff=sample(1:Nstaff,turnstaff) acaduni[thisuni,changestaff]=acaduni[thisuni,changestaff]+unipower[thisuni] } uniall[,thisround]=unitotalincome
  • 4. } # for plotting sort the unis by income unisorted=(uniall[order(uniall[,1]),] ) pickuni=seq(1,Nunis,by=10)#pick every 10th uni uniall2=(unisorted[pickuni,]+unisorted[pickuni+1,]+unisorted[pickuni+2,]+unisorted[pickuni+3,]+unis orted[pickuni+4,]+unisorted[pickuni+5,]+unisorted[pickuni+6,]+unisorted[pickuni+7,]+unisorted[pick uni+8,]+unisorted[pickuni+9,])/10 mytitle=t(c('Weights: 1*=',starwt[1],"; 2*=",starwt[2],'; 3*=',starwt[3],'; 4*=',starwt[4])) mydata=uniall #default plot all unis if (plotdec==1){ mydata=uniall2 #otherwise plot decile bands } matplot(t(mydata),type='l',lwd=2,las=1,xlab='Cycle',ylab='Income',main=paste(mytitle,collapse=''),co l=1,lty=2,ylim=c(0,300))