[R] Bifactor model and infit statistics?

2019-04-11 Thread kende jan via R-help


Goodafternoon, 

I amcurrently in the process of calibrating an item bank using a GPCM model. 
So, amI right to assume that the bifactor model allows me to work with my 
generalfactor by assimilating it to a one-factor model, without taking into 
account groupfactors? That is, I can estimate my item parameters from my factor 
loadings onthe general factor only?

If so, Ihave some questions about evaluating the fit of my model. The 
calculation of infitstatistics is specific to unidimensional models. Can I 
compute infit statisticsusing the general factor or do I have to do this 
separately for each of the groupfactors? Or is there a more appropriate method 
to evaluate the fit of my modelwhen calibration an item bank using a GPCM model?

Thank youin advance.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Linear regression with tranformed dependant variable

2017-10-23 Thread kende jan via R-help
Dear all, I am trying to fit a multiple linear regression model with a 
transformed dependant variable (the normality assumption was not verified...). 
I have realised a sqrt(variable) transformation... The results are great, but I 
don't know how to interprete the beta coefficients... Is it possible to do 
another transformation to get interpretable beta coefficients to express the 
variations in the original untransformed dependant variable ? Thank you very 
much for your help!Noémie 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] svyciprop object

2016-05-06 Thread kende jan via R-help
Hi, I'd like to access to the different elements in a svyciprop object (to the 
confidence intervals in particular...). But none of the functions I know 
works.Thank you for your help !
> grr <- svyciprop(~temp==bzz, dclus1)> grr                               2.5%  
>  97.5%temp == bzz 0.040719697 0.027622756 0.05965> attributes(grr)$names[1] 
> "temp == bzz"
$var                        as.numeric(temp == bzz)as.numeric(temp == bzz)      
 6.42377038236e-05
$ci           2.5%           97.5% 0.0276227559667 0.0596454643748 
$class[1] "svyciprop"
> grr$ciErreur dans grr$ci : $ operator is invalid for atomic vectors> 
> grr["ci"]   NA > ci(grr)Erreur : impossible de trouver la fonction "ci"


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] problem of interpretation using mediation package

2016-01-20 Thread kende jan
Dear all,
I am using the package mediation in order to perform a parametric mediation
analysis on survival data. I have 8 variables:

- Mediator
- Treat
- time (days)
- death (event)
- X1-X4 (confounding variables)

I ran the following code to estimate the causal mediation effects.

med.m = lm(Mediator ~ Treat + X1 + X2 + X3 + X4)
med.y = survreg(Surv(time, death) ~ Treat + X1 + X2 + X3 + Mediator + X4)
med.out <- mediate(med.m, med.y, treat = "Treat", mediator = "Mediator")
summary(med.out)

Here are the output provided by this script:

Causal Mediation Analysis

Quasi-Bayesian Confidence Intervals

                           Estimate 95% CI Lower 95% CI Upper p-value
ACME (control)           -3.68e+02    -1.27e+03    -3.34e+01    0.01
ACME (treated)           -1.47e+02    -4.46e+02    -1.67e+01    0.01
ADE (control)            -3.76e+03    -1.18e+04    -5.93e+02    0.00
ADE (treated)            -3.54e+03    -1.14e+04    -5.53e+02    0.00
Total Effect             -3.91e+03    -1.20e+04    -6.79e+02    0.00
Prop. Mediated (control)  9.56e-02     1.55e-02     2.36e-01    0.01
Prop. Mediated (treated)  3.82e-02     7.03e-03     1.49e-01    0.01
ACME (average)           -2.57e+02    -8.36e+02    -2.46e+01    0.01
ADE (average)            -3.65e+03    -1.16e+04    -5.78e+02    0.00
Prop. Mediated (average)  6.69e-02     1.17e-02     1.90e-01    0.01

Sample Size Used: 713


Simulations: 1000

