<>
Here is an attempt to translate your code. What is "d", btw?
***
clear*
local d 4
//# of rows
set obs 100
//# of columns set to 3
gen x=.
gen y=.
gen z=.
forv i=0.05(0.1)`=c(N)/10'{
di chi2(`d', c(k))-`i'
}
***
HTH
Martin
_______________________
----- Original Message -----
From: "Ben Dwamena" <[email protected]>
To: <[email protected]>
Sent: Saturday, May 30, 2009 8:28 AM
Subject: st: Translating an R expression (diff <- pchisq(d, p) - (0.5:n)/n)
into Stata code
Dear Listers with R experience,
What is an equivalent Stata code for the following R expression:
diff <- pchisq(d, p) - (0.5:n)/n
where x is dataset (n x p)
n is number of rows of x
p is number of columns of x
Thanks,
Ben
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not
be used for urgent or sensitive issues
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/