Displaying 20 results from an estimated 40000 matches similar to: "a problem."
2009 Jul 09
9
Population pyramids
Hi, I hope somebody can help me with this issue: I am doing population pyramids using the barplot command, so in the left side I have male age structure and in the right side the female age structure. To plot the male age structure I put the data in negative numbers. Now, I want to change the sign in the bar plot in such way that I have no-sign numbers, both in left and right side of the graph. I
2009 Jul 24
4
CI wiskers
I have a matrix containing means and CIs (lower and upper in two columns, so
three columns for every data point) for several points. I have to build a
graph of these means accompained by the CIs (as wiskers). No problems with
making the graph of means, but I don't know how to introduce CIs.
Can anybody advise?
--
View this message in context:
2008 Oct 21
1
Bootstrap
Hi listers,
I've been work on a bootstrap estimator and I don't know how to make a
certain manipulation at the data.
As an example I have the following data and samples... I need now to
identify the vector in wich I sampled the id, I mean that I have to merge
the files having the key as the id of the samples in order to find the
vector that were selected.
Thanks in advance,
M?rcio
2008 Apr 14
2
Plotting with exact axis limits
Hello,
If I make a plot, say something simple like
plot( runif(100) )
then the origin (0,0) is not at the bottom-left corner of the box
surrounding the plot. The axis limits are "padded" slightly. This is
ordinarily a good feature, because it makes plots look better. But now I
would like to make a plot with the origin exactly on the bottom left.
Through trial and error, I have
2009 Dec 17
1
Random Number Generation in a Loop
Dear R helpers
I am having following data
Name Numbers
A 25
B 3
C 13
A 5
B 7
C 0
A 2
B 10
C 9
CONDITIONS
If Name is A, min_val = 1.05, max_val = 1.30
If Name is B, min_val = 1.30, max_val = 1.60
If Name is C, min_val =
2008 Feb 27
4
Error in cor.default(x1, x2) : missing observations in cov/cor
Hello,
I'm trying to do cor(x1,x2) and I get the following error:
Error in cor.default(x1, x2) : missing observations in cov/cor
A few things:
1. I've used cor() many times and have never encountered this error.
2. length(x1) = length(x2)
3. is.numeric(x1) = is.numeric(x2) = TRUE
4. which(is.na(x1)) = which(is.na(x2)) = integer(0) {the same goes for
is.nan()}
5. I also try
2007 Dec 31
3
Survival analysis with no events in one treatment group
I'm trying to fit a Cox proportional hazards model to some hospital
admission data. About 25% of the patients have had at least one
admission, and of these, 40% have had two admissions within the 12
month period of the study. Each patients has had one of 4
treatments, and one of the treatment groups has had no admissions for
the period. I used:
2008 Nov 18
4
Changing the position of the origin
Hi all,
Can anyone tell me how I can make 0,0 start at the top left hand
corner of a graph, instead of the typical lower left hand corner? I've
tried to plot with axes=F and then putting on the axes later, but I
want the points to correspond to the axes.
Thanks,
Kang Min
2009 May 06
4
subset data
Dear all,
> data <- data.frame(id=seq(1:10),x=runif(10))
> data
id x
1 1 0.3604464
2 2 0.4813987
3 3 0.0160058
4 4 0.7165909
5 5 0.6092248
6 6 0.2413049
7 7 0.7981568
8 8 0.6093960
9 9 0.2887064
10 10 0.3485780
> selected.id <- sample(data$id,3,replace=F)
> selected.id
[1] 9 7 1
I want to select data with corresponding selected.id, namely
>
2008 Jul 08
8
Sum(Random Numbers)=100
Hi R,
I need to generate 50 random numbers (preferably poisson), such that
their sum is equal to 100. How do I do this?
Thank you,
Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2009 Sep 20
3
statistics
The myoglobin sequence, with reference number NM_005368 in Gen bank, has the
following
frequencies of DNA nucleotides:
A C G T
237 278 309 242
Do these data provide sufficient evidence, at the 1% level of significance,
that the DNA nucleotides
have an unequal distribution, that is the DNA nucleotides are not evenly
utilised?
Clearly state your hypothesis, test statistic and conclusion.
2008 Feb 26
3
OLS standard errors
Hi,
the standard errors of the coefficients in two regressions that I computed
by hand and using lm() differ by about 1%. Can somebody help me to identify
the source of this difference? The coefficient estimates are the same, but
the standard errors differ.
####Simulate data
happiness=0
income=0
gender=(rep(c(0,1,1,0),25))
for(i in 1:100){
happiness[i]=1000+i+rnorm(1,0,40)
2010 Apr 08
2
Problem using elements in a vector
Hi
So my particular problem is this:
I have a row vector of length 5200 elements - specifically created by
x<-rbinom(5200,1,0.5)
y<-matrix(x,nrow=1,ncol=5200)
y
now, each element is either a 0 or a 1 - e.g. it could be
(0,1,1,1,1,0,0,0,1,1,1) e.t.c.
when the element is a 1, i need to multiply a number (say 1000) by 1.005,
and if it is 1 again, multiply it _again_ by 1.005.
so for
2009 Nov 11
3
how to use # in a rd doc in url address
I am writing a rd doc, and need to use "#" in a url adress. This would make:
\url{http://www.xxxx.org/myfolder/#myanchor}
Of course, I suppose this will not work because # is a special character
starting a comment line in the rd dialect. I did not found a similar
example in "Writing R exentions". I am not sure bout using \dQuote{a
quotation}), and use \sQuote and \dQuote
2009 Sep 08
2
Fitting a linear model with a break point
Hello,
I would like to test some data to see whether it has the shape of a step
function (i.e. y1 up until x_th and then y2 where x_th is the
threshold). The threshold x_th is unknown and the x values can only
take discrete values (0,1,2,3,4).
An example would be:
data<- data.frame(x=1:20,y=c(rnorm(10),rnorm(10,10)))
I was thinking along the lines of fitting some sort of piiecewise linear
2008 Mar 31
2
Finding a mean value of a variable holding a dummy variable fixed
I have time-series data on approval ratings of British Prime Ministers. The
prime ministers dating from MacMillan onward till today are coded as dummy
variables and the approval ratings are entered for each month. I want to
know the mean value of the approval rating of each Prime Minister in the
dataset and the approval rating during his/her first month and last month as
PM. What R code should
2009 Aug 14
4
Assigning values based on a separate reference (lookup) table
Dear R Users,
I have a data frame of 360 rows by 720 columns (259200 values). For each value in this grid I am hoping to apply an equation to, to generate a new grid. One of the parts of the equation (called 'p') relies on reading from a separate reference table. This is Table 4 at: http://www.fao.org/docrep/s2022e/s2022e07.htm#3.1.3%20blaney%20criddle%20method (scroll down a little).
2007 Nov 16
1
Nonparametric manova
Hi, I have seen a discussion in the R-help asking whether nonparametric
manova has been implemented in R yet. This discussion is form March 2006 and
there seemed to be no package or function implemented at the time. Has this
changed? Is there a package that provides nonparametric manova as in McArdle
and Anderson (2001) and Anderson (2001) now?
Thanks,
Daniel
-------------------------
cuncta
2008 Nov 20
1
sub / gsub - extracting between identical symbols
Hi, I am trying to extract some numbers from a text string. The problem is
that the delimiting symbols are identical so that I do not know how to tell
"sub" between which of them to extract.
The string looks like this
12/01/03/08
The extracted variables should look like:
x1=12
x2=01
x3=03
x4=08
If anybody could help or point me to useful help, I would be greatful.
Cheers,
Daniel
2009 Aug 05
4
for loop
I am trying to get the function "Models" to work each time there is an
instance of k. This code will stop after the first model is complete. I need
it to come back and pass the next value of c into the "Initial.State"
function. any ideas?
col<-c(23:28)
#Setup
for(k in col){
Initial.State(Response=zample[,c(k,29)],
Explanatory=zample[,variable_columns],