My problem is that I do not understand how to interpret the value of the
estimate obtained for the ACME (control) parameter.
I know that when the response variable (Y) is binary, this estimate can be
interpreted as the increase in terms of probability of the event for control
subjects.
What is the good interpretation when the response variable (Y) in the model
is a survival object ?
Does it indicates here a decrease expressed in number of days (368) ?
According to the Prop. Mediated (average) value (i.e last row of the table),
can I conclude that about 6.69% of the total effect of Treat on Y is
explained by the indirect effect of Mediator ?

Thanks for your consideration,

Best regards,

Kendejan
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] mirt package error in ESTIMATION...

2013-05-17 Thread kende jan
Hello everyone,

I am trying to undertake an item bifactor analysis of graded response data from 
a questionnaire. I am using the mirt package, especially the bfactor 
function.My dataset is called data.items, it contains about 2000 observations 
and 31 variables (variables represent the items in the questionnaire). The 
items follow a Likert scale format and represent a level of satisfaction, 
missing values are coded as NA). I am having trouble at the beginning of my 
analysis, during the exploratory model fitting. The syntax and the error 
message are as follows:

 bfactor(data.items,model=9)
Error in ESTIMATION(data = data, model = model, group = rep(all, nrow(data)), 
 : 
  index out of bounds

I get the same error when i try with: bfactor(data.items,9,itemtype=graded) 
or  bfactor(data.items,9,prev.cor=cor)
where cor is the correlationmatrix that i compute without the missing values.

If someone have an idea to suggest, do not hesitate.

Thank you.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Triangular Test

2012-02-20 Thread kende jan
Hello,

I would like to perform triangular test for clinical trial with R.
can you help me please ?

Jan

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] compare means

2012-01-12 Thread kende jan
Dear all,
 
I would compare two means between cases and controls taking
into account that I have  matched 1 case
to two controls. How i can do it with R.
Thanks in advance 
 Jan
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] CART with rpart

2011-12-02 Thread kende jan
dear all, 


i want to keep in my data file the results of  terminal nodes (groups) after 
CART analysis for performing other statisticals analysis by this groups.

can you help me please?

thanks.

jan.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Survival curves for case control and control

2011-11-21 Thread kende jan
Hi,

I want to perform Survival curves for case and control subjects in
the propensity score-matched cohort  that
accounted for the clustering of matched pairs. How I can do it with R.
Thanks for your help,
Jan
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Transitions probability comparison

2011-02-27 Thread kende jan
Hello, 

I am training to use the changeLOS package. Using data provided in this package 
(los.data), I want to compare transition probability P01 and P03 like the 
Kaplan-Meier Method.Can someone help me ?

Thank you. 
Jan

data(los.data)
my.observ - prepare.los.data(x=los.data)
my.model - msmodel(c(0,1,2,3),cens.name=cens)
my.trans - trans(model=my.model,observ=my.observ)
my.aj - aj(my.trans, s=0, t=80)
plot(my.aj,c(0,0,0,0),c(0,1,2,3))


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] changeLOS package use

2011-02-24 Thread kende jan
Hello, 

I am training to use the changeLOS package. Using  data provided in this 
package 
(los.data), I want to generate a new plot with overlaying 2 curves of 
transition 
probability P01 and P03 and also statistically  compare the two curves like the 
Kaplan-Meier Method.Can someone help me ?

Thank you. 
Jan

data(los.data)
my.observ - prepare.los.data(x=los.data)
my.model - msmodel(c(0,1,2,3),cens.name=cens)
my.trans - trans(model=my.model,observ=my.observ)
my.aj - aj(my.trans, s=0, t=80)
plot(my.aj,c(0,0,0,0),c(0,1,2,3))



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Proportions comparison

2011-02-08 Thread kende jan
Dear all,
I want to compare  two proportions of  disease in two populations : group 1 
(1200/15000) and group 2 (26/650). However  I would take into account 
the number of physicians involved in each group G1 (1600 physicians) and G2 
(1.6 
million). Please can someone can help me ?
 
Thanks 


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Meta-analysis question

