Displaying 20 results from an estimated 3000 matches similar to: "Equivalent to go-to statement"
2011 May 03
3
Watts Strogatz game
Hi,
I have a erdos-renyi game with 6000 nodes and probability 0.003.
g1 = erdos.renyi.game(6000, 0.003)
How to create a Watts Strogatz game with the same probability.
g1 = watts.strogatz.game(1, 6000, ?, ?)
What should be the third and fourth parameter to this argument.
--
View this message in context: http://r.789695.n4.nabble.com/Watts-Strogatz-game-tp3491922p3491922.html
Sent from the R
2016 Apr 16
1
Social Network Simulation
Dear all,
I am trying to simulate a series of networks that have characteristics
similar to real life social networks. Specifically I am interested in
networks that have (a) a reasonable degree of clustering (as measured by
the transitivity function in igraph) and (b) a reasonable degree of degree
polarization (as measured by the average degree of the top 10% nodes with
highest degree divided by
2011 Apr 11
1
plot - kamada.kawai layout without arrows
Hi,
I am plotting a graph with kamada.kawai layout.
But I am getting direction arrows in the graphs.
Please let me know how to avoid this.
g <- watts.strogatz.game(1, 2000, 5, 0.4)
comps <- clusters(g)$membership
colbar <- rainbow(max(comps)+1)
V(g)$color <- colbar[comps+1]
png(filename)
plot(g, layout=layout.kamada.kawai, vertex.size=2, vertex.label=NA)
dev.off()
Please find
2011 May 13
6
Powerful PC to run R
Dear all,
I'm currently running R on my laptop -- a Lenovo Thinkpad X201 (Intel Core
i7 CPU, M620, 2.67 Ghz, 8 GB RAM). The problem is that some of my
calculations run for several days sometimes even weeks (mainly simulations
over a large parameter space). Depending on the external conditions, my
laptop sometimes shuts down due to overheating.
I'm now thinking about buying a more
2011 Apr 12
2
Testing equality of coefficients in coxph model
Dear all,
I'm running a coxph model of the form:
coxph(Surv(Start, End, Death.ID) ~ x1 + x2 + a1 + a2 + a3)
Within this model, I would like to compare the influence of x1 and x2 on the
hazard rate.
Specifically I am interested in testing whether the estimated coefficient
for x1 is equal (or not) to the estimated coefficient for x2.
I was thinking of using a Chow-test for this but the Chow
2013 Jan 22
2
Approximating discrete distribution by continuous distribution
Dear all,
I have a discrete distribution showing how age is distributed across a
population using a certain set of bands:
Age <- matrix(c(74045062, 71978405, 122718362, 40489415), ncol=1,
dimnames=list(c("<18", "18-34", "35-64", "65+"),c()))
Age_dist <- Age/sum(Age)
For example I know that 23.94% of all people are between 0-18 years, 23.28%
2011 Mar 26
1
Effect size in multiple regression
Dear all,
is there a convenient way to determine the effect size for a regression
coefficient in a multiple regression model?
I have a model of the form lm(y ~ A*B*C*D) and would like to determine
Cohen's f2 (http://en.wikipedia.org/wiki/Effect_size) for each predictor
without having to do it manually.
Thanks,
Michael
Michael Haenlein
Associate Professor of Marketing
ESCP Europe
Paris,
2010 Nov 11
2
predict.coxph and predict.survreg
Dear all,
I'm struggling with predicting "expected time until death" for a coxph and
survreg model.
I have two datasets. Dataset 1 includes a certain number of people for which
I know a vector of covariates (age, gender, etc.) and their event times
(i.e., I know whether they have died and when if death occurred prior to the
end of the observation period). Dataset 2 includes another
2010 Jul 26
1
After writing data in MMF using SEXP structure, can i reference in R?
Hi all,
After writing data in MMF(Memory Map File) using SEXP structure, can i
reference in R?
If input data is larger than 2GB, Can i reference MMF Data in R?
my work environment :
R version : 2.11.1
OS : WinXP Pro sp3
Thanks and best regards.
Park, Young-Ju
from Korea.
---------[ ???????? ???????? ???????? ]----------
???????? : R-help Digest, Vol 89,
2011 Sep 21
2
Cannot allocate vector of size x
Dear all,
I am running a simulation in which I randomly generate a series of vectors
to test whether they fulfill a certain condition. In most cases, there is no
problem. But from time to time, the (randomly) generated vectors are too
large for my system and I get the error message: "Cannot allocate vector of
size x".
The problem is that in those cases my simulation stops and I have to
2010 Jul 14
1
Printing status updates in while-loop
Dear all,
I'm using a while loop in the context of an iterative optimization
procedure. Within my while loop I have a counter variable that helps me to
determine how long the loop has been running. Before the loop I initialize
it as counter <- 0 and the last condition within my loop is counter <-
counter + 1.
I'd like to print out the current status of "counter" while the
2012 Apr 12
2
Curve fitting, probably splines
Dear all,
This is probably more related to statistics than to [R] but I hope someone
can give me an idea how to solve it nevertheless:
Assume I have a variable y that is a function of x: y=f(x). I know the
average value of y for different intervals of x. For example, I know that
in the interval[0;x1] the average y is y1, in the interval [x1;x2] the
average y is y2 and so forth.
I would like to
2011 Sep 19
1
Binary optimization problem in R
Dear all,
I would like to solve a problem similar to a multiple knapsack problem and
am looking for a function in R that can help me.
Specifically, my situation is as follows: I have a list of n items which I
would like to allocate to m groups with fixed size. Each item has a certain
profit value and this profit depends on the type of group the item is in. My
problem is to allocate the items
2010 Sep 08
1
Aggregating data from two data frames
Dear all,
I'm working with two data frames.
The first frame (agg_data) consists of two columns. agg_data[,1] is a unique
ID for each row and agg_data[,2] contains a continuous variable.
The second data frame (geo_data) consists of several columns. One of these
columns (geo_data$ZCTA) corresponds to the unique ID in the first data
frame. The problem is that only a subset of the unique ID
2011 Jul 15
2
Convert continuous variable into discrete variable
Dear all,
I have a continuous variable that can take on values between 0 and 100, for
example: x<-runif(100,0,100)
I also have a second variable that defines a series of thresholds, for
example: y<-c(3, 4.5, 6, 8)
I would like to convert my continuous variable into a discrete one using the
threshold variables:
If x is between 0 and 3 the discrete variable should be 1
If x is between 3
2012 May 08
1
Regression with very high number of categorical variables
Dear all,
I would like to run a simple regression model y~x1+x2+x3+...
The problem is that I have a lot of independent variables (xi) -- around
one hundred -- and that some of them are categorical with a lot of
categories (like, for example, ZIP code). One straightforward way would be
to (a) transform all categorical variables into 1/0 dummies and (b) enter
all the variables into an lm model.
2017 Dec 14
1
Aggregation across two variables in data.table
Dear all,
I have a data.frame that includes a series of demographic variables for a
set of respondents plus a dependent variable (Theta). For example:
Age Education Marital Familysize
Income Housing Theta
1: 50 Associate degree Divorced 4
70K+ Owned with mortgage 9.147777
2: 65
2010 Jul 13
1
Batch file export
Dear all,
I have a code that generates data vectors within R. For example assume:
z <- rlnorm(1000, meanlog = 0, sdlog = 1)
Every time a vector has been generated I would like to export it into a csv
file. So my idea is something as follows:
for (i in 1:100) {
z <- rlnorm(1000, meanlog = 0, sdlog = 1)
write.csv(z, "c:/z_i.csv")
Where "z_i.csv" is a filename that is
2012 Jun 18
0
igraph 0.6 released
Dear All,
we have released version 0.6 of the igraph package today. This is a
major new version, with a lot of new features, and (sadly) it is not
completely compatible with code that was written for the previous
igraph versions. (See "Major new features" below for details.)
I have included below a list of (bigger) changes. Please see the
details in the release notes and the NEWS
2012 Jun 18
0
igraph 0.6 released
Dear All,
we have released version 0.6 of the igraph package today. This is a
major new version, with a lot of new features, and (sadly) it is not
completely compatible with code that was written for the previous
igraph versions. (See "Major new features" below for details.)
I have included below a list of (bigger) changes. Please see the
details in the release notes and the NEWS