Displaying 20 results from an estimated 400 matches similar to: "how to deal with vector[0]?"
2009 Sep 23
3
Reading data
Dear R-users,
I am a new user for R. I am eager to lean about it.
I wanted to read and summary of the a simple data file
I used the following,
rel <- read.table("C:/Documents and Settings/ashta/My
Documents/R_data/rel.dat", quote="",header=FALSE,sep="",col.names=
c("id","orel","nrel"))
summary(rel)
Below is the
2003 Oct 31
1
constrained nonlinear optimisation in R?
Hello. I have searched the archives but have not found anything. I
need to solve a constrained optimisation problem for a nonlinear
function (“maximum entropy formalism”). Specifically,
Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities,
conditional on a series of constraints of the form:
SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are
constraints on
2012 Mar 20
1
How to write and analyze data with 3 dimensions
Suppose I have data organized in the following way:
(P_i, M_j, S_k)
where i, j and k and indexes for sets.
I would like to analyze the data to get for example the following
information:
what is the average over k for
(P_i, M_j)
or what is the average over j and k for P_i.
My question is what would be the way of doing this in R.
Specifically how should I write the data in a csv file
and how do I
2010 Dec 15
4
Generacion de binomiales correlacionadas
Buenas tardes,
Estoy interesado en generar observaciones de una distribucion binomial
bivariada en la que hay _cierto_ grado de correlacion (denotemoslo rho).
Podria por favor alguien indicarme como hacerlo en R?
Este es el contexto. Supongamos que se tienen dos experimentos en los que la
variable respuesta _sigue_ una distribucion binomial, i.e., X_i
~Binomial(n_i, p_i), i=1,2 y que, por ahora,
2007 Jan 20
1
aov y lme
Dear R user,
I am trying to reproduce the results in Montgomery D.C (2001, chap 13,
example 13-1).
Briefly, there are three suppliers, four batches nested within suppliers
and three determinations of purity (response variable) on each batch. It is
a two stage nested design, where suppliers are fixed and batches are random.
y_ijk=mu+tau_i+beta_j(nested in tau_i)+epsilon_ijk
Here are the
2009 Oct 28
2
regression on large file
Dear R community,
I have a fairly large file with variables in rows. Every variable
(thousands) needs to be regressed on a reference variable. The file is too
big to load into R (or R gets too slow having done it) and I do now read in
line by line with "scan" (see below) and write the results to out. Although
improved, this is still very slow... Can someone please help me and suggest
2010 Aug 02
2
Dealing with a lot of parameters in a function
Hi all,
I'm trying to define and log-likelihood function to work with MLE.
There will be parameters like mu_i, sigma_i, tau_i, ro_i, for i between
1 to 24. Instead of listing all the parameters, one by one in the
function definition, is there a neat way to do it in R ? The example is
as follows:
ll<- function(mu1=-0.5,b=1.2,tau_1=0.5,sigma_1=0.5,ro_1=0.7)
{ if (tau1>0 &&
2012 Dec 12
1
data download
I am trying to download the tar files on the website below
filename<-"
http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2010/SolarAnywhere/x.tar"
where x is one those tar files
I downloaded x using download.file(). But, the file was corrupt. Can
someone help me how to download and untar these files using R.
Thanks,
Alemu
[[alternative HTML version deleted]]
2007 Mar 05
3
Mixed effects multinomial regression and meta-analysis
R Experts:
I am conducting a meta-analysis where the effect measures to be pooled
are simple proportions. For example, consider this data from
Fleiss/Levin/Paik's Statistical methods for rates and proportions (2003,
p189) on smokers:
Study N Event P(Event)
1 86 83 0.965
2 93 90 0.968
3 136 129 0.949
4 82 70 0.854
Total
2005 Jul 07
1
CDF plot
Dear all,
I have define a discrete distribution P(y_i=x_i)=p_i, which I want to
plot a CDF plot. However, I can not find a function in R to draw it
for me after searching R and R-archive. I only find the one for the
sample CDF instead my theoretical one.
I find stepfun can do it for me, however, I want to plot some
different CDF with same support x in one plot. I can not manage how to
do it with
2007 Mar 09
1
help with zicounts
Dear UseRs:
I have simulated data from a zero-inflated Poisson model, and would like
to use a package like zicounts to test my code of fitting the model.
My question is: can I use zicounts directly with the following simulated
data?
Create a sample of n=1000 observations from a ZIP model with no intercept
and a single covariate x_{i} which is N(0,1). The logit part is
logit(p_{i})=x_{i}*beta
2001 Feb 15
2
deviance vs entropy
Hello,
The question looks like simple. It's probably even stupid. But I spent several hours
searching Internet, downloaded tons of papers, where deviance is mentioned and...
And haven't found an answer.
Well, it is clear for me the using of entropy when I split some node of a classification tree.
The sense is clear, because entropy is an old good measure of how uniform is distribution.
2007 Jan 19
0
(no subject)
Dear R user,
I am trying to reproduce the results in Montgomery D.C (2001, chap 13,
example 13-1).
Briefly, there are three suppliers, four batches nested within suppliers
and three determinations of purity (response variable) on each batch. It is
a two stage nested design, where suppliers are fixed and batches are random.
y_ijk=mu+tau_i+beta_j(nested in tau_i)+epsilon_ijk
Here are the
2015 Apr 20
2
Samba 4.1 as member server, problems doing password authentication using CentOS/RedHat 7 packages
I've come across a difference I can't explain between the way Samba
behaves on Fedora 20 (4.1.17-1.fc20) and Centos 7 (4.1.12-21.el7). I
have a test server of each system (Fedora 20 and Centos 7), each newly
built, fully updated, and with the same config file. Each is joined to
our AD domain (Windows DCs). Some of our client systems are joined to
the domain and use Kerberos tickets
2006 Dec 28
0
lmer: Interpreting random effects contrasts and model formulation
I'm trying to fit a nested mixed model using lmer and have some
questions about the output and my model formulations.
I have replicate measures on Lines which are strictly nested within
Populations.
(a) So if I want to fit a model where Line is a random effect and
Populations are fixed and the random Line effect is constant across
Populations, I have:
measure_ijk = mu + P_i + L_ij +
2009 Apr 08
0
Comparing Proportions Among Groups
Hi everyone,
I am trying to compare proportions among groups using the logistic
regression
approach as follows:
1) Fit the model log(p_i/(1-p_i)) = M + G_i, where p_i is the probability
of success in group i and G_i is the effect of group i, i=1,..,I.
2) Test the hypotheses:
Ho: G_1 = G_2 = ... = G_I (the probability of success is the same for all
groups)
versus
Ha: at least two
2004 Feb 03
1
Stereo mode settings
Hi everyone,
I'd like a bit of information about the stereo mode settings in
psych_44.h of libvorbis. Specifically, about the adj_stereo structure:
typedef struct {
int pre[PACKETBLOBS];
int post[PACKETBLOBS];
float kHz[PACKETBLOBS];
float lowpasskHz[PACKETBLOBS];
} adj_stereo;
What I am attempting to do is bring lossless stereo coupling down to the
lower quality levels in
2009 Nov 04
1
compute maximum likelihood estimator for a multinomial function
Hi there
I am trying to learn how to compute mle in R for a multinomial negative
log likelihood function.
I am using for this the book by B. Bolker "Ecological models and data in
R", chapter 6: "Likelihood an all that". But he has no example for
multinomial functions.
What I did is the following:
I first defined a function for the negative log likelihood:
2004 Dec 03
3
Computing the minimal polynomial or, at least, its degree
Hi,
I would like to know whether there exist algorithms to compute the
coefficients or, at least, the degree of the minimal polynomial of a square
matrix A (over the field of complex numbers)? I don't know whether this
would require symbolic computation. If not, has any of the algorithms been
implemented in R?
Thanks very much,
Ravi.
P.S. Just for the sake of completeness, a
2011 Jan 13
1
Weighted Optimization
Hi All,
I am trying to code an R script which gives me the time varying parameters of the NIG and GH distributions. Further, becasue I think these these time varying parameters should be more responsive to more recent observations, I would like to include a weighted likelihood estimation proceedure where the observations have an exponentially decaying weighting rather than the equal weighting