Displaying 20 results from an estimated 3000 matches similar to: "Stats Question: Single data item versus Sample from Norma l Distribution"
2006 Jul 16
2
Matrices given to pt? [was: [R] for loops and counters]
Hi, people.
I was a bit intrigued by the message quoted below. Indeed, if pt() is
given a matrix, it returns a matrix. Should this feature be documented?
?pt speaks about "a vector of quantiles", and says nothing about the
type of what it returns.
The same might presumably apply to other distribution-related functions.
----- Forwarded message from Martyn Plummer <plummer at
1999 Oct 05
2
for loops and counters
I am trying to assign values to a vector (pvalue). Similar code works in C
but not in R. What am I doing wrong?
r <- pvalue <- 0
for(i in (1:(k-1))){
for(j in (i+1):k){
r <- r+1
tstat <- (means[i]-means[j])/rms
pvalue[r] <- 2*(1-pt(abs(tstat),df))
}
}
Thank you.
Peter B.
--
Peter B. Mandeville mandevip at deimos.tc.uaslp.mx
Jefe del
2008 Oct 05
1
Sample mean in R
I am having issues with the following:
(muhat = 1/n^2(sum of all the xi's) )
essentially if xbar = the sample mean, muhat = sample mean but square the n.
Question:
Use R to run a Monte Carlo simulation which compares the finite-sample
performance of xbar and muhat. Specifically generate 1000 samples n=30 from
a standard normal distribution. For each sample calculate xbar and muhat. I
have
2011 Sep 02
5
Hessian Matrix Issue
Dear All,
I am running a simulation to obtain coverage probability of Wald type
confidence intervals for my parameter d in a function of two parameters
(mu,d).
I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I
want to invert the Hessian matrix to get Standard errors of the two
parameter estimates. However, my Hessian matrix at times becomes
2010 May 24
2
adding one line to a plot
Hello!
I am running a very simple mini Monte-Carlo below using the function
tstatistic (right below this sentence):
tstatistic = function(x,y){
m=length(x)
n=length(y)
sp=sqrt( ((m-1)*sd(x)^2 + (n-1)*sd(y)^2)/(m+n-2) )
t=(mean(x)-mean(y))/(sp*sqrt(1/m+1/n))
return(t)
}
alpha=.1; m=10; n=10 # sets alpha, m, n - for run 1
N=10000 # sets the number of simulations
n.reject=0 # counter of num.
2012 Mar 31
2
lm no calcula un coeficiente
Hola,
quiero hacer una regresión lineal
lm(y ~ x * grupo, data =datos)
y: numérica, x: numérica, grupo: factor con dos niveles (1 y 2)
pero no calcula el coeficiente de x:grupo2 a cuenta de una singularidad
Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.283e+06 2.276e+04 -56.359 < 2e-16 ***
x
2011 Jun 20
1
requesting a mentor for R development
I'd like to learn the process of revising R functions & packages and
then submitting proposed patches to the R Core team. Would someone be
willing to mentor me through one example?
For starters, consider an example. I'd like to revise the t.test
function to return the stderr value to the user. We only need to
change the "rval" in the third-from-the end line of
2008 May 02
0
Adaptive design code
I have been trying to create code to calculate the power for an adaptive design with a survival endpoint according to the method of Schafer and Muller ('Modification of the sample size and the schedule of interim analyses in survival trials based on interim inspections,' Stats in Med, 2001). This design allows for the sample size to be increased (if necessary) based on an interim look at
2005 Apr 05
1
Stats Question: Single data item versus Sample from Normal Distribution
Hi. I have a question that I have asked in other stat forums but do not
yet have an answer for. I would like to know if there is some way in R
or otherwise of performing the following hypothesis test.
I have a single data item x. The null hypothesis is that x was selected
from a normal distribution N(mu,sigma). The alternate hypothesis is that
x does not come from this distribution.
However, I
2009 Mar 29
2
Compiler options for Makefile.win
Dear all,
For certain reasons I have to compile the source code of my package on
Windows XP using Microsoft Visual Studio 9.0, thus I had to create a
"Makefile.win". Now I have a question regarding compiler options /MT vs
/MD for Makefile.win.
The following partial output shows that when building my package on
Windows XP using "R CMD build --binary xps" with compiler
2002 Aug 29
8
lme() with known level-one variances
Greetings,
I have a meta-analysis problem in which I have fixed effects
regression coefficients (and estimated standard errors) from identical
models fit to different data sets. I would like to use these results
to create pooled estimated regression coefficients and estimated
standard errors for these pooled coefficients. In particular, I would
like to estimate the model
\beta_{i} = \mu +
2011 Dec 31
2
Very strange function() behaviour.
Hi, R newb here. I've coded a function that inputs N dimensional array(s) [or
class=numeric if it's dim=1] of coefficients and tstats, where
dim(coef_matrix)=dim(tstat_matrix), it will then output a same dimension
matrix of coefficients pasted to tstats in brackets pasted to significance
stars.
If I go straight to the code INSIDE the function, it works 100% as it's
supposed to. The
2023 Jul 07
0
Actualización sobre la norma vigente 2023
EXCLUSIVA CONFERENCIA
ONLINE EN VIVO
Importante Actualizaci?n en la norma sobre
DESCARGA AGUAS RESIDUALES
los l?mites permisibles para la NOM-001-SEMARNAT-2021 entran en vigor este 2023
Su participaci?n en este curso incluye:
Constancia de competencias o Habilidades Laborales DC-3
Exposici?n de un prestigado consultor
Material digital
Diploma digital
Agunas Temas a tratar son:
Los m?todos de
2006 Sep 27
3
t-stat Curve
Number of subjects = 25
Mean of Sample = 77
Standard Deviation (s) = 12
sem = 2.4
df = 24
The claim is that population mean is less than 80
* > 80
So our H0 (null hupotheis) is * > 80
> qt(.95,24)
[1] 1.710882
> qt(0.05, 24)
[1] -1.710882
tstat = -1.25 on t24 falls between 1.711 (.95,24) and *1.711 (.005,24)
How Could I sketch t curve for the above data where my * would be at the
2008 Oct 21
2
Question about glm using R
Good morning,
I am using R to try to model the proportion of burned area in Portugal.
The dependent variable is the proportion. The family used is binomial
and the epsilon would be binary.
I am not able to find the package to be used when the proportion (%) has
to be used in glm. Could someone help me?
I am using normal commands of glm.. for example:
glm_5<- glm(formula=p~Precipitation,
2023 Jun 06
0
Norma Obligatoria de Aguas Nacionales
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xen-devel/attachments/20230606/378d4f65/attachment.htm>
2023 Jun 09
0
Nueva Norma Aguas Nacionales
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xen-devel/attachments/20230608/53227347/attachment.htm>
2008 Jun 25
0
Goodness-of-fit for zero-truncated poisson distribution
Hi there,
I am trying to write a function to perform GOF test of data to a
zero-truncated Poisson distribution. I am facing 2 problems.
1) How can I obtain a frequency table for all values within the range of
observed values?
For instance if the observations are
obs <- c("A", "A", "A", "A", "B", "C", "C", "D",
2012 Aug 18
1
texi2dvi error "Sweave" and "exams"
I have installed Sweave as recommended. http://lifeasclay.wordpress.com/tag/sweave/. Placing a test.Rnw file, for instance, in "/Library/Frameworks/R.framework/Versions/2.15/Resources/library/utils/Sweave" generates test.tex files that generate pdf files with LaTeX. To be honest, placing Rnw files seem to make sense. The "exams" package does require not this step. It uses
2006 Apr 11
3
problems with rounding in output
Perhaps someone will have a solution to my more general problem, but
here is the specific one:
I used the round() function to round some estimates to 3 decimal
places. I then sent put the rounded estimates in a matrix and used
latex() to make a LaTeX table from them. However, in my table, there
are estimtes which only have 2 decimal places. I assume that the third
decimal place in these numbers