Displaying 20 results from an estimated 1440 matches for "discrete".
2006 Aug 04
1
polychoric correlation error
...t I generated randomly is a bit strange, but it is the only way that I duplicate the error message.
> n<-100
> test.x<-rnorm(n, mean=0, sd=1)
> test.c<-test.x + rnorm(n, mean=0, sd=.5)
> thresh.x<-c(-2.5, -1, -.5, .5, 1000)
> thresh.c<-c(-1, 1, 2, 3, 1000)
>
> discrete.x<-discrete.c<-vector(length=n)
>
> for (i in 1:n) {
+ discrete.x[i]<-which.min(thresh.x < test.x[i] )
+ discrete.c[i]<-which.min(thresh.c < test.c[i] )
+ }
> pc<-polychor(discrete.x, discrete.c, std.err=T, ML=T)
Error in optim(c(optimise(f, interval = c(-1, 1))$min...
2010 Mar 01
2
Advice wanted on using optim with both continuous and discrete par arguments...
Dear R users,
I have a problem for which my objective function depends on both discrete and continuous arguments.
The problem is that the number of combinations for the (multivariate) discrete arguments can become overwhelming (when it is univariate this is not an issue) hence search over the continuous arguments for each possible combination of the discrete arguments may not be feas...
2011 Jul 15
2
Convert continuous variable into discrete variable
Dear all,
I have a continuous variable that can take on values between 0 and 100, for
example: x<-runif(100,0,100)
I also have a second variable that defines a series of thresholds, for
example: y<-c(3, 4.5, 6, 8)
I would like to convert my continuous variable into a discrete one using the
threshold variables:
If x is between 0 and 3 the discrete variable should be 1
If x is between 3 and 4.5 the discrete variable should be 2
If x is between 4.5 and 6 the discrete variable should be 3
If x is between 6 and 8 the discrete variable should be 4
If x is larger than 8 the d...
2012 Nov 13
2
Discrete trait Ornstein–Uhlenbeck in R?
Is there a package that will allow me to fit Brownian motion and
Ornstein?Uhlenbeck models of evolution for discrete traits? I know that
geiger and ouch have commands for fitting these models for continuous
traits, but these aren't suitable for discrete trait evolution, correct?
--
View this message in context: http://r.789695.n4.nabble.com/Discrete-trait-Ornstein-Uhlenbeck-in-R-tp4649356.html
Sent from...
2003 Oct 01
3
fitting Markov chains
...rix of
transition probabilities (ie, it is a Markov process).
I would like to estimate this process from a given set of data.
For example, let the interest rate time series be:
7 3 8 2 5 9 6
Assume that the discretized variable can take the following values:
(3, 5, 8), then we find the nearest discrete point and give its index:
3 1 3 1 2 3 2
Then estimate the transition probabilities.
I have the following questions:
- how should I select the discrete set of values that the variable can
assume? Eg simply get the maximum and minimum, and divide this
interval into, say, three pieces? Or estimate...
2011 Apr 08
4
Simulation from discrete uniform
Dear all,
I am trying to simulate from discrete uniform distribution. But I could not
find any in-built code in R. Could anyone help me please?
Thanks in advance for the time and help.
Cassie
[[alternative HTML version deleted]]
2010 Mar 08
2
variance of discrete uniform distribution
Hi all,
I am REALLY confused with the variance right now.
for a discrete uniform distribution on [1,12]
the mean is (1+12)/2=6.5
which is ok.
y=1:12
mean(y)
then var(y)
gives me 13
1- on http://en.wikipedia.org/wiki/Uniform_distribution_%28discrete%29 wiki
the variance is (12^2-1)/12=143/12
2-
http://www.solvemymath.com/online_math_calculator/statistics/con...
2010 Apr 13
2
how to work with big matrices and the ff-package?
Hello everyone,
I need to create and work with some big matrices that actually have somewhat over 2 million columns and 117 rows. To do some calculations on such big matrices R just needs too much memory for my PC (4GB installed). So I need a solution to work with large datasets. I'm trying to use the ff-package but I don't think I really understand the whole functionality of the
2008 Jul 19
1
Discretize continous variables....
Hi R helpers,
I'm preparing dataset to fir logistic regression model with lrm(). I
have various cointinous and discrete variables and I would like to:
1. Optimaly discretize continous variables (Optimaly means, maximizing
information value - IV for example)
2. Regroup discrete variables to achieve perhaps smaller number of
level and better information value...
Please suggest if there is some package providing thi...
2012 Nov 16
1
discrete discriminant analysis
...tine to classify in
term of gear a set of 20 trips.
I preformed a flexible discriminant analysis (FDA) using a set of 151
trips.
FDAT1 <- fda(as.factor(gear) ~ . , data =matrizR)
A total of 22 predictors were considered. 20 of the predictors are
"numeric" and 2 are "factors/discrete".
The resulting FDA rule was applied to the 20 trips and for the same
predictors in order to predict the type of gear used. however a consistent
error is occuring:
Error in polybasis(newdata, degree, monomial) %*% object$coef :
non-conformable arguments
it is possible the problem...
2013 Sep 02
1
Multivariate discrete HMMs
Hi r-help,
I have been using your RHmm package for some time and have recently
had to try using the package for a new dataset.
Basically I have a dataset with a number of discrete observation
variables that change over time, and I would love to try modeling them
using a HMM.
Basically I was wondering if RHmm can be used to model a multivariate
discrete HMM, i.e., the observations are a vector of discrete
measurements? From what I see in the documentation and from playing
ar...
2005 Mar 21
2
Violin plot for discrete variables.
Dear Rgurus,
To my knowledge the best way to visualize the distribution of a discrete
variable X is
plot(table(X))
The problem which I have is the following. I have to discrete variables
X and Y which distribution I would like to compare. To overlay the
distribution of Y with lines(table(Y)) gives not satisfying results.
This is the same in case of using density or histogram....
2010 May 15
3
Discretize factors?
Hi,
I'm looking for an easy way to discretize factors in R
I've noticed that the lm function does this automatically with a nice
result.
If I have
group <- c("A", "B","B","C","C","C")
and run:
lm(result ~ x1 + group)
The lm function has split the group into separate binary variables {0,1}
before performing the
2008 Sep 05
1
Passing method to returns() /fSeries (PR#12713)
Full_Name: Robert Iquiapaza
Version: 2.7.2
OS: Vista
Submission from: (NULL) (69.127.35.170)
In the help Examples for returns(fSeries) it is said that you can pass the
method to compute ("continuous", "discrete", "compound", "simple") returns using
'type='
i.e.
# Discrete Returns:
returns(MSFT, type = "discrete")
However when you use 'type' it does compute always the continuous returns, no
matter what method you select.
The only way to get the discret...
2008 Mar 02
5
discrete variable
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080302/86a07850/attachment.pl
2006 Jul 12
0
Discretize data.frame
Dear useRs,
I use dics.ef function from dprep package to discretize continuous
variable using intervals of equal frequencies. Dataset to be discretized
include 4 continuous and 2 discrete variables in the following order:
Continuous Countinuous Countinuous Discrete Discrete Continuous
The problem emerge when I try to discretize the last continuos variable:
library(dprep)
dics.ef(my.dataframe, 1:6,5) ## all 6 variables in data.frame
I have no further idea why the function above d...
2008 Sep 03
1
test if all predictors in a glm object are factors
I'm trying to develop some graphic methods for glm objects, but they
only apply for models
where all predictors are discrete factors. How can I test for this in a
function, given the
glm model object?
That is, I want something that will serve as an equivalent of
is.discrete.glm() in the following
context:
myplot.glm <-
function(model, ...) {
if (!inherits(model,"glm")) stop("requires a glm obje...
2012 Feb 04
1
GGPLOT2: Distance of discrete values of from each end of x-axis
Hi Group,
I have been working with the code below. Everything seems to work
okay, except that the discrete values on the x-axis are far from each
end of the graph. I've tried several things including changing the
discrete values and playing with the limits, but can't get it to work.
I tested this on simulated data and do not have the same problem, so I
guessing it is how I'm processing the d...
2010 Jan 10
1
Mixtures of Discrete Uniforms
I want to create the mixture formulation of a discrete uniform ie, say
f(x) = 1/10, for i = 1,2,3,4,5,6,7,8,9 and 10 and
another discrete distribution which has the same values of x, but he
probabilities can vary. Can this be done on any package in R? an if so, can
the package estimate the 'probabilities' of each of the x value as well as
the...
2009 Apr 12
1
goodness of fit between two samples of size N (discrete variable)
Hello list:
I generate by simulation (using different procedures) two sample vectors of size N, each corresponding to a discrete variable and I want to text if these samples can be considered as having the same probability distribution (which is unknown). What is the best test for that?
I've read that Kolmogorov-Smirnov and Anderson-Darling tests are restricted to continuous data (http://cran.r-project.org/doc/contrib/...