Re: [R] problem in R2OpenBUGS

2016-06-11 Thread thanoon younis
so don't do it. > -- > Sent from my phone. Please excuse my brevity. > > On June 11, 2016 11:15:38 AM PDT, thanoon younis < > thanoon.youni...@gmail.com> wrote: >> >> Dear R- users >> >> I have a problem in the R-code, i want to draw some plots in R,

[R] problem in R2OpenBUGS

2016-06-11 Thread thanoon younis
Dear R- users I have a problem in the R-code, i want to draw some plots in R,however, when i write the following code the R-program stopped suddenly. The message is "R for WINDOWS GUI front-end has stopped working". How can i solve this problem please? ## some plots samplesBgr("lam[1:6]") #

[R] bootstrapping code with ordered categorical data(five categories)

2016-05-06 Thread thanoon younis
Hi I need a bootstrapping code with ordered categorical data(five categories) to re-samplling a real data with 16 variables and 200 sample size. Any help please -- Thanoon Y. Thanoon PhD Department of Mathematical Sciences Faculty of Science University Technology Malaysia, UTM E.Mail:

Re: [R] problem in R-code

2015-11-04 Thread thanoon younis
Dear R-Users After correct some errors in the code below i have only this error "Error in if (BZ[i] < 0.25) { : missing value where TRUE/FALSE needed" how can i solve this problem please? N<-200;P<-9 #Sample size BZ=matrix(NA, nrow=N, ncol=1) W=matrix(NA, nrow=N,

[R] problem in R-code

2015-11-03 Thread thanoon younis
Dear R-users I have a problem in the code below, the problem is because i want to change the variable BZ which is a vector with 200x1 dimension to the var. W which is categorical variable with same dimension of BZ but with categorical values with 4 categories but i got on only zero values in w

Re: [R] problem in R-code

2015-11-03 Thread thanoon younis
November 2015 at 06:35, Boris Steipe <boris.ste...@utoronto.ca> wrote: > Why don't you just multiply by four, round, and add one? > > > > B. > On Nov 3, 2015, at 10:02 PM, thanoon younis <thanoon.youni...@gmail.com> > wrote: > > > Dear R-users > >

[R] vector of constant values

2015-10-29 Thread thanoon younis
Dear Members, I want to simulate a vector of constants values with dimention = 200x2 and all values of this vector are 1. Any help please. Regards -- Thanoon Y. Thanoon PhD Candidate Department of Mathematical Sciences Faculty of Science University Technology Malaysia, UTM E.Mail:

[R] help

2015-09-18 Thread thanoon younis
Hi, I need you help to correct the code below please I have this error Error in if (v[j] >= 0) yo[i, j] <- 1 else yo[i, j] <- 0 : missing value where TRUE/FALSE needed library(mvtnorm) #Load mvtnorm package N<-200;P<-9 W=matrix(NA, nrow=N, ncol=2) xi=matrix(NA, nrow=N, ncol=2)

Re: [R] help

2015-09-18 Thread thanoon younis
a.cz> wrote: > >> Hi >> >> You do not say anything what the code shall do and after getting third >> error of similar type, I gave up further investigation of your code. >> >> Error: object 'delta' not found >> >> Your error can have something to do wit

Re: [R] help

2015-09-18 Thread thanoon younis
r error can have something to do with v[j] beeing NA > > Cheers > Petr > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of thanoon > > younis > > Sent: Friday, September 18, 2015 12:04 PM > > To: r-help@r-projec

[R] (no subject)

2015-09-17 Thread thanoon younis
Dear R - Users I have a small problem when i generated two column with 200 rows and as follows Q1[i,1]=sample(4, 200, replace = TRUE); Q1[i,2]=rbinom(200,1,0.7) the first vector is ordered categorical variable and the second vector is dichotomous variable but when i run this code i found this

[R] Fwd: generate ordered categorical variable in R

2015-09-17 Thread thanoon younis
Dear all users I want to write a vector with one column and just NA values and nrow=200 when i write X=numeric(NA) is not correct how can i do this please? Regards [[alternative HTML version deleted]] __ R-help@r-project.org mailing list --

[R] generate ordered categorical variable in R

2015-09-16 Thread thanoon younis
Dear R- users I want to generate ordered categorical variable vector with 200x1 dimension and from 1 to 4 categories and i tried with this code Q1=runif(200,1,4) the results are not just 1 ,2 3,4, but the results with decimals like 1.244, 2.342,4,321 and so on ... My question how can i generate

[R] problem in auto run iteration in R2OpenBUGS

2015-06-12 Thread thanoon younis
Hi for all members in R community I have a small problem in the code below when i call OpenBUGS #Call OpenBUGS model= bugs(data, inits, parameters.to.save=parameters, model.file=D:/Run/model.txt, n.iter=5000,

[R] problem in replication

2015-04-13 Thread thanoon younis
Hi I have a small problem with my code in R. The problem is the replication of simulation didn't work as a sequence from r=1 to 100 but the results stop at 1 and when i close the first results with r=1 the second results run and so on. i want to leave my computer to run until finish 100

[R] r help

2015-03-18 Thread thanoon younis
Dear all members I have error with the following code #Input data set thd - as.matrix(read.table(C:/Users/hp/Desktop/thd.txt)) #Input data set data-list(N1=2000,N2=2000,P=9,R=Ro,z1=yo1,z2=yo2,thd) and the the matrix -200.000 -2.517 -1.245 -0.444 0.848 200.000 -200.000 -1.447

[R] problem in R2JAGS

