Displaying 20 results from an estimated 900 matches similar to: "Test for stochastic dominance, non-inferiority test for distributions"
2008 Aug 18
1
Survey Design / Rake questions
I'm trying to learn how to calibrate/postStratify/rake survey data in
preparation for a large survey effort we're about to embark upon. As a
working example, I have results from a small survey of ~650 respondents,
~90 response fields each. I'm trying to learn how to (properly?) apply
the aforementioned functions.
My data are from a bus on board survey. The expansion in the
2008 Nov 04
2
ordered logistic regression of survey data with missing variables
Hello:
I am working with a stratified survey dataset with sampling weights
and I want to use multiple imputation to help with missingness.
1. Is there a way to run an ordered logistic regression using both a
multiply imputed dataset (i.e. from mice) and adjust for the survey
characteristics using the weight variable? The Zelig package is able
to do binary logistic regressions for survey
2009 Jan 19
3
bootstrapped eigenvector method following prcomp
G'Day R users!
Following an ordination using prcomp, I'd like to test which variables
singnificantly contribute to a principal component. There is a method
suggested by Peres-Neto and al. 2003. Ecology 84:2347-2363 called
"bootstrapped eigenvector". It was asked for that in this forum in
January 2005 by J?r?me Lema?tre:
"1) Resample 1000 times with replacement entire
2009 Jan 12
3
polychoric correlation: issue with coefficient sign
Hello,
I am running polychoric correlations on a dataset composed of 12 ordinal and
binary variables (N =384), using the polycor package.
One of the association (between 2 dichotomous variables) is very high using
the 2-step estimate (0.933 when polychoric run only between the two
variables; but 0.801 when polychoric run on the 12 variables). The same
correlation run with ML estimate returns a
2008 Aug 15
2
Design-consistent variance estimate
Dear List:
I am working to understand some differences between the results of the
svymean() function in the survey package and from code I have written
myself. The results from svymean() also agree with results I get from
SAS proc surveymeans, so, this suggests I am misunderstanding something.
I am never comfortable with "I did what the software" does mentality, so
I am working to
2008 May 12
1
RPM-style install (SLED 10.1)
I am trying to install R on a SLED 10.1 machine.
R-base-2.7.0-7.1-i586.rpm fails with
stas at linux-6b8s:~/RPMs> rpm -Uvh R-base-2.7.0-7.1.i586.rpm
warning: R-base-2.7.0-7.1.i586.rpm: Header V3 DSA signature: NOKEY,
key ID 14ec5930
error: Failed dependencies:
libgfortran.so.1 is needed by R-base-2.7.0-7.1.i586
I tried to trick it into believing there's the library by setting up
2009 Jan 09
1
survey statistics, rate/proportions with standard errors
what does R have to compare with , say , proc surveymeans, estimate survey
means/proportions with standard errors, using Taylor methods?
[[alternative HTML version deleted]]
2008 Aug 20
2
Quantile regression with complex survey data
Dear there,
I am working on the NHANES survey data, and want to apply quantile
regression on these complex survey data. Does anyone know how to do
this?
Thank you in advance,
Yiling Cheng
Yiling J. Cheng MD, PhD
Epidemiologist
CoCHP, Division of Diabetes Translation
Centers for Disease Control and Prevention
4770 Buford Highway, N.E. Mailstop K-10
Atlanta, GA 30341
[[alternative HTML
2009 Apr 14
1
import from stata
Dear R users,
I am trying to import a table from STATA, a dta file.
With a table called "table", this is what I do :
library("foreign")
read.dta(table)
It does not work. What am I doing wrong ?
Best Regards,
Dwayne
[[alternative HTML version deleted]]
2008 Jul 27
2
Link functions in SEM
Is it possible to fit a structural equation model with link functions in R? I
am trying to build a logistic-regression-like model in sem, because
incorporating the dichotomous variables linearly seems inappropriate. Mplus
can do something similar by specifying a 'link' parameter, but I would like
to be able to do it in R, ofcourse.
I have explored the 'sem' package from John Fox,
2020 Nov 04
2
sprintf, check number of parameters
Dear Tomas,Thank you.Regarding the "unnumbered" arguments, i.e. sprintf('%f %f', 1, 2, 3). This was the case I wanted to report, here a warning can be very useful.Regarding the "numbered" arguments, that is, sprintf('%$1f %$3f', 1, 2, 3). Here, omission of an argument might be intended, for example, in an application with support for multiple languages.
2011 May 17
5
Feed a list of filenames to vim
There are some googlable ways to feed a list of filenames to vim, but I
stumble on weird results.
With my filelist, I try to do
cat list | xargs vim
...to edit the files listed in the file "list". Here's what happens:
[root at lasso2 tempdir]# ls -l
total 8
-rw-r--r-- 1 root root 0 May 17 18:28 a
-rw-r--r-- 1 root root 0 May 17 18:28 b
-rw-r--r-- 1 root root 3 May 17
2017 Sep 02
2
Strange lazy evaluation of default arguments
Another way to avoid the problem is to not redefine variables that are
arguments. E.g.,
> Su3 <- function(u=100, l=u, mu=0.53, sigma2=4.3^2, verbose)
{
if (verbose) {
print(c(u, l, mu))
}
uNormalized <- u/sqrt(sigma2)
lNormalized <- l/sqrt(sigma2)
muNormalized <- mu/sqrt(sigma2)
c(uNormalized, lNormalized, muNormalized)
}
> Su3(verbose=TRUE)
2017 Sep 02
6
Strange lazy evaluation of default arguments
Dear R developers,
sessionInfo() below
Please have a look at the following two versions of the same function:
1. Intended behavior:
> Su1 = function(u=100, l=u, mu=0.53, sigma2=4.3^2)
+ {
+ print(c(u, l, mu)) # here, l is set to u?s value
+ u = u/sqrt(sigma2)
+ l = l/sqrt(sigma2)
+ mu = mu/sqrt(sigma2)
+ print(c(u, l, mu))
+ }
>
> Su1()
[1] 100.00 100.00 0.53
[1]
2020 Sep 20
2
sprintf, check number of parameters
Dear R developers,
I am wondering if this should raise an error or a warning.
> sprintf('%.f, %.f', 1, 2, 3)
[1] "1, 2"
I am aware that R has ?numbered? sprintf arguments (sprintf('%1$.f', ?), and in that case, omissing of specific arguments may be intended. But in the usual syntax, omission of an argument is probably a mistake.
Thank you for your consideration.
2017 Sep 02
0
Strange lazy evaluation of default arguments
Dear Bill,
All makes perfect sense (including the late evaluation). I actually discovered the problem by looking at old code which used your proposed solution. Still I find it strange (and, hnestly, I don?t like R?s behavior in this respect), and I am wondering why u is not being copied to L just before u is assigned a new value. Of course, this would require the R interpreter to track all these
2012 Feb 22
1
line width in legend of interaction.plot
Dear R developers,
The following command produces an interaction plot with lwd=2.
interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2)
In the legend, however, lwd seems to be 1, which does not seem
to be intended behavior. Probably the lwd is not correctly forwarded
to legend:
from the interaction.plot source:
legend(xleg, yleg, legend = ylabs, col = col, pch = if (type %in%
2009 Sep 30
3
programming to calculate variance
Dear R-user
Suppose I have the following data
y=c(2,1,5,8,11,3,1,7,50,21,33,7,60)
x=data.frame(y)
for(i in 4:nrow(x)) x[i,] =var(x[i-3:i-1,])
I'm trying to get a new variable with the variance of the 3 previous values
(just an example) and with NA in the three first positions. I know that my
for() is wrong
but I'm not able to find my error.
Any idea?
Thanks,
Marlene.
2013 Dec 11
0
Stochastic Dominance Analysis
Do anyone now R packages that run/test stochastic dominance
with respect to a function (SDRF) and/or stochastic efficiency
with respect to a function (SERF)?
Peter Maclean
Department of Economics
UDSM
[[alternative HTML version deleted]]
2012 Oct 09
1
ylim with only one value specified
Dear R developers,
I would like to have R choose the limits of the y-axis semi-automatically,
e.g., zero should be included, but the maximum should be chosen depending
on the data.
Examples:
plot(1:10, 1:10) # selects min and max automatically
plot(1:10, 1:10, ylim=c(1, 10)) # manual definition
plot(1:10, 1:10, ylim=c(0, Inf)) # this would be a nice feature, i.e. lower y limit = 0 defined