Displaying 20 results from an estimated 7000 matches similar to: "R simulations"
2011 Aug 23
2
How can I do these simulations with R code
1) The Pareto P(alfa) distribution is defined by its density f(x|alfa) =alfa*X^(-alfa-1) over (1 to infinity). Show that it can be generated as the -1/alfa power of a uniforme variate. Plot the histogram and the density.
2) The Poisson distribution P(lambda) is connected to the exponential distribution through the Poisson process in that it can be simulated by generating exponential random
2010 Dec 16
5
Please help with one problem
It is interesting to graph the distribution of the standardized average as n
increases. Do this when the Xi are
uniform on [0; 1]. Look at the histogram when n is 1, 5, 10 and 25. Do you
see the normal curve taking shape?
(A rule of thumb is that if the Xi are not too skewed, then n > 25 should
make the average approximately
normal. You might want
> f=function(n,a=0,b=1) {
mu=(b+a)/2
2011 Oct 14
1
Wilcoxon and the use of simulation
Dear forum users,
It's 3:35am and I am swamped with statistics homework lol
I'm terrible with R and this time I have no idea what the prof wants. Here
is the question:
Consider the (two-??sample) Wilcoxon rank statistic T = ?rank(Xi). For
n1=106 and n2=192, determine by simulation the ?=.05 critical point for
testing H0: ?=0, H1:?<0.
We can do this as follows:
For m=10000 (no wimpy
2011 Jun 30
2
Saving fExtremes estimates and k-block return level with confidence intervals.
I am estimating a large model by groups. How do you save the results and?returns
the associated quantiles?
For this example I need a data frame
n?? ?xi??????? mu????????beta
1?? 0.1033614? 2.5389580 0.9092611
2? ?0.3401922? 0.5192882 1.5290615
3?? 0.5130798? 0.5668308 1.2105666
I also want to apply gevrlevelPlot() for each "n" or group.
?
#Example
n <- c(1, 1, 1, 1, 1, 1, 2, 2, 2,
2009 Sep 23
1
Maximum Likelihood Est. regarding the degree of freedom of a multivariate skew-t copula
Hello,
I have a bigger problem in calculating the Maximum Likelihood Estimator regarding the degree of freedom of a multivariate skew-t copula.
First of all I would like to describe what this is all about, so that you can understand my problem:
I have 2 time series with more than 3000 entries each. I would like to calculate a multivariate skew-t Copula that fits this time series.
Notice:
2010 Jul 30
1
hi! l have a question please help me
1)
dmatrix1<-function(n,p,rho,sigma,k){
muvec1=zeros(1,p)
truep<-as.matrix(c(3,1.5,0,0,2,0,0,0))
A=eye(p)
for(i in 1:p){
for(j in 1:p){
A[i,j]=rho^(abs(i-j))
X=mvrnorm(n,muvec1,A)
y=X%*%truep+as.matrix(rnorm(n,0,sigma))
Y=X[1:k,]
w=y[1:k]
Z=X[(k+1):n,]
z=y[(k+1):n]}}
return(list(X,Y,w,Z,z))
}
I made this code which performs
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola,
Esta pregunta la hice en stackoverflow
<http://stackoverflow.com/questions/31137940/randomly-assign-teachers-to-classrooms-imposing-restrictions/31143808#31143808>pero
nadie pudo contestarla.
1. Quiero generar N escuelas, con G grados y C divisiones.
2. Quiero asignar cada uno de T maestros a 2 divisiones en un grado y
escuela
Si tengo C=4 divisiones, puedo lograr lo que quiero con
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola,
0. La falta de 'elegancia' hace que sea mas dificil hacer cambios al
codigo. Por ejemplo cambiar n.classrooms <- 4 a n.classrooms <- 20
1. Cuando tengo solo 4 puedo hacer esto:
schoolGrade$A <- Teachers$Teacher.ID[1:cuttoff1]
schoolGrade$B <- Teachers$Teacher.ID[1:cuttoff1]
schoolGrade$C <- Teachers$Teacher.ID[(cuttoff1+1):n.teachers]
schoolGrade$D <-
2015 Jul 13
2
Crear datos aleatorios con restriciones
Gracias Carlos,
Tu codigo es un gran paso en el sentido correcto pero no produce
exactamente lo que estoy buscando.
Mi "solucion" en stackoverflow
<http://stackoverflow.com/questions/31137940/randomly-assign-teachers-to-classrooms-imposing-restrictions/31143808#31143808>
produce un data frame `schoolGrade` con 240 observaciones y 7 variables. Mi
objetivo es poder generar un data
2015 Jul 13
2
Crear datos aleatorios con restriciones
Perdon por no se lo suficientemente claro :(
Tu codigo produce `validPairs` que tiene 7 variables y 360 observaciones.
Donde
> validPairs[1,] V1 V2 V3 V4 V5 V6 valid
60 e1 g1 c1 e1 g1 c2 Valid
indica que un maestro tiene asignado c1 y c2 en la escuela e1 y el grado
g1. Correcto? Si es asi, esto es casi lo que queira producir y creo que
puedo llegar a donde quiero usando tu codigo de base.
2006 Jan 23
3
create and update with has_many :through
I''m using Edge Rails and the new has_many :through in my code. What
I''m trying to do is modify my create and update code to use the new
relationships. I''m using a table called course_teachers for the joins.
Here is what I have so far:
def create
@course = Course.new(params[:course])
@teacher = Teacher.find(params[:primary_teacher])
@course.teachers =
2006 Aug 03
12
More than one has_many :through association between the same 2 models
I wonder if you can have more than one has_many :through association between
2 models.
For example...
I have a model Teacher and a model Class
Now, 1 Teacher works in many Classes, right?. So I need a join model like
class Work < ActiveRecord::Base
belongs_to :teacher
belongs_to :class
end
But I also would like to know if a teacher CAN teach a class before I
2006 Aug 24
1
Strange permissions problems
I had this problem some last year and never got it figured out. Now it
is bugging me. It seems that sometimes when a student writes his/her
file to a directory, it will not keep the correct group. It puts
his/her main group as the group owner and that fouls things up. Here is
what I have.
Unix Permissions
/school 3777 admin.teacher
/school/bhs 3777 admin.teacher
/school/bhs/reese
2007 Dec 04
5
when to save, session reflect saves?
I am trying to clean up unnecessary lines (even as I hack my way forward
adding more garbage)
I have two questions on lines I have trying to keep the database and
session info reflecting changes:
def associate_pupil_to_teacher
@teacher = session[:teacher]
@pupil = Pupil.find(params[:id])
@teacher.pupils << @pupil
@teacher.save #Q1
session[:teacher] = @teacher #Q2
end
#Q1 do i
2009 Feb 16
5
Alternate to for-loop
Hi, I am trying to create a vector of length 10 (say), wherein each element
will be average of random sample of size 100, from a distribution, say
Normal. Can anyone please tell me without creating a "for" loop, how I can
do that?
Regards,
--
View this message in context: http://www.nabble.com/Alternate-to-for-loop-tp22035954p22035954.html
Sent from the R help mailing list archive at
2009 Dec 26
5
Is SEM package of R suitable for sem analysis
Dears,
I'm a college student and In doing my statistics homework.
I use R with SEM package as my tool for sem analysis,
but my teacher told me AMOS is more suitable for such analysis.
Could someone help tell me whether it is true
that some commercial software is better accepted in academic fields?
Sorry if I should not post such topics here.
--
Best Regards,
Reeyarn T. Lee
Accounting
2015 Apr 06
6
Member server - winbind unable to resolve users/groups
On 06/04/15 12:37, buhorojo wrote:
> On 05/04/15 19:41, Rowland Penny wrote:
>> On 05/04/15 16:11, buhorojo wrote:
>>> On 05/04/15 17:03, Reindl Harald wrote:
>>>>
>>>>
>>>> Am 05.04.2015 um 16:55 schrieb buhorojo:
>>>>> We don't want best anything
>>>>
>>>> sad enough
>>>>
2009 Nov 16
1
lmomco package and confidence limits?
Hello,
I am using the lmomco package (lmom.ub and pargev) to compute the GEV
parameters (location, scale, and shape), which are used to estimate
return values. I was wondering how/if I can calculate upper and lower
confidence (CI_u, CI_l) intervals for each return frequency using the
GEV parameters to fill-in the table below?
Xi (location) = 35.396
Alpha (scale) = 1.726
Kappa (shape) =
2015 Apr 05
2
Member server - winbind unable to resolve users/groups
On 05/04/15 16:11, buhorojo wrote:
> On 05/04/15 17:03, Reindl Harald wrote:
>>
>>
>> Am 05.04.2015 um 16:55 schrieb buhorojo:
>>> We don't want best anything
>>
>> sad enough
>>
>>> We want what we have to work
>>
>> so do what you want - who cares
>>
>>> Linux: we configure it as we wish
>>
>> why
2010 Nov 04
9
Delete action is not working and redirects to edit action
Hello,
i have a strange problem here. I have made a teacher controller using
scaffold. All actions work fine but the delete does not. When i click
the delete link, it redirects me to the edit of this teacher. I have
restarted the server and i have tried in firefox (i use chrome) but
problem still remains. Here is the code from my view.
<%= link_to(image_tag("/images/