2015-02-24 Thread thanoon younis
Hi everyone, I need your help to correct R code using R2JAGS. The problem is when i defined testJAGSdata which contains on all the data as following testJAGSdata - read.bugsdata(bugsdata.R) bugsdata.R-read.table(F:/JAGS/bugsdata.R) i found this error testJAGSdata - read.bugsdata(bugsdata.R)

[R] problem in R

2015-02-20 Thread thanoon younis
Dear all members I have the following matrix in R thd - matrix(testJAGSdata$thd, ncol=6, byrow=TRUE) head(thd) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -200 -2.517 -1.245 -0.444 0.848 200 [2,] -200 -1.447 -0.420 0.119 1.245 200 [3,] -200 -1.671 -0.869 -0.194 0.679 200 [4,] -200

[R] problem in R

2015-01-05 Thread thanoon younis
Dear all R members I have a problem in the R when i wanted to call winbugs as following #Input data set for WinBUGS thd18 -read.table(C:/Users/hp/Desktop/thd18.txt) #Input data set for WinBUGS data-list(N1=2000,N2=2000,P=9,R=Ro,z1=yo1,z2=yo2,thd18) #Call WinBUGS model-bugs

[R] Problem in R2WinBUGS

2014-12-30 Thread thanoon younis
Dear all members I have a problem with the code below when i wanted to change the continuous random variables to mixed ordered categorical and dichotomous as follow #transform theta to ordinal variables yo - array(0, dim=c(i,5,100)) for(j in 1:5){ if(v[j] 0.25){

[R] R2WinBUGS

2014-12-22 Thread thanoon younis
Dear all R-members I have a problem with R when i wanted to call WinBUGS from R as following: #Call WinBUGS model-bugs(data,inits,parameters,model.file=D:/Run/model.txt, n.chains=2,n.iter=5000,n.burnin=1000,n.thin=1,'DIC=True', bugs.directory=c:/Program Files/WinBUGS14/,

[R] problem in R2winBUGS

2014-10-12 Thread thanoon younis
Dear all Rusers I have error when i wanted to call winbugs from R to estamate parameters using bayesian analysis. #Call WinBUGS model-bugs(data1,data2,init1,init2,parameters,model.file=D:/Run/model.txt, n.chains=2,n.iter=1,n.burnin=4000,n.thin=1,DIC=True, bugs.directory=c:/Program

[R] errors in initial values in R2winBUGS

2014-10-10 Thread thanoon younis
Dear all R users I am trying to find the bayesian analysis using R2winBUGS but i have errors in initial values with two groups. the R-code #Initial values for the MCMC in WinBUGS init1-list(uby1=rep(0.0,10),lam1=c(0.0,0.0,0.0,0.0,0.0,0.0),

[R] truncated normal

2014-10-05 Thread thanoon younis
Dear all R-users I have a question regarding truncated normal distribution : which type of probability distribution has same properties of truncated normal distribution? Many thanks in advance -- Thanoon Y. Thanoon PhD Candidate Department of Mathematical Sciences Faculty of Science University

[R] simulation data in SEM

2014-09-14 Thread thanoon younis
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

[R] simulation data with mixed variables

2014-09-01 Thread thanoon younis
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

[R] simulation data with dichotomous variables

2014-08-23 Thread thanoon younis
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

[R] simulation data with dichotomous varuables

2014-08-04 Thread thanoon younis
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

[R] RMS equation

2014-07-07 Thread thanoon younis
dear R-users i am new on R-program so i need your help to solve the root mean square equation in R. i have a problem in summation (r=1:100)how can i write it in R . i tried to write the code as below but the problem is the result must be vector not constant number as code below. i appreciate any

[R] Trucated Normal Function

2014-06-05 Thread thanoon younis
Dear all members The following function is truncated normal distribution function i wrote it by using winbugs so now i want to write it by using R - program. for(j in 1:P){y[i,j]~djl.dnorm.trunc(mu[i,j],psi[j],thd[j,z[i,j]],thd[j,z[i,j]+1])} where y:underlying continuous variables and treated

[R] help

2014-05-29 Thread thanoon younis
dear all members i have some problems in R- code below, is there anyone helps me to correct it. many thanks in advance thanoon ## Ridge MM ## rm(list=ls()) library(MASS) library(mvoutlier) library(robustbase) library(car) library(quantreg) n-100 r-0.95

[R] problem in r-code

2014-05-08 Thread thanoon younis
dear all members is there anyone explain to me the code below and how can i transfer this code to winbugs program. q[i,1]=qnorm(runif(1,min=.5,max=1),0,1) thanks in advance thanoon [[alternative HTML version deleted]] __

[R] error in r

2014-05-03 Thread thanoon younis
dear all members i have error in the code below Error in Y[i, 9] = 0.9 * XI[i, 2] + eps[9] : subscript out of bounds is there anyone helps me please. many thanks in advance thanoon llibrary(mvtnorm) #Load mvtnorm package library(R2WinBUGS) #Load R2WinBUGS package N=500

[R] inverse normal distribution function

2014-04-18 Thread thanoon younis
dear all members i want to use inverse normal distribution in R to show the value of variable Z when Z represent the ordered categorical variables. i hope anyone gives me an example on this distribution . thanks to all [[alternative HTML version deleted]]

[R] simulation data

2014-04-09 Thread thanoon younis
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

[R] structural equation models in R

2014-04-06 Thread thanoon younis
hi i need your help to know how can i analysis structural equation models in R. thanks alot [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] simulation data

2014-04-04 Thread thanoon younis
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