Displaying 20 results from an estimated 10000 matches similar to: "R [loop statement ]"
2016 Apr 18
0
R [coding : do not run for every row ]
Always keep the mailing list in cc.
The code runs for each row in the data. However I get the feeling that
there is a mismatch between what you think that is in the data and the
actual data.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070
2016 Apr 18
0
R [coding : do not run for every row ]
Dear anonymous,
The big mistake in the output might be obvious to you but not to
others. Please make clear what the correct output should be or at
least what is wrong with the current output.
And please DO read the posting guide which asks you not to post in HTML.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
team Biometrie &
2016 Apr 05
5
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
hi, i am new in this field.
do
favorite<http://stackoverflow.com/questions/36404707/simulation-study-of-2-sample-test-on-different-combination-of-factors#>
If I wish to conduct a simulation on the robustness of two sample test by using R language, is that any ways in writing the code?
There are several factors
(sample sizes-(10,10),(10,25),(25,25),(25,50),(25,100),50,25),(50,100),
2016 Apr 18
3
R [coding : do not run for every row ]
Hi, i am sorry, the output should be values between 0 and 0.1 and not supposed to be 1.00, it is because they are type 1 error rate. And now i get output 1.00 for several samples,rhis is no correct. The loop do not run for every row. i do not know where is my mistake. As i use the same concept on normal distribution setup, i get the result.
Sent from my phone
On Thierry Onkelinx
2016 Apr 25
2
R: use switch or function in connecting different cases.
HI, I am trying to use switch () function to connect the three distribution (normal ,gamma with equal skewness and gamma with unequal skewness.
But i am losing my ideas since i have
sample sizes-(10,10),(10,25),(25,25),(25,50),(25,100),50,25),(50,100), (100,25),(100,100)
standard deviation ratio- (1.00, 1.50, 2.00, 2.50, 3.00 and 3.50)
distribution of gamma distribution with unequal skewness
2016 Apr 17
2
R [coding : do not run for every row ]
i have combined all the variables in a matrix, and i wish to conduct a simulation row by row.
But i found out the code only works for the every first row after a cycle of nine samples.
But after check out the code, i don know where is my mistake...
can anyone pls help ....
#For gamma disribution with equal skewness 1.5
#to evaluate the same R function on many different sets of data
2016 Apr 25
0
use switch or function in connecting different cases.
This is my current work.Now i am trying to use a function to do the normal distribution simulation.
rm(list=ls())
t <- u<- mann<- rep(0, 45)
Nsimulation<-function(S1,S2,Sds,nSims)
{
set.seed(1)
for (sim in 1:nSims)
{
matrix_t <-matrix(0,nrow=nSims,ncol=3)
matrix_u<-matrix(0,nrow=nSims,ncol=3)
2016 Apr 18
0
R [coding : do not run for every row ]
You can make this much more readable with apply functions.
result <- apply(
all_combine1,
1,
function(x){
p.value <- sapply(
seq_len(nSims),
function(sim){
gamma1 <- rgamma(x["m"], x["sp(skewness1.5)"], x["scp1"])
gamma2 <- rgamma(x["n"], x["scp1"], 1)
gamma1 <- gamma1 -
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
You have quite a few mistakes in your example. The code below works
for me - you can wrap it in a function if you like. I think you will
need a lot more practice before you can write something like this in R
as you are missing close braces and haven't really worked out the
difference between the number of calculations you are doing for each
replication and the number of replications. It takes
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
Hi, i think i have figured the purpose of using this index (i-1)*5+j in the previous example that you gave.
It is because that i have to consider the outer loop and inner loop also... so the iterative for i need to minus one because it have ran one times simulation already ,then times the number of sizes of inner loop, then plus the iterative of j....
then for the simulation, i think there will
2006 Jan 03
1
need to know some basic functionality features of R-Proj
Hi,
I am new-comer to statistics and R-Project. I would like to know if these
features can be attained in R-Project.Please help.
1) beta 1 and Beta 2, or gamma one and gamma two for skewness and kurtosis,
respectively, including standard errors and tests for significance (relative
to values for a Gaussian distribution).
2) linear correlation
3) quadratic regression
4) polynomial regression
2016 Apr 19
0
problem on simulation code (the loop unable to function effectively)
Hi Si Jie,
Again, please send questions to the list, not me.
Okay, I may have worked out what you are doing. The program runs and
produces what I would expect in the rightmost columns of the result
"g".
You are storing the number of each test for which the p value is less
than 0.05. It looks to me as though the objects storing the results
should be vectors as you are only storing 100 p
2001 Dec 10
2
distributions w. skewness & kurtosis
Is there some reasonable way to generate random data from a
distribution that has some degree of skewness and/or kurtosis, but
would otherwise be normal?
thanks,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: greiff.vcf
Type: text/x-vcard
Size: 398 bytes
Desc: Card for Warren R. Greiff
Url :
2006 Apr 27
1
Looking for an unequal variances equivalent of the Kruskal Wallis nonparametric one way ANOVA
Well fellow R users, I throw myself on your mercy. Help me, the unworthy,
satisfy my employer, the ungrateful. My feeble ramblings follow...
I've searched R-Help, the R Website and done a GOOGLE without success for a
one way ANOVA procedure to analyse data that are both non-normal in nature
and which exhibit unequal variances and unequal sample sizes across the 4
treatment levels. My
2010 Sep 10
1
Greek letter included in a character vector
Hello,
In the past I have used "expression" to include greek letters in axis labels,
but this time I need to include the greek letter as part of a legend. Basically,
I need to create the following vector to rename the levels of a factor:
c("Interferon-gamma", "IL-10", "IL-5"), where "gamma" obviously needs to be
printed as the greek letter
2016 Apr 19
0
problem on simulation code (the loop unable to function effectively)
Hi Jeem,
First, please send questions like this to the help list, not me.
I assume that you are in a similar position to sjtan who has been
sending almost exactly the same questions.
The problem is not in the loops (which look rather familiar to me) but
in your initial assignments at the top. For instance:
scale parameter=(1,1.5,2,2.5,3)
produces an error which has nothing to do with the
2003 Oct 04
3
a bug of function plot (PR#4405)
Full_Name: Ximing Zhao
Version: R 1.7.1
OS: MacOs X
Submission from: (NULL) (64.136.27.51)
When I used function plot in R 1.7.1, I found two bugs.
My whole function is this:
*****************
drawexp<-function(X,x,c,b){
exp<-function28(X,x,c,b)
if(max(exp)>=max(dexp(x,rate=1))){
plot(x,exp, type="l",main= paste("Exponential ,n=",length(X),"
2011 Jun 06
2
Can R do zero inflated gamma regression?
Hi, Dear R-help
I know there are some R package to deal with zero-inflated count data. But I
am now looking for R package to deal with zero-inflated continuous data.
The response variable (Y) in my dataset contains a larger mount of zero and
the Non-zero response are quite right skewed. Now what i am doing is first
to use a logistic regression on covariates (X) to estimate the probability
of Y
2009 Jan 02
1
R: numerical integration problems
hello all
happy new year and hope you r having a good holiday.
i would like to calculate the expectation of a particular random variable and would like to approximate it using a number of the functions contained in R. decided to do some experimentation on a trivial example.
example
========
suppose x(i)~N(0,s2) where s2 = the variance
the prior for s2 = p(s2)~IG(a,b)
so the posterior is
2013 Jan 24
4
Difference between R and SAS in Corcordance index in ordinal logistic regression
lrm does some binning to make the calculations faster. The exact calculation
is obtained by running
f <- lrm(...)
rcorr.cens(predict(f), DA), which results in:
C Index Dxy S.D. n missing
0.96814404 0.93628809 0.03808336 32.00000000 0.00000000
uncensored Relevant Pairs Concordant Uncertain
32.00000000