search for: pij

Displaying 8 results from an estimated 8 matches for "pij".

Did you mean: pid
2008 Jul 03
1
Problem in applying conditional looping
Respected All, I hope you are enjoying good health, I am tring to write a program in R but could not be very sucessful. My program draws random sample form bivariate normal distribution and then compute a variable PIJ. For certian samples some entries of variable PIJ is apearing as negative, which result in negative variance estimator. I want to introduce a loop in my program that verify the each value of PIJ and if any value in PIJ is negitive return back and draw another sample until a sample is selected that...
2010 Mar 11
2
about IRT simulation
hello R: we have a two-parameter IRT simulation code. The goal is to generate a response matrix.But the "for" part doesn't run. we don't know what is wrong with it. Thanks so much~~~ I <- 10 J <- 5 response <- matrix(0, 10, 5) pij <- function(a,b,theta) { a <- rnorm(J, 0.8, 0.04) a b <- rnorm(J, 0, 1) b theta <- rnorm(I, 0,1) theta for( i in 1:I ) { for( j in 1:J ) { ptemp <- runif(1) pij <- exp(a[j]*(theta[i]-b[j]))/(1+exp(a[j]*(theta[i]-b[j]))) response[i,j]<-ifelse(pij(b=b[j], a=a[j], theta[i]) &l...
2008 Jun 27
1
Problem in conditional looping
Respected All, I am writing a program in R and facing some problem with applying "if statment". Program first draw random numbers from bivariate normal distribution then compute variable say Pi and Pij from that sample and then further computation ..... ..... ..... In some samples Pij is appearing with negitive sign and ultimately resulted in an negative variance estimator. Now i want to design the program like this if the Pij is negative then go back and draw another sample until we get a sampl...
2009 Mar 13
1
Hierarchical Bayesian Modeling in R
Hi Friends, I'm trying to model the consumer decisions (Click-Through Rate and Conversion) in Search Engine Advertising using a hierarchical Bayesian binary logit. The input data is the weekly CTRs and Avg. Position for each search keyword. CTR is modeled as (for each keyword i and week j): Pij = exp(C + Bi x Positionij + A1 x Lengthi + A2 x Brandi + A3 x ProductSpecifici) / [1 + exp(C + Bi x Positionij + A1 x Lengthi + A2 x Brandi + A3 x ProductSpecifici)] The Position coefficient Bi is in turn allowed to vary along the population mean (B1) and the keyword characteristics as: Bi = B1...
2011 Sep 14
1
ruby to solve a physics question
...if n1!=0 and n2!=0 and n3!=0 p=Math.sqrt(n1**2+n2**2+n3**2+n1*n2/1.414+n1*n3/1.41+n2*n3/1.414) a6+=(1/p)**6 end end end end puts a6 What I''ve got here is a 10x10x10 face-centered cubic lattice of atoms. What I want to do is find this constant a6= sum(1/Pij)**6. From a starting point I want the distance to every other atom location point in the structure, meanwhile inversing and power to the sixth each distance. Then I want to add all those up. This should return 14.4???? -- Posted via http://www.ruby-forum.com/.
2005 Nov 03
1
How to calculate errors in histogram values
Hi there, I'm new to R but I thought this is the most likely place I could get advice or hints w.r.t the following problem: I have a series of measurements xi with associated uncertainties dxi. I would like to construct the probability density histogram of this data where each density estimate has an associated error that is derived from the dxi. In other words, for large dxi the
2004 Oct 28
1
transitivity
Dear all, Is there a function in R that checks transitivity and acyclicity of a given nXn matrix with entries representing a decision-maker's comparisons of n objects? Like 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 represents xPy and 0 represents ~xPy. Is there a vectorized solution to this? n can be quite large. Thanks in advance, Alex
1999 Aug 18
1
Your message Re: Samba and printer comments (July 5 1999)
Yes unfortunately I do not have much luck recieving help from the SAMBA mailing list. After much playing I found something weird that was seemingly causing incorrect comments. Most printers would recieve the comment - "no entries" which originally I assumed to be the default comment given by Win95 when it could not get a proper comment. However I later found that this is not the case.