ocedure, but I dont know how I save an object that is a
graphic...
Listers, I just want some advices in order to make a research about what
functions of R I could save the graphics in my function...
Thanks again,
Marcio
MarcioRibeiro wrote:
>
> Hi Listers,
> I am producing some grap
Hi Listers,
I am producing some graphics that the commands are in a FUNCTION...
The problem is that I end up viewing just last graphic and in my FUNCTION
there are 4 graphics with the PAR command function... Like those below...
How do I view/get the other 3 graphics? Any help?
Thanks in advance...
Hi listers,
I have a simple doubt...
I need to manipulate the data base as:
var1 var2
7 0.1
7 0.1
8 0.12
100.15
120.18
200.31
I would like to aggregate the equal cases as var1 making the sum of var2...
I would get...
var1 var2
7 0.2
8 0.12
100.15
120
Hi listers,
First I programmed the calcul of a empirical distribution function given by:
F_hat(y)=(1/n)*Sum[Ind(yi<=y)]
I checked the ecdf function and I found out how does it works...
A modification of the function would be:
n<-6
x<-c(10,12,7,7,5,4)
vals<-unique(x)
edf<-cumsum(tabulate(match(x,
Hi listers,
I would like a suggestion. I am working on a bootstrap simulation which I am
calculation the confidence intervals to obtain the coverage probability. I
am applying 3 kind of confidence intervals and 3 coverage probabilities (2
sided, left 5% and left 95%).
I programmed a function for t
Hi listers,
I've been looking for a procedure, but I am not succeding...
I have a function that give multiple results...
Then, I would like to simulate this function n times, so I need to save/keep
the n multiple results, in order to calculate my desired statistics...
I have already tried with the
this list.
>
> e.g.
>
> #Function A
> boot<-function(a,b,c){
> mean_boot<-(a+b)/2
> var_boot<-c
>
> list(mean_boot = mean_boot, var_boot = var_boot)
> }
>
> out <- boot(1,2,3)
> out
> $mean_boot
> [1] 1.5
>
> $var_boot
> [1] 3
>
Hi listers,
I am working on a simulation... But I am having some troubles...
Suppose I have a function A which produces two results (mean and
variance)...
Then I would like to simulate this function A with a function B many times
using the results from function A
For example:
#Function A
boot<-fu
Hi listers,
I would like to merge two vectors as follows...
A<-c(3,5,7,18,43,85,91,98,100,130,230,487) #data values
B<-c(10,5,5,10,8,11,2,7,3,11,10) #random numbers (sample)
I would like to set the vector of random numbers according to the order set
of the vector of data values...
The result woul
Hi listers,
I have a problem in identifying a value between two vectors...
Suppose vector A is...
0. 0.0909 0.0909 0.1818 0.2727 0.3636 0.4545 0.6363 0. 0. 0.
0.
And vector B is...
3 5 7 18 43 85 91 98 100 130 230 487
I would like to identify the value of vector B that
Hi listers,
Suppose I have a dataset with n=10 observations and I want to sample with
replacement.
My new sample is of size m=9.
So, I am using the following code...
newsample<-dataset[sample(m,replace=T),]
The problem is that generates the new sample and the last observation of my
data set is nev
Hi listers,
I am
--
View this message in context:
http://www.nabble.com/Sample-Function-tp24519071p24519071.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-hel
Hi listers,
I have a data frame with 5 variables... And I want reorder the data frame
according a specific variable X...
I checked the sort and order functions... In my case I think that the ORDER
function is applicable... But I did not understand at all... The idea is
simple... Data order by X...
e(table(boot))
> ?
>
> milton
> brazil=toronto
> On Thu, Jun 11, 2009 at 3:13 PM, MarcioRibeiro wrote:
>
>>
>> Hi listers,
>> I have the following code...
>>
>> data<-as.matrix(c(1,2,3,4,5,6,7,8,9,10),nrow=10,ncol=1,byrow=TRUE)
>> n<-nrow(data)
>
Hi listers,
I have the following code...
data<-as.matrix(c(1,2,3,4,5,6,7,8,9,10),nrow=10,ncol=1,byrow=TRUE)
n<-nrow(data)
m<-n-1
boot<-data[sample(m,replace=T),]
So, I need to count the number of times each observation was selected at the
sample with replacement...
Suppose I sampled...
4 5 1 3 7
Hi listers,
I am working on a program in order to create an ellipse as a limit of my
observations there are well classified.
I have two independent variables for an quadratic discriminant function
between 2 groups where my mean is zero and my covariance matrix is
proportional.
Q=y'Ay+c
My program
Hi listers,
I have a statistical question corcerning the posteriori probability of a
discriminant analysis.
I am calculating the probabilities under R using the formula.
posteriori_j=exp(q_j(y))/sum(q_j(y))
qj(y) is my quadratic discriminant function for the case where my covariance
matrix are pro
arcio
Uwe Ligges-3 wrote:
>
>
>
> MarcioRibeiro wrote:
>> Hi listers,
>> I am having some trouble in a matrix multiplication...
>> I have already checked some posts, but I didn't find my problem...
>> I have the following code...
>> But I am not
ay2 <- array(1:20,dim=c(2,2,5))
result <- array(dim=c(dim(array1)[1], dim(array2)[2], dim(array1)[3]))
for (i in 1: dim(array1)[3]){
result[,,i] <- array1[,,i]%*%array2[,,i]
}
Thanks...
Ben Bolker wrote:
>
>
>
> MarcioRibeiro wrote:
>>
>> Hi listers,
>
Hi listers,
I am having some trouble in a matrix multiplication...
I have already checked some posts, but I didn't find my problem...
I have the following code...
But I am not getting the right multiplication...
I checked the dimension and they are fine...
id_y <- array(1:10,dim=c(2,1,5))
id_yt<-
Hi listers,
I am working on an canonical discriminant analysis, but I am having some
trouble to use the CANDISC function... I just installed the last R version
and installed the package CANDISC... But, I am getting the following message
because about a permission:
The downloaded packages are in
C
Hi listers,
Does anybody knows if the function qda for quadratic discriminant analysis
provides the coefficients of quadratic discriminants...
Well, I find out that for the linear discriminant analysis lda, the fonction
provides the coefficients...
Thanks in advance,
Marcio
--
View this message
Hi listers,
I am trying to arrange my data and I didn't find any information how to do
it!
I have a data with 3 variables: X Y Z
1-I would like to multiplicate de information of X according to the number I
have for my Y variable...
2-Then I want to identify with a dicotomic variable by the number
Hi listers,
I would like to do a graphic of the power function of the Hotteling test
(T2).
T2~F(p,n-p;lambda), lambda is my paremeter of non-centrality.
So I would like to do a graphic of the power of the test as a function of
the parameter lambda. I also would like to define lambda varying betwee
Hi listers,
Does anybody could tell me if there is a function for the DISTRIBUTION
FUNCTION U(p;m,n)!
Thanks,
Marcio
--
View this message in context:
http://www.nabble.com/Distribution-U-tp22567871p22567871.html
Sent from the R help mailing list archive at Nabble.com.
__
Hi listers,
I check it out at the messages... But I didn't find how do I use the while
with 2 conditions...
while (a>1 ? b>1){
a<-2
b<-2
}
Should I use what...
Thanks in advance,
Marcio
--
View this message in context:
http://www.nabble.com/While-with-2-conditions-tp22252945p22252945.html
S
Hi Listers,
Is there a way that I can transpose an array...
Suppose I have the following array...
x<-array(c(1,2,3,4),dim=c(1,2,2))
, , 1
[,1] [,2]
[1,]12
, , 2
[,1] [,2]
[1,]34
And I would like to get the following result...
, , 1
[,1]
[1,]1
[,2]2
, , 2
Hi listers...
I am trying to do a matrix multiplication...
Suppose my data has 100 obs and 2 variables...
I calculated the estimateurs of location and dispersion...
So now I would like to do the following...
t(Xi-location)%*%solve(dispersion)%*%(Xi-location)
My code is...
Z<-rep(2,200)
Z<-matrix(Z
Hi all,
I am using the function COV.WT to estimate the estimators (location and
scale) of a bivariate cauchy distribution.
My doubt is about the option WT (weight), cause at the R-help shows that the
weight is uniform according to the number of observations. But, checking the
theory, for example,
29 matches
Mail list logo