X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=.Rhistory;fp=.Rhistory;h=0000000000000000000000000000000000000000;hb=53fa233d8fbeaf4d51a4874ba69d8472d01d04ba;hp=6616dbe0fcc95e8cd68c1b6e45c962ab88f4ce4d;hpb=e54d1bb9c8788781c0a2bd911bb14a087a98e7bf;p=valse.git diff --git a/.Rhistory b/.Rhistory deleted file mode 100644 index 6616dbe..0000000 --- a/.Rhistory +++ /dev/null @@ -1,512 +0,0 @@ -lines(1:15, rep(0,15), col='red') -N = 300 -mugamma = c(1,2,3) -Gamma = matrix(c(5,-0.02,0.01,-0.02,1,0.1,0.01,0.1,1),3,3) -s2 = 0.01 -Si = getbasismatrix(seq(0,1,length=15),create.fourier.basis(nbasis = 3)) -gammai = t(sapply(1:N,FUN = function(i){ -rmvnorm(1,mugamma,Gamma) -})) -Xdata = t(sapply(1:N,FUN = function(i){ -as.vector(Si%*%gammai[i,])+rnorm(15,0,s2) -})) -matplot(t(Xdata),type="l") -#beta = c(.1,.5,-.3) -beta = c(1,-3.5,4.5,-2.5) -pydata = sapply(1:N,FUN=function(i){ -a = sum(beta*c(1,gammai[i,])) -return(exp(a)/(1+exp(a))) -}) -U = runif(length(pydata)) -ydata = as.numeric(U