Displaying 8 results from an estimated 8 matches for "nondecreasing".
2008 Dec 28
1
Logistic regression with rcs() and inequality constraints?
Dear guRus,
I am doing a logistic regression using restricted cubic splines via
rcs(). However, the fitted probabilities should be nondecreasing with
increasing predictor. Example:
predictor <- seq(1,20)
y <- c(rep(0,9),rep(1,10),0)
model <- glm(y~rcs(predictor,n.knots=3),family="binomial")
print(1/(1+exp(-predict(model))))
The last expression should be a nondecreasing sequence, as fitted
probabilities make no sense t...
2011 Oct 07
1
Strange behaviour with the Homals Package
...s.
X is a matrix with ordinal 1-5 Likert scale entries on 24 questions from
about 2500 respondents.
So I run
X.nlpc = homals(X, rank = 1, level = "ordinal", ndim = 10)
to get the first 10 pc's (the number of dimensions is irrelevant to my
problem).
I happen to get eigenvalues in nondecreasing order and I am not sure how to
interpret this. Can someone help me?
By the way, I would also be interested in knowing if someone has ever
compared the homals solutions with the ones from the categorical
quantizations performed with the Aspect package.
And, yes, I wrote to package maintainer but...
2006 Jan 29
1
mosaicplot() labels overlap (PR#8536)
...Neglecting edge effects, assume you have a
vector of desired positions z, and
a vector of minimum widths for each label w.
Then, you can compute the space used up by
the labels: s[i] = -0.5*w[1] + sum(j<i of w[i]) + 0.5*w[i]
and compute y = M(z-s) + s
where M() gives the best-fit monotonically nondecreasing
fit to it's argument. Y should then be the correct
place to put each label.
If there's a likelyhood of getting a patch accepted,
I could probably supply one.
(Given the opportunity, I'd think about shifting the blocks
up and down also, to do an overall alignment.)
2024 Jan 29
0
DescTools::Quantile
...bad <- length(x)!=length(w)
bad <- bad || (length(p)!=1)
bad <- bad || any(diff(x)<=0)
if(bad)
stop("Arguments 'x' and 'w' must be " %,%
"vectors of the same legnth. Argument " %,%
"'x' must be a vector of nondecreasing " %,% "values.")
if(any(w<=0)||(sum(w)!=1))
stop("elements of 'w' must be positive " %,% "and sum to 1")
## the actual body of the function
x[max(which(cumsum(w)<=p))]
}
Now we write a vectorization of the above tha...
2007 Sep 05
1
Monotone splines
Hello, i have a little problem with R and i hope you can help me.
I want to use splines to estimate a function but i want to force the interpolation to be monotone. Is this possible with R ?
Thank you,
RĂ©mi.
---------------------------------
[[alternative HTML version deleted]]
2011 Oct 08
0
Strange behaviour with Homals
...s.
X is a matrix with ordinal 1-5 Likert scale entries on 24 questions from
about 2500 respondents.
So I run
X.nlpc = homals(X, rank = 1, level = "ordinal", ndim = 10)
to get the first 10 pc's (the number of dimensions is irrelevant to my
problem).
I happen to get eigenvalues in nondecreasing order and I am not sure how to
interpret this. Can someone help me?
By the way, I would also be interested in knowing if someone has ever
compared the homals solutions with the ones from the categorical
quantizations performed with the Aspect package.
And, yes, I wrote to package maintainer but...
2011 Mar 21
2
rqss help in Quantreg
Dear All,
I'm trying to construct confidence interval for an additive quantile regression
model.
In the quantreg package, vignettes section: Additive Models for Conditional
Quantiles
http://cran.r-project.org/web/packages/quantreg/index.html
It describes how to construct the intervals, it gives the covariance matrix for
the full set of parameters, \theta is given by the sandwich formula
2010 Sep 10
6
adding zeroes after old zeroes in a vector ??
Hello
Imagine I have a vector with ones and zeroes
I write it compactly:
1111111100001111111111110000000001111111111100101
I need to get a new vector replacing the "N" ones following the zeroes to
new zeroes.
For example for N = 3
1111111100001111111111110000000001111111111100101 becomes
1111111100000001111111110000000000001111111100000
I can do it with a for loop but I've read