r语言中,εi~N(0,1)怎么输入?

在线求帮请教一下,r语言中,εi~N(0,1)怎么输入?
最新回答
风月本无界

2024-04-15 02:22:26

1)set.seed(1)n=5000gender=sample(c("f","m"),size=n,TRUE)dechot=function(gender,type){n=length(gender)list=c(NA,n)for(iin1:n){list[i]=switch(gender[i],"f"=type[1],"m"=type[2])}return(list)}type=