Skip to content

Commit

Permalink
version 0.2-1
Browse files Browse the repository at this point in the history
  • Loading branch information
falkcarl authored and gaborcsardi committed Jan 24, 2013
1 parent f47450e commit 57b0304
Show file tree
Hide file tree
Showing 15 changed files with 830 additions and 1,775 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: pln
Type: Package
Title: Polytomous logit-normit (graded logistic) model estimation
Version: 0.2
Date: 2012-07-09
Version: 0.2-1
Date: 2013-01-24
Author: Carl F. Falk and Harry Joe
Maintainer: Carl F. Falk <cffalk@gmail.com>
Description: Performs bivariate composite likelihood and full
Expand All @@ -12,6 +12,6 @@ Description: Performs bivariate composite likelihood and full
Depends: R (>= 2.9.0)
License: GPL-3
LazyLoad: yes
Packaged: 2012-07-10 21:34:10 UTC; cf
Packaged: 2013-01-25 07:33:53 UTC; cf
Repository: CRAN
Date/Publication: 2012-07-19 05:27:08
Date/Publication: 2013-01-25 08:58:37
22 changes: 12 additions & 10 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
dc9f45c6ff325941703c0f88f503cefd *DESCRIPTION
96fa608e6e90c4841d918a82f251a679 *NAMESPACE
ef2d0e4e9410d582c0b4deb9d28f2e89 *DESCRIPTION
fd3054f46d1b1da18fd2b06ada328f27 *NAMESPACE
2d975a3685008f1ac01c892441c15638 *R/m2pln.R
37ef7cab2eab33af2d0463eb1b39aecc *R/m2rasch.R
cdd695d35730325c7f28882f810f41c8 *R/nrbcpln.R
33cb9672f058b204fe5b69ad99dee2f1 *R/nrmlepln.R
ace929c3a7765da94de074c175fa76e4 *R/nrmlerasch.R
235bcd59195fadcee5a04929675e0c67 *R/simulpln.R
00eb6eb752264562e9a791c06a8fb029 *R/startvals.R
78d2795209981141b205250790f3e0af *R/utils.R
3568c0662d33c4d872ba8c966eed100b *TODO
64aa82663accb1e792cbaacbbcf63481 *data/item5fr.tab.gz
2ddbafc19058e8dc4357259223a5601a *data/item9cat5.tab.gz
b48ac65652debf6a3b2020a062dbb451 *TODO
72f87c5547e8bc3d4a398180599631ca *data/item5fr.tab
abf6d19ccb6eb3a834858f3c9821bad0 *data/item9cat5.tab
4fc32462d0ab9e04508b457407d1edd5 *man/item5fr.Rd
4dc73a12e4fc7bc6cde546dc02223f38 *man/item9cat5.Rd
07482eead9613a69f5cee84d42ffecc7 *man/nrmlepln.Rd
5e05a853686bc3da796a788f61f6016c *man/pln-package.Rd
522ab09f7a4d7d5b7c7e81975a515dbe *man/startalphas.Rd
526d60d44b8987757f1322b0149b2359 *man/nrmlepln.Rd
d405b42a362e90ba5d01f11af6a35842 *man/pln-package.Rd
a5f51940bb68d555a4022aed2ed522f9 *man/simulpln.Rd
87593ad10c0a068b2bea8565c65bc2d3 *man/startalphas.Rd
8d55714705b3deaf64460c8e0ff83bbc *src/Makevars
8d55714705b3deaf64460c8e0ff83bbc *src/Makevars.win
4bb93d284e3331fe960746e32cb14113 *src/amatrix.c
Expand All @@ -30,8 +32,8 @@ d8b0735f16f82e5f5a6dba42c98fd535 *src/nrbcpln.c
31c20de51c661d80059524d3f687aa87 *src/nrmlepln.c
a3b5b67ae55af26beac105579bbc34ed *src/nrmlerasch.c
a868e69935aebdc03fb6574560fab511 *src/polyder2.c
fe28a9b49338890a45f692d0d031a33f *src/simulpln.c
77efd6b3cc92d14624e5af1a8d2c3421 *src/simulpln.c
f1965d423e20f916fc1399b998d284db *src/ssgauher.c
e6bb3740d031f440c779e1caf4bbe488 *src/startpln.c
f4d009060a4053bf7d034c1c6564cddf *src/x2statb.c
772c1068f26ddd8395d16bcc5516b499 *tests/Examples/pln-Ex.Rout.save
4d6df06fc6408f590f69e215f71a7b3f *tests/Examples/pln-Ex.Rout.save
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export(nrmlepln)
export(nrmlerasch)
export(startalphas)
export(startbetas)
export(simulpln)
22 changes: 22 additions & 0 deletions R/simulpln.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
simulpln <- function(n,nitem,ncat,alphas,betas) {
if(length(betas)!=nitem){stop("Length of betas does not match number of items")}
if(length(alphas)!=nitem*(ncat-1)){stop("Length of alphas does not match nitem*(ncat-1)")}

## Size may differ from what C wants to return
## But, this is the max size that may be returned
datvec<-rep(0,n*(nitem+1))

tem <- .C("Rsimulpln", as.integer(nitem),
as.integer(ncat),as.integer(n),
as.double(alphas),as.double(betas),
datvec=as.double(datvec))

##nrec<-length(tem$datvec)/(nitems+1)
##datfr<-matrix(tem$datvec,nrec,nitem+1)
datfr<-matrix(tem$datvec, ncol=nitem+1, byrow=TRUE)

## trim rows with 0 frequencies
datfr<-datfr[which(datfr[,ncol(datfr)]>0),]

datfr
}
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
-Standardize debugging code for command line
-Clean up ifdef statements
-Clean up misc debugging code
-Add simulpln function
-BCL Rasch model
-Output starting values used in estimation
-Output number of iterations and convergence for all functions
Expand Down
68 changes: 68 additions & 0 deletions data/item5fr.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
item1 item2 item3 item4 item5 freq
0 0 0 0 0 4
0 0 0 0 1 2
0 0 0 1 0 1
0 0 0 2 0 2
0 0 0 2 1 1
0 0 0 2 2 4
0 0 1 0 0 1
0 0 1 0 1 1
0 0 1 1 0 1
0 0 1 2 0 1
0 0 2 0 0 2
0 0 2 0 1 1
0 0 2 0 2 1
0 0 2 1 1 1
0 0 2 2 1 2
0 1 0 0 0 2
0 1 0 1 1 1
0 1 0 2 0 1
0 1 0 2 1 2
0 1 2 0 0 2
0 1 2 1 1 2
0 1 2 2 1 1
0 2 0 1 0 1
0 2 0 2 2 1
0 2 1 0 0 2
0 2 2 0 2 1
0 2 2 2 2 1
1 0 0 0 0 1
1 0 1 2 0 2
1 0 2 0 2 1
1 1 0 0 0 1
1 1 0 2 2 1
1 1 2 0 2 1
1 1 2 2 1 1
1 2 0 2 2 1
1 2 1 1 2 1
1 2 1 2 0 1
1 2 1 2 2 1
1 2 2 2 2 1
2 0 0 0 0 1
2 0 0 0 1 1
2 0 0 0 2 1
2 0 0 2 0 2
2 0 0 2 2 1
2 0 1 2 2 1
2 0 2 0 0 1
2 0 2 0 2 1
2 1 0 0 0 2
2 1 0 0 2 1
2 1 1 1 0 1
2 1 2 0 0 1
2 1 2 2 0 3
2 1 2 2 1 1
2 1 2 2 2 1
2 2 0 0 0 1
2 2 0 0 2 1
2 2 0 1 1 1
2 2 0 2 0 1
2 2 0 2 2 1
2 2 1 2 1 3
2 2 2 0 0 2
2 2 2 0 2 3
2 2 2 1 0 1
2 2 2 1 2 2
2 2 2 2 0 2
2 2 2 2 1 2
2 2 2 2 2 6
Binary file removed data/item5fr.tab.gz
Binary file not shown.

0 comments on commit 57b0304

Please sign in to comment.