Displaying 20 results from an estimated 1000 matches similar to: "Weighted Histogram"
1999 Sep 17
2
Non-interactive sessions
Greetings,
Quick Summary: How does R function non-interactively? I can't print
graphics to an X11 window.
I set up what appears to be called a "noninteractive" R session using
the Perl code at the end of this message. Everthing seems to work fine
as written. I get a nice postscript file with my graphics.
However, I would like to display X11 R-graphics for the Perl-script
1999 Nov 12
1
some related problems
I just tried to batch-start rgui.exe (not rterm.exe) in a way, that it
read.table()s data from a file with changing filename. As I understand no
command line parameters are available for that, so instead I tried to pass
the filename to an approbriate .RProfile, which works roughly, BUT
## this is my %R_USER%\.RProfile
im <- read.table("d:/temp/im/temp.csv", header=TRUE,
2002 Mar 12
0
Vis5D interface package
Greetings,
Summary: Has anyone else started a package (or have code) with the
capability to write Vis5D-readable netCDF files containing
irregularly-spaced data?
I've recently put together what might be the beginnings of a (GPL'ed) R
interface package to the Vis5D volumetric visualization program
(http://vis5d.sourceforge.net). Vis5D is commonly used in the
atmospheric science and
2008 Jun 25
1
weighted inverse chi-square method for combining p-values
Hi,
This is more of a general question than a pure R one, but I hope that is OK.
I want to combine one-tailed independent p-values using the weighted version
of fisher's inverse chi-square method. The unweighted version is pretty
straightforward to implement. If x is a vector with p-values, then I guess
that this will do for the unweighted version:
statistic <- -2*sum(log(x))
comb.p <-
2006 Mar 01
1
Drop1 and weights
Hi,
If I used drop1 in a weighted lm fit, it seems to ignore the weights
in the AIC calculation of the dropped terms, see the example below.
Can this be right?
Yan
--------------------
library(car)
> unweighted.model <- lm(trSex ~ (river+length +depth)^2-
length:depth, dno2)
> Anova(unweighted.model)
Anova Table (Type II tests)
Response: trSex
Sum Sq Df F value
2011 Oct 21
1
lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth
In the HistData package, I have a data frame, PearsonLee, containing
observations on heights of parent and child, in weighted form:
library(HistData)
> str(PearsonLee)
'data.frame': 746 obs. of 6 variables:
$ child : num 59.5 59.5 59.5 60.5 60.5 61.5 61.5 61.5 61.5 61.5 ...
$ parent : num 62.5 63.5 64.5 62.5 66.5 59.5 60.5 62.5 63.5 64.5 ...
$ frequency: num 0.5 0.5
2010 Jul 20
1
Servreg $loglik
Dear R-experts:
I am using survreg() to estimate the parameters of a Weibull density having
right-censored observations. Some observations are weighted. To do that I
regress the weighed observations against a column of ones.
When I enter the data as 37 weighted observations, the parameter estimates
are exactly the same as when I enter the data as the corresponding 70
unweighted observations.
2006 Mar 01
2
Weighted networks and multigraphs
I would like to apply network measures (such as betweenness centrality,
upper boundedness, etc.) to a weighted graph with non-integer weights,
defined by a euclidean distance matrix. The package sna provides the
measures that I want to use, but seems only to operate on binary graphs.
I have read work by Mark Newman
(http://aps.arxiv.org/abs/cond-mat/0407503/), who suggests that a
weighted graph
2007 Aug 23
1
degrees of freedom question
R2.3, WinXP
Dear all,
I am using the following functions:
f1 = Phi1+(Phi2-Phi1)/(1+exp((log(Phi3)-log(x))/exp(log(Phi4)))
f2 = Phi1+(Phi2-Phi1)/(1+exp((log(Phi3)-log(r)-log(x))/exp(log(Phi4)))
subject to the residual weighting
Var(e[i]) = sigma^2 * abs( E(y) )^(2*Delta)
Here is my question, in steps:
1. Function f1 is separately fitted to two different datasets
corresponding to
2006 Aug 25
1
R.squared in Weighted Least Square using the Lm Function
Hello all,
I am using the function lm to do my weighted least
square regression.
model<-lm(Y~X1+X2, weight=w)
What I am confused is the r.squared.
It does not seem that the r.squared for the weighted
case is an ordinary 1-RSS/TSS.
What is that precisely?
Is the r.squared measure comparable to that obtained
by the ordinary least square?
<I also notice that
model$res is the unweighted
2011 Feb 23
1
Weighted Mean By Factor Using "BY"
Hello R folks,
Reproducible code below - I'm trying to do a weighted mean by a factor and
can't figure it out. Thanks in advance for your assistance.
Mike
data<-data.frame(c(5,5,1,1,1),
c(10,8,9,5,3),
c("A","A","A","B","B"))
2002 Jul 15
2
Transpose and NA's
I noticed some odd behavior when I transpose a data frame containing
NA's. It seems to cast all the elements as "character" including the
NA's. Bug?
> t(data.frame(x=1:10,y=1:10,z=rep(NA,10)))
1 2 3 4 5 6 7 8 9 10
x " 1" " 2" " 3" " 4" " 5" " 6"
2012 Mar 25
1
Accessing more than two coefficients in a plot
I've successfully plotted (in the plot and abline code below) a simple regression of Lambda1_2 on VV1_2. I then successfully regressed Lambda1_2 on VV1_2, VV1_22 and VV1_212 producing lm2.l. When I go to plot lm2.l using abline I get the warning:
"1: In abline(lm2.l, col = "brown", lty = "dotted", lwd = 2) : only using the first two of 4 regression coefficients"
2009 Oct 20
2
Weighted Logistic Regressions using svyglm
I?m running some logistic regressions and I?ve been trying to include weights
in the equation. However, when I run the model, I get this warning message:
Here?s what it says: Warning message: In eval(expr, envir, enclos) :
non-integer #successes in a binomial glm!
I think it is because the weights are non-integer values.
What is a good way to run logistic regressions in R when using
2009 Feb 06
0
Comparing weighted histograms?
I'm trying to plot and compare weighted histograms and I can't seem find
where to start. I have data similar to this:
Miles2LAX RADAM2005Pct LAWA2005Pct
35.57 .00123 .00684
24.74 .00118 .00187
27.09 .00965 .00876
16.23 .00587 .00397
{ ...
2002 Feb 06
4
Weighted median
Is there a weighted median function out there similar to weighted.mean()
but for medians? If not, I'll try implement or port it myself.
The need for a weighted median came from the following optimization
problem:
x* = arg_x min (a|x| + sum_{k=1}^n |x - b_k|)
where
a : is a *positive* real scalar
x : is a real scalar
n : is an integer
b_k: are negative and positive scalars
2007 Mar 22
3
Cohen's Kappa
Hi,
im little bit confused about Cohen's Kappa and i should be look into the
Kappa function code. Is the easy formula really wrong?
kappa=agreement-chance/(1-chance)
many thanks
christian
###############################################################################
true-negativ:7445
false-positive:3410
false-negativ:347
true-positiv:772
classification-aggrement:68,6%
2008 Apr 28
0
weighted nonlinear fits: `nls' and `eval'
dear list,
my question concerns the use of `eval' in defining the model formula
for `nls' (version 2.6.2.).
consider the following simple example, where the same model and data
are used to perform unweighted and weighted fits. I intentionally
used very uneven weights to guarantee large differences in the results
#================================CUT===========================
ln
2002 May 15
0
Reading multi-line FWF data
I keep getting these fixed-width format (FWF) data files where variables
for a single subject are spread across multiple lines and each line has
a different format (apparently created with SAS or SPSS). To read them
I stole some stuff from `read.fwf' in base R and threw together the
function included below.
Please feel free to test this function with your own data and let me
know of any
2008 Apr 30
0
weighted nonlinear fits: `nls' and `eval'
2 days ago I asked this on r-help, but no luck... since
this is actually a programming question, I post it here
again:
my question concerns the use of `eval' in defining the model
formula for `nls' when performing weighted fits. (I use
version 2.6.2., but according to NEWS there were no changes
to `nls' in 2.7.0, so the problem is still present). in this
scenario their