PLZ mke sure the package installed which contains "mvrnorm" function.
--
PO SU
mail: desolato...@163.com
Majored in Statistics from SJTU
At 2014-09-14 09:56:34, "thanoon younis" wrote:
>Dear R members
>I want to simulate data depending on SEM and when i applied the code below
>i found
Adding back the list address:
On Sep 14, 2014, at 9:53 AM, thanoon younis wrote:
> thank you for your help but i still have error after putting semicolon
> "Error: unexpected symbol in:
> "Ro<-matrix(data=c(7.0,2.1,2.1,7.0), ncol=2)
> yo<-matrix(data=NA,nrow=N,ncol=P) p""
The error message sho
On Sep 14, 2014, at 8:48 AM, Don McKenzie wrote:
ccing to list, as requested in the posting guide, so that others
may be able to help you.
On Sep 14, 2014, at 8:45 AM, thanoon younis > wrote:
Thank you very much for your reply
the output is
#Do simulation for 100 replications
N<-1000;
cc�ing to list, as requested in the posting guide, so that others may be able
to help you.
On Sep 14, 2014, at 8:45 AM, thanoon younis wrote:
> Thank you very much for your reply
>
> the output is
>
> > #Do simulation for 100 replications
> > N<-1000; P<-10
> >
> > phi<-matrix(data=c(1.0,0.3
What errors? What is your output? What output did you expect?
On Sep 14, 2014, at 6:56 AM, thanoon younis wrote:
> Dear R members
> I want to simulate data depending on SEM and when i applied the code below
> i found some errors and i still cannot run it.
> many thanks in advance
>
>
> Thano
Dear R members
I want to simulate data depending on SEM and when i applied the code below
i found some errors and i still cannot run it.
many thanks in advance
Thanoon
#Do simulation for 100 replications
N<-1000; P<-10
phi<-matrix(data=c(1.0,0.3,0.3,1.0),ncol=2) #The covariance matrix of xi
Ro<
dear all members
i am trying to simulate data with mixed ordered categorical and
dichotomous variables with 200 observation and 10 var. 5 ordered
categorical and 5 dichotomous and i want to put a high correlation between
variables so i must find correlation between dichotomous and the
correlation
dear all members
i have a problem with the code below, my problem in this code i want to put
a high correlation between variables in group R1 and also put a high
correlation between variables in group R2. after checking the correlation
between variables in R1 also between variables in R2 i didn't f
Dear Thanoon,
You might look at the various item simulation functions in the psych package.
In particular, for your problem:
R1 <- sim.irt(10,1000,a=3,low = -2, high=2)
R2 <- sim.irt(10,1000,a=3,low = -2, high=2)
R12 <- data.frame(R1$items,R2$items)
#this gives you 20 items, grouped with high c
Dear R-users
i need your help to solve my problem in the code below, i want to simulate
two different samples R1 and R2 and each sample has 10 variables and 1000
observations so i want to simulate a data with high correlation between
var. in R1 and also in R2 and no correlation between R1 and R2 a
Thanoon,
My reply to your previous post should be more than enough for you to
accomplish your goal. Please look over that script again:
ords <- seq(4)
p <- 10
N <- 1000
percent_change <- 0.9
R <- as.data.frame(replicate(p, sample(ords, N, replace = T)))
or alternatively as Mr. Barradas suggest
Hello,
At an R prompt type
?rbinom
?replicate
Hope this helps,
Rui Barradas
Em 10-04-2014 02:28, thanoon younis escreveu:
hi
i want to simulate multivariate dichotomous data matrix with categories
(0,1) and n=1000 and p=10.
thanks alot in advance
[[alternative HTML version deleted
On 10/04/14 09:28, thanoon younis wrote:
hi
i want to simulate multivariate dichotomous data matrix with categories
(0,1) and n=1000 and p=10.
Nobody's stopping you! :-)
cheers,
Rolf Turner
__
R-help@r-project.org mailing list
https://stat.ethz.ch
hi
i want to simulate multivariate dichotomous data matrix with categories
(0,1) and n=1000 and p=10.
thanks alot in advance
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Thanoon,
Firstly, please remember to reply to the R help list as well so that other
may benefit from your questions as well.
Regarding your second request, I have written the following as a very naive
way of inducing correlations. Hopefully this makes it perfectly clear what
you change for diffe
Hi Thanoon,
How about this?
# replicate p=10 times random sampling n=1000 from a vector containing your
ordinal categories (1,2,3,4)
R <- replicate(10, sample(as.vector(seq(4)), 1000, replace = T))
Cheers,
Charles
On Fri, Apr 4, 2014 at 7:10 AM, thanoon younis
wrote:
> dear sir
> i want to si
dear sir
i want to simulate multivariate ordinal data matrix with categories (1,4)
and n=1000 and p=10.
thanks alot
thanoon
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
P
17 matches
Mail list logo