Hi
your example is not reproducible. With ordinal regression the type of the y
values is important
sometimes an ordered factor is required.
Ordinal regression depends on your hypothesis see Ananth and Kleinbaum 1997
functions/packages to look at apart from ordinal
VGAM
polr::MASS
bayespolr::arm
Dear Brittany,
On Thu, 16 Jul 2015 17:35:38 -0600
Brittany Demmitt wrote:
> Hello,
>
> I have a series of 40 variables that I am trying to transform via the boxcox
> method using the powerTransfrom function in R. I have no zero values in any
> of my variables. When I run the powerTransform
I suggest you consult a local statistician. You are (way) over your
head statistically here, and statistical matters are off topic on
this list. The brief answer to your question is: you are almost
certainly producing nonsense.
Cheers,
Bert
Bert Gunter
"Data is not information. Information is
This might do what you want:
OPoly <- function(x, degree=1, weight=1, coefs=NULL, rangeX=NULL){
weight <- round(weight,0)# weight need to be integer
if(length(weight)!=length(x)) {
weight <- rep(1,length(x))
}
if (is.null(rangeX)) {
rangeX <- range(x)
}
p <- poly(4*(rep(x,wei
OPoly<-function(x,degree=1,weight=1){
weight=round(weight,0)# weight need to be integer
if(length(weight)!=length(x))weight=rep(1,length(x))
p=poly(4*(rep(x,weight)-mean(range(x)))/diff(range(x)),degree)
Z<-(t(t(p[cumsum(weight),])*sqrt(attr(p,"coefs")$norm2[-
seq(2)]))[,degree])
class(Z)
Hello,
I have a series of 40 variables that I am trying to transform via the boxcox
method using the powerTransfrom function in R. I have no zero values in any of
my variables. When I run the powerTransform function on the full data set I
get the following warning.
Warning message:
In sqrt(
On 17/07/15 03:45, Bert Gunter wrote:
Of course, sample skewness and kurtosis are basically useless, but
that's another, off topic, issue.
Fortune nomination!
cheers,
Rolf
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
_
Read about the 'makepredictcall' generic function. There is a method,
makepredictcall.poly(), for poly() that attaches the polynomial coefficients
used during the fitting procedure to the call to poly() that predict()
makes.
You ought to supply a similar method for your xpoly(), and xpoly() needs
Hello, I have a question about the formula and the user defined function:
I can do following:
###Case 1:
> clotting <- data.frame(
+ u = c(5,10,15,20,30,40,60,80,100),
+ lot1 = c(118,58,42,35,27,25,21,19,18),
+ lot2 = c(69,35,26,21,18,16,13,12,12))
> g1=glm(lot1 ~ log(u) + poly(u,1), d
I am developing a marketing (Churn) model that has an event rate of 0.5%. So i
thought to perform oversampling. I mean making the number of events equal to
number of non-events by reducing non-events (50-50 after sampling). After
oversampling, we need to adjust predicted probabilities as it infl
Thank Jim!
This makes a huge difference. Can you explain why are data frame slower
than a matrix? Any other suggestions on how to improve the code would be
greatly appreciated.
Thanks again!
Ignacio
On Thu, Jul 16, 2015 at 1:42 PM jim holtman wrote:
> Actually looking at the result, you don't
Yes it is obvious --- once someone else pointed it out.
Thanks for the hint.
Terry T.
On 07/16/2015 12:52 PM, Peter Langfelder wrote:
Hi Terry,
maybe I'm missing something, but why not define a matrix BB = V'B;
then t(B) %*% V = t(BB), then your problem reduces to finding A such
that t(BB) %*
On Thu, Jul 16, 2015 at 1:00 PM, John McKown
wrote:
> On Thu, Jul 16, 2015 at 12:40 PM, tryingtolearn
> wrote:
>
>> Say I have a list:
>> [[1]] "I like google"
>> [[2]] "Hi Google google"
>> [[3]] "what's up"
>>
>> and they are tweets. And I want to find out how many tweets mention google
>> (th
On Thu, Jul 16, 2015 at 12:40 PM, tryingtolearn wrote:
> Say I have a list:
> [[1]] "I like google"
> [[2]] "Hi Google google"
> [[3]] "what's up"
>
> and they are tweets. And I want to find out how many tweets mention google
> (the answer should be 2).
> If I string split and unlist them, then I
Why would you strsplit them? I would think
length(grep("google", unlist(x), ignore.case = TRUE))
should do it.
Best,
Ista
On Thu, Jul 16, 2015 at 1:40 PM, tryingtolearn wrote:
> Say I have a list:
> [[1]] "I like google"
> [[2]] "Hi Google google"
> [[3]] "what's up"
>
> and they are tweets. A
> On Jul 16, 2015, at 12:40 PM, tryingtolearn wrote:
>
> Say I have a list:
> [[1]] "I like google"
> [[2]] "Hi Google google"
> [[3]] "what's up"
>
> and they are tweets. And I want to find out how many tweets mention google
> (the answer should be 2).
> If I string split and unlist them,
Hi Terry,
maybe I'm missing something, but why not define a matrix BB = V'B;
then t(B) %*% V = t(BB), then your problem reduces to finding A such
that t(BB) %*% A = 0?
Peter
On Thu, Jul 16, 2015 at 10:28 AM, Therneau, Terry M., Ph.D.
wrote:
> This is as much a mathematics as an R question, in t
Actually looking at the result, you don't need the transpose; that was an
artifact of how you were doing it before.
xm <- do.call(rbind, str_split(string = AllpairsTmp, pattern = "-"))
# convert to dataframe and do transpose on matrix and not dataframe
separoPairs <- as.data.frame((xm), strings
Here is one improvement. Avoid dataframes in some of these cases. This
create a character matrix and then converts to a dataframe after doing the
transpose of the matrix. This just takes less than 10 seconds on my system:
> library(stringr)
> # create character matrix; avoid dataframes in th
Say I have a list:
[[1]] "I like google"
[[2]] "Hi Google google"
[[3]] "what's up"
and they are tweets. And I want to find out how many tweets mention google
(the answer should be 2).
If I string split and unlist them, then I would get the answer of 3. How do
I make sure I get just 2?
--
Dear list,
I've been looking at previous posts on the list, but I haven't found any
close enough to my question/problem.
My data can be seen as a matrix of mutiple individuals (columns) with
(rather independent) measures (lines). Now based on supplemental
information, the individuals are organized
This is as much a mathematics as an R question, in the "this should be easy but I don't
see it" category.
Assume I have a full rank p by p matrix V (aside: V = (X'X)^{-1} for a particular setup),
a p by k matrix B, and I want to complete an orthagonal basis for the space with distance
functio
1. I have no idea.
2. However, I doubt that your strategy would work anyway. If there is
not an outright error, you are probably stuck in some endless loop or
are wandering around at random on an essentially "flat" hypersurface.
You would need to change convergence criteria or change the
parameter
David:
I think you missed my point. As I understand him, Dmitri mentioned
rounding off to e.g. 2 decimal digits and multiplying by 100 to
produce integer weights, which would then lead to "unrolling" the
vector via rep(). Your "weighted moments" reference is probably
closer to what he sought, how
Hello,
I have been running a nonlinear GMM using the nloptr wrapper since the last 7
days. The maximum time I have to run the code on the server that I am using to
run this code is 7 days which expires in about an hour when the server
automatically terminates it. I will like to know if there is
On Jul 16, 2015, at 8:37 AM, Dimitri Liakhovitski wrote:
> Unfortunately not - more like 0.7654, 1.2345.
> I understand that I could multiply each number by 100, round it to no
> decimal point and then unroll my data in proportion.
> I was just hoping someone has done it in C and put it into a pa
Thank you!
On Thu, Jul 16, 2015 at 11:45 AM, Bert Gunter wrote:
> rep() **does** do it essentially in C !!
>
> See also the "moments" package, which I found instantly by googling
> "sample moments in R", though I don't know whether it does what you
> want (but probably shouldn't do).
>
> Of cours
rep() **does** do it essentially in C !!
See also the "moments" package, which I found instantly by googling
"sample moments in R", though I don't know whether it does what you
want (but probably shouldn't do).
Of course, sample skewness and kurtosis are basically useless, but
that's another, off
Unfortunately not - more like 0.7654, 1.2345.
I understand that I could multiply each number by 100, round it to no
decimal point and then unroll my data in proportion.
I was just hoping someone has done it in C and put it into a package...
On Thu, Jul 16, 2015 at 11:27 AM, David Winsemius
wrote:
On Jul 16, 2015, at 8:10 AM, Dimitri Liakhovitski wrote:
> Is there an R package that allows one to calculate skewness and
> curtosis - but weighted with individual level weights (one weight per
> observation)?
>
Integer weights?
--
David Winsemius
Alameda, CA, USA
_
Is there an R package that allows one to calculate skewness and
curtosis - but weighted with individual level weights (one weight per
observation)?
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
On 16/07/2015 3:08 AM, MH wrote:
> Hello,
>
> I try to install a course for swirl and got a SSL problem:
>
>> install_from_swirl("R Programming")
> Error in function (type, msg, asError = TRUE) :
> SSL certificate problem: self signed certificate in certificate chain
>
> Found this answer wi
I have ma matrix which its elements are NA,0,1,2 ! I got my answer bout
removing the columns with 0 or NA or both values but now I want to add
additional condition for deleting the columns! I have to delete the columns
which contain the same value. delete the columns with NA or 0 or both and
the co
the first error message is
"configuration failed for package RCurl"
immediately before that it said
"Cannot find curl-config".
It would appear that you don't have curl installed on your computer.
Unfortunately, I cannot help you with that. But you might look at the
documentation for RCurl (ava
The list rejects almost all attachments.
You could dput the data and put it in your posting.
You may also want to try a Marquardt solver. In R from my nlmrt or
compiled in Kate Mullen's minpack.lm. They are slightly different in
flavour and the call is a bit different from nls.
JN
On 15-07-16 0
---The las post rejected two files I had attached, so I modified
it.---
Hi. I am trying to make a nls fit for a little bit complicated expression that
includes two integrals with two of the fit parameters in their upper limits.
I got the error "Error in nlsModel(formula, mf, star
I am trying to analyse time-series .netcdf (3D lat,long and time domain)
climate data. I want to apply the SPEI package (calculation of standardized
precipitation evapotranspiration index) on it. But unable to arrange my data
in the required data frame. As I am a beginner in R, it will be very much
Hello,
I try to install a course for swirl and got a SSL problem:
> install_from_swirl("R Programming")
Error in function (type, msg, asError = TRUE) :
SSL certificate problem: self signed certificate in certificate chain
Found this answer with Google but does not work either:
> set_config(
Hi Collin,
The objective of the gen.names function is to generate N *unique *random
names, where N is a *large *number. In my computer `gen.names(n = 5)`
takes under a second, so is probably not the root problem in my code. That
said, I would love to improve it. I'm not exactly sure how you pr
> On 16 Jul 2015, at 15:13 , Ivan Calandra wrote:
>
> Dear useRs,
>
> I am running a wilcox.test() on two subsets of a dataset and get exactly the
> same results although the raw data are different in the subsets.
>
> mydata <- structure(list(cat1 = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L,
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
and http://adv-r.had.co.nz/Reproducibility.html
Currently we don't even know what version of Cronbach's alpha you are using.
Also use google as well as help()
Try R statistics Cronbach's alpha
John Kane
Kin
Dear useRs,
I am running a wilcox.test() on two subsets of a dataset and get exactly
the same results although the raw data are different in the subsets.
mydata <- structure(list(cat1 = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), .Label = c("high", "lo
> -Original Message-
> > I compute its regression surface doing polynomical regression (fit)
> > ...
> > fit <- lm(z ~ poly(x,2) + poly(y,2))
> >
.
> > So I want to repressent the surface
> > How could I do it? Any idea??
>
> You need to write a function f of x and y that produ
43 matches
Mail list logo