2010-10-08 Thread kende jan
Dear all,

I am trying to do meta-analysis of continuous outcome data. Twelve studies are 
selected but for six of them, i have only p-values and the six other means and 
standard deviation for the two groups (Experimental and Control). How can I do 
with R to take into account p-values and/or means and standard deviation to 
perform my meta-analysis.

Thanks for your help
Jan


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] binary logistic regression taking account clustering

2010-05-01 Thread kende jan
Hello
 
I would like to perform with R, a binary logistic regression analysis taking 
account clustering 
(A randomized trial into 2 groups, patients within 50 hospitals):
y (0,1)  is the outcome 
x1, x2 indivifdual’s characteristics
x3,x4 hospitals’ characteristics.
 
Thanks in advance
 
Jan


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Generate Numbers

2010-04-04 Thread kende jan

Hello,
How can I generate randomly in R a sample of skewed data with first quartile is 
540 and third quartile is 715.
I need a sample of 100 cases.

Thank you for your help

Jan



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in solve.default peforming Competing risk regression

2009-10-27 Thread kende jan

Dear all,

I am trying to use the crr function in the cmprsk
package version 2.2 to analyse 198 observations.I have receive the
error in solve.default.
Can anyone give me some
insights into where the problem is? 
Thanks 


here is my script :


cov=cbind(x1,x2)
z-crr(ftime,fstatus,cov))

and data file:

x1x2fstatusftime
0.021263
0.031113
0.031523
0.03349
0.031278
0.031190
0.041472
0.041357
0.041219
0.0429349
0.051207
0.051166
0.06355
0.06217
0.071264
0.07267
0.07337
0.082190
0.08372
0.08236
0.08196
0.092136
0.097681273
0.11167
0.1276
0.13107
0.1371
0.11116
0.11262
0.111256
0.111385
0.111266
0.111174
0.113334
0.123270
0.12149
0.121733
0.131271
0.132160
0.131105
0.14256
0.14249
0.151266
0.15146
0.151112
0.151246
0.161371
0.161140
0.161279
0.161174
0.1617180
0.17173
0.17354
0.171320
0.171213
0.181215
0.181282
0.181263
0.18399
0.21266
0.2159
0.2097611659
0.211111
0.21162
0.221386
0.241249
0.24279
0.261199
0.26195
0.261270
0.261189
0.26706321
0.27183
0.27145
0.291154
0.291221
0.291174
0.29241112
0.31208
0.3231
0.32182
0.332152
1.341595
0.371182
0.381231
0.381282
1.38160
0.421181
0.441103
0.453251
0.452176
0.471234
0.49326
1.53142
0.5551152
0.561229
1.571179
0.58189
0.62187361
0.66332
1.69114
1.69171
0.7594190
1.9462391
0.951138
1.969191
11.13129
01.171145
11.26146
11.361187
01.36174
11.48169
01.61102
11.62174
11.92103
11.91152
12.11159
12.161238
12.201140
02.231124
12.42161
12.451283
12.47142
12.582291
12.591182
12.73328
12.731459
13.0071179
13.04152
13.167385
13.2451559
13.251320
13.2331482
13.275182
13.37141982
13.3652142
13.411184
13.4833187
13.5324131
13.58181374
13.629149
13.63681297
13.7193
13.781364
13.884156
13.88166
13.891160
13.9361205
14.042161
14.38299
14.3921311
14.411257
14.48197
14.53176
14.510194
14.5721568
14.6196
14.664159
14.825136
15.151459
15.1852111
15.333158
15.32177
15.348338
15.473277
15.5441453
15.7331363
15.866132
15.9157
15.9411870
16128
16.09153
16.302123
16.6671196
16.647245
16.7271132
16.304339
16.746161
16.786150
17125
17.044   1252
17.164242
17.6903134
17.802180
18.3981133
18.666132
18.687341
18.794129
18.887193
19.172348
19.7961275
111.361230
111.56147
112.12175
112.142168
112.411318
116.50167
117.211510


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Competing risk regression error in solve.default

