-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathERGMmain
32 lines (27 loc) · 1.04 KB
/
ERGMmain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Amount of sample groups and number of data points in plot.
numberOfSteps =15
# Defining amount of vertices in graph G.
d=round(Int,linspace(10,10, numberOfSteps))
# Value for the arbitrary parameters, psy.
psy = zeros(2, numberOfSteps)
psy[1,:] = linspace(0.5,0.5, numberOfSteps) #edges
psy[2,:] = linspace(0.5,0.5, numberOfSteps) #triangles
# Amount of Glauber steps in graphmarkov.
markovit=round(Int,linspace(100, 1000, numberOfSteps))
# Amount of data to construct empirical expectation.
n=round(Int,linspace(500, 500, numberOfSteps))
# Amount of iterations for convergence.
convit = 1
# Amount of data in each sample group.
varit = 30
# Real parameter values.
theta_star = [0.5,0.5]
# Create matrices of means and stds of most likly values of theta_1 and theta_2
MeanVec, StdVec = PlotVarExplanatoryMarkov(numberOfSteps, d, psy, markovit, n, convit, varit)
# Write information to files
file = open("StdVec.txt", "w+")
writedlm(file, StdVec)
close(file)
file = open("MeanVec.txt", "w+")
writedlm(file, MeanVec)
close(file)