similar to: problems with contrast matrix

Displaying 20 results from an estimated 2000 matches similar to: "problems with contrast matrix"

2017 Oct 22
2
Syntax for fit.contrast
I have a model (run with glm) that has a factor, type. Type has two levels, "general" and "regional". I am trying to get estimates (and SEs) for the model with type="general" and type ="regional" using fit.contrast but I can't get the syntax of the coefficients to use in fit.contrast correct. I hope someone can show me how to use fit.contrast, or some
2017 Oct 22
0
Syntax for fit.contrast
> On Oct 22, 2017, at 6:04 AM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > I have a model (run with glm) that has a factor, type. Type has two levels, "general" and "regional". I am trying to get estimates (and SEs) for the model with type="general" and type ="regional" using fit.contrast ?fit.contrast No documentation for
2007 Nov 22
2
Vectorize a correlation matrix
Hello I can construct a correlation matrix from an (ordered) vector of correlation coefficients as follows: x <- c(0.1,0.2,0.3,0.4,0.5) n <- length(x) cmat <- diag(rep(0.5,n)) cmat[lower.tri(cmat,diag=0)] <- x cmat <- cmat+t(cmat) But how to do the reverse operation, i.e. produce x from cmat? Thanks for help, Serguei Kaniovski [[alternative HTML version deleted]]
2005 Apr 21
1
printCoefmat(signif.legend =FALSE) (PR#7802)
printCoefmat(signif.legend =FALSE) does not work properly. The option "signif.legend = FALSE" is ignored as shown in the example below. cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12))) cmat <- cbind(cmat, cmat[,1]/cmat[,2]) cmat <- cbind(cmat, 2*pnorm(-cmat[,3])) colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)") #
2006 Dec 04
1
Count cases by indicator
Hi, In the data below, "case" represents cases, "x" binary states. Each "case" has exactly 9 "x", ie is a binary vector of length 9. There are 2^9=512 possible combinations of binary states in a given "case", ie 512 possible vectors. I generate these in the order of the decimals the vectors represent, as:
2017 Oct 22
0
Syntax for fit.contrast (from package gmodels)
> On Oct 22, 2017, at 3:56 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > David, > Thank you for responding to my post. > > Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"): > Call: > glm(formula = events ~ type, family = poisson(link = log), data = data, > offset =
2007 May 19
2
What's wrong with my code ?
I try to code the ULS factor analysis descrbied in ftp://ftp.spss.com/pub/spss/statistics/spss/algorithms/ factor.pdf # see PP5-6 factanal.fit.uls <- function(cmat, factors, start=NULL, lower = 0.005, control = NULL, ...) { FAfn <- function(Psi, S, q) { Sstar <- S - diag(Psi) E <- eigen(Sstar, symmetric = TRUE, only.values = TRUE) e <- E$values[-(1:q)] e <-
2010 Oct 08
3
Efficiency Question - Nested lapply or nested for loop
My data looks like this: > data name G_hat_0_0 G_hat_1_0 G_hat_2_0 G_0 G_hat_0_1 G_hat_1_1 G_hat_2_1 G_1 1 rs0 0.488000 0.448625 0.063375 1 0.480875 0.454500 0.064625 1 2 rs1 0.002375 0.955375 0.042250 1 0.000000 0.062875 0.937125 2 3 rs2 0.050375 0.835875 0.113750 1 0.877250 0.115875 0.006875 0 4 rs3 0.000000 0.074750 0.925250 2 0.897750 0.102000
2017 Oct 22
3
Syntax for fit.contrast (from package gmodels)
David, Thank you for responding to my post. Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"): Call: glm(formula = events ~ type, family = poisson(link = log), data = data, offset = log(SS)) Deviance Residuals: Min 1Q Median 3Q Max -43.606 -17.295 -4.651 4.204 38.421 Coefficients:
2002 Apr 09
1
Problem handling NA indexes for character matrixes (PR#1447)
In a package I've been developing for manipulating genetic data I discovered a problem when indexing into character arrays using NA's: Create a character matrix and a numeric matrix > cmat <- matrix( letters[1:4], ncol=2, nrow=2) > nmat <- matrix( 1:4, ncol=2, nrow=2) Create an index vector containing an NA value > indvec <- c(1,2,NA) Indexing works fine for both
2010 Oct 12
2
repeatability/intraclass with nested levels
I have a spectrophotometric dataset with repeated measures of a value at 200 wavelengths for each of 150 individuals. I would like to use the repeated samples to at each wavelength to look at measurement/observer error, compared to difference between individuals error I have looked at doing this with icc{irr} or using an anova approach, but I am unclear how to acheive this given that there
2017 Oct 23
0
Syntax for fit.contrast (from package gmodels)
> On Oct 22, 2017, at 5:01 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > David, > Again you have my thanks!. > You are correct. What I want is not technically a contrast. What I want is the estimate for "regional" and its SE. There needs to be a reference value for the contrast. Contrasts are differences. I gave you the choice of two references
2017 Oct 23
2
Syntax for fit.contrast (from package gmodels)
David, Again you have my thanks!. You are correct. What I want is not technically a contrast. What I want is the estimate for "regional" and its SE. I don't mind if I get these on the log scale; I can get the anti-log. Can you suggest how I can get the point estimate and its SE for "regional"? The predict function will give the point estimate, but not (to my knowledge)
2017 Oct 23
1
Syntax for fit.contrast (from package gmodels)
David, predict.glm and se.fit were exactly what I was looking for. Many thanks! John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax)
2017 Nov 12
2
create waveform sawtooth
My tuneR sawtooth wave function generator is broken. When I use the sine function, I get exactly what I expect: a sine wave whose frequency is defined by the freq parameter. In particular, higher frequencies have shorter wavelengths (more cycles per second means shorter waves). When I create a sawtooth wave, the opposite seems to occur: higher frequencies result in longer waves. But that?s not
2002 Mar 06
2
Announce: R from Python
Hello. I'm not a regular subscriber in this mailing list, but I think that this announce may interest somebody. Please, forgive me if this is the wrong place. Based on the code of RSPython, but modifying it a little, I wrote an interface for using R from Python. The main reason for writing it was to make it robust, in order to avoid segmentation faults. Also, it is (IMMO) a very
2010 Dec 06
1
use pcls to solve least square fitting with constraints
Hi, I have a least square fitting problem with linear inequality constraints. pcls seems capable of solving it so I tried it, unfortunately, it is stuck with the following error: > M <- list() > M$y = Dmat[,1] > M$X = Cmat > M$Ain = as.matrix(Amat) > M$bin = rep(0, dim(Amat)[1]) > M$p=qr.solve(as.matrix(Cmat), Dmat[,1]) > M$w = rep(1, length(M$y)) > M$C = matrix(0,0,0)
2012 Oct 04
1
data structure for plsr
I am having a similar problem understanding the data structure of the "yarn" dataset described in the "[R] data structure for plsr" posts. I have spectroscopic data I'd like to run through a PLSR and have read the tutorial series, but still do not understand the data format required for the code to process my data. My current data structure consists of a .csv file read into
2017 Nov 12
0
create waveform sawtooth
Ccing the maintainer if the tuneR package. Looks to me like sawtooth (and square) don't behave as expected when using xunit="samples". Workaround is to use xunit="time" instead: sawtooth(110,duration=1/100,samp.rate=sample_rate,xunit="time") I looked at the code but found it to be opaque. -- Sent from my phone. Please excuse my brevity. On November 12, 2017
2008 Nov 24
3
Help With Permutations
I have a problem with permutations functions in R I just started using R so maybe it is an easy question I need to obtain all the 9.somthingExp 157 permutations that can be given from the number from 1 to 100 I wrote the following commands: > library(gregmisc) >options(expressions=1e5) cmat <- combinations(300,2) dim(cmat) # 44850 by 2 >permutations(n=100, r=100)