2009-10-26 Thread kende jan
Dear all,

I am trying to use the crr function in the cmprsk package version 2.2 to 
analyse 198 observations.I have receive the error in solve.default.
Can anyone give me some
insights into where the problem is? 
Thanks 


here is my script and in attached file my data.


cov=cbind(x1,x2)
z-crr(ftime,fstatus,cov))


  __
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Competing Risks Regression with qualitative predictor with more than 2 categories

2009-08-02 Thread kende jan
Hello,
I have a question regarding competing risk regression using cmprsk package 
(function crr()). I am using R2.9.1. How can I do to assess the effect of 
qualitative predictor (gg) with more than two categories (a,b,c) categorie c is 
the reference category. See above results, gg is considered like a ordered 
predictor !
Thank you for your help
Jan

 # simulated data to test
 set.seed(10)
 ftime - rexp(200)
 fstatus - sample(0:2,200,replace=TRUE)
 gg - factor(sample(1:3,200,replace=TRUE),1:3,c('a','b','c'))
 cov - matrix(runif(600),nrow=200)
 dimnames(cov)[[2]] - c('x1','x2','x3')
 cov2=cbind(cov,gg)
 print(z - crr(ftime,fstatus,cov2))

convergence:  TRUE 
coefficients:
 x1  x2  x3  gg 
 0.2624  0.6515 -0.8745 -0.1144 
standard errors:
[1] 0.3839 0.3964 0.4559 0.1452
two-sided p-values:
   x1x2x3gg 
0.490 0.100 0.055 0.430 
 summary(z)
Competing Risks Regression

Call:
crr(ftime = ftime, fstatus = fstatus, cov1 = cov2)

 coef exp(coef) se(coef)  z p-value
x1  0.262 1.3000.384  0.683   0.490
x2  0.652 1.9180.396  1.643   0.100
x3 -0.874 0.4170.456 -1.918   0.055
gg -0.114 0.8920.145 -0.788   0.430


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Cuminc Plot

2009-07-09 Thread kende jan
Dear All,

here is the example for cumulative incidence analysis with cmprsk package:


set.seed(2)
ss - rexp(100)
gg - factor(sample(1:3,100,replace=TRUE),1:3,c('a','b','c'))
cc - sample(0:2,100,replace=TRUE)
strt - sample(1:2,100,replace=TRUE)
print(xx - cuminc(ss,cc,gg,strt))
plot(xx,lty=1,color=1:6)
 
When I
perform this example, I have 6 curves. 
a 1
b 1
c 1
a 2
b 2
c 2

I would
like to plot only 3 first curves of risk  cc=1 not all of 6 curves.
a 1
b 1
c 1
How I can
do this with R ?
Many thanks
Jan



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in Comprting Risks Regression

2008-11-27 Thread kende jan
 
Dear All,

I am trying to run the
following function (a CRR=Competing Risks
Regressionmodel) and
receive the error in solve.default.  Can
anyone give me some insights into where the problem is? 
Thanks 



print(z-crr(J3500,CD3500,cov))
Error in solve.default(v[[1]])
: 
  Lapack routine dgesv  : system is exactly singular


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Bland-Altman method to measure agreement with repeated measures

2008-07-05 Thread kende jan

Dear all, 
 
I want to use the Bland-Altman method to measure agreement with repeated 
measures collected over period of time (seven periods).

How can I do this with R

 
Many thanks



  
_ 

o.fr
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] spline

2008-04-22 Thread kende jan
dear all,
I have a problem about spline, when I send this:
library(mgcv)
attach(SG2)
modele3 - gam(J15STATUS~SWANG1+s(AGE)+ s  (SP2),data=SG2,family=binomial)
it doesen't work et it says:
Erreur dans get(.Random.seed,envir=.GlobalEnv)
variable.Random.seed introuvable
Thanks a lot

__


ble contre les messages non sollicités